Changes between Version 40 and Version 41 of ZooWorkshop/FOSS4GJapan/CreatingOGRBasedWebServices
- Timestamp:
- Oct 16, 2010, 1:21:56 AM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ZooWorkshop/FOSS4GJapan/CreatingOGRBasedWebServices
v40 v41 568 568 }}} 569 569 570 In order to let you easily run the XML requests, a simple HTML form called test_services.html is available in your /var/wwwdirectory. You can access it using the following link : http://localhost/test_services.html.571 572 Please open this page in your browser, simply fill the XML request content into the textarea field and click the « run using XML Request » submit button. You will get exactly the same result as when running your Service using the GET request. The screenshot above show the HTML form including the request and the ExecuteResponsedocument displayed in the iframe at the bottom of the page :570 In order to let you easily run the XML requests, a simple HTML form called test_services.html is available in your {{{/var/www}}} directory. You can access it using the following link : http://localhost/test_services.html. 571 572 Please open this page in your browser, simply fill the XML request content into the textarea field and click the « run using XML Request » submit button. You will get exactly the same result as when running your Service using the GET request. The screenshot above show the HTML form including the request and the {{{ExecuteResponse}}} document displayed in the iframe at the bottom of the page : 573 573 574 574 [[Image(Practical introduction to ZOO - 8.png,width=550px)]] 575 575 576 The xlink:hrefvalue is used in the simplest way to deal with such data input. Obviously, you can also use a full JSON string of the geometry, as shown in the following XML Request example :576 The {{{xlink:href}}} value is used in the simplest way to deal with such data input. Obviously, you can also use a full JSON string of the geometry, as shown in the following XML Request example : 577 577 578 578 {{{ … … 602 602 }}} 603 603 604 If everything went well, you should get the Boundary of the JSON geometry passed as argument, and so be sure that your Service support both GML and JSON as input data. Note that in the previous request, we added a mimeType attribute to the ComplexData node to specify that the input data is not in the default text/xml mimeType but passed as an application/json string directly. It is similar to add @mimeType=application/jsonas we discussed before.604 If everything went well, you should get the Boundary of the JSON geometry passed as argument, and so be sure that your Service support both GML and JSON as input data. Note that in the previous request, we added a {{{mimeType}}} attribute to the {{{ComplexData}}} node to specify that the input data is not in the default {{{text/xml}}} {{{mimeType}}} but passed as an {{{application/json}}} string directly. It is similar to add {{{@mimeType=application/json}}} as we discussed before. 605 605 606 606 === Creating Services for other functions (!ConvexHull and Centroid) ===