Web Service Example 5: Step-by-Step Instructions |
This topic contains step-by-step instructions to complete Web Service Example 5: Document-Oriented Method with Complex Type Parameters. To define a document-oriented method that retrieves Scheduled Tour details for a specified destination:
INVOKE XML.EXPORT WITH SELECT tour_type, start_date, return_date, price, max_part, guide FROM schedtour WHERE destination = USXSL.value(:Destination ,'/ns:Destination' ,'xmlns:ns="http://MyWebServer/TravelService/TRAVELSERVICE.wsdl"') The USXSL value method extracts the destination ( 'AUSTRALIA' for example ) from the input parameter: <Destination xmlns="http://MyWebServer/TravelService/TRAVELSERVICE.wsdl"> AUSTRALIA</Destination>
One input parameter and one output parameter, by default XMLDOCUMENT, are generated.
Namespace Alias: SchedTours Namespace: urn:ScheduledTour Location: http://<web server>/TravelService/MyScheduledTours.xsd
The web server publication folder now contains an up-to-date TRAVELSERVICE.xml, TRAVELSERVICE.asp file, and TRAVELSERVICE.inc file.
The web server publication folder now contains an up-to-date TRAVELSERVICE.wsdl file.
A new GETSCHEDULEDTOURS method is added.
INVOKE TRAVELCOMPONENT.GETSCHEDULEDTOURS WITH SELECT '<Destination xmlns="http://MyWebServer/TravelService/TRAVELSERVICE.wsdl">AUSTRALIA</Destination>' All scheduled tours to this destination are returned in XML Export format. For background information about all SOAP messages sent, refer to: Web Service Example 5: SOAP request and response messages. |