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"')
<Destination xmlns="http://MyWebServer/TravelService/TRAVELSERVICE.wsdl"> AUSTRALIA</Destination>
Namespace Alias: SchedTours Namespace: urn:ScheduledTour Location: http://<web server>/TravelService/MyScheduledTours.xsd
Change the parameter name to: Scheduled_Tours Change the Namespace Alias to: SchedTours
The web server publication folder now contains an up-to-date TRAVELSERVICE.ashx and web.config files. Click the Create WSDL File button. The web server publication folder now contains an up-to-date TRAVELSERVICE.wsdl file.
INVOKE TRAVELCOMPONENT.GETSCHEDULEDTOURS WITH SELECT '<Destination xmlns="http://MyWebServer/TravelService/TRAVELSERVICE.wsdl">AUSTRALIA</Destination>'
For background information about all SOAP messages sent, refer to: Web Service Example 5: SOAP request and response messages. |