|
Home >Online Product Documentation >Table of Contents >Creating a ddtek:wscall Function Creating a ddtek:wscall FunctionThere are two ways to create a ddtek:wscall function in XQuery Mapper:
l Automatically, by dragging and dropping a Web service call (.wscc file) on the Mapper canvas. This method creates the ddtek:wscall function in a single operation that does not require you to specify the WSDL URL or Web service operation.
Use this method when you have created a Web service call using the Stylus Studio Web Service Call Composer. See , , on page 941 for more information on this topic.
l Manually, by choosing the ddtek:wscall function from the XQuery Mapper canvas short-cut menu (right-click to display). This method requires you to enter the URL for the WSDL file, which you can do by typing or navigating a file system, and selecting the Web service operation you want your XQuery code to execute.
Use this method when you want to use Web service operations that have not been exposed using a Stylus Studio Web service call.
To create a ddtek:wscall function automatically:
1. Open an XQuery and click the Mapper tab.
2. Open the Stylus Studio File Explorer or some other tool that allows you to navigate a file system.
3. Locate the Web service call (.wscc file) for the Web service whose operations you want to include in your XQuery code.
4. Drag the .wscc file and drop it on the XQuery Mapper canvas.
Stylus Studio adds the ddtek:wscall function glyph to the Mapper canvas and code for the ddtek:wscall function to your XQuery code.
If the Web service exposes multiple operations, the ddtek:wscall function is created with the operation that was exposed in the Web Service Call Composer when the .wscc file was last saved. You can choose the operation you want your XQuery code to execute by modifying the Web service call in XQuery Mapper:
1. Double-click the ddtek:wscall function glyph.
The Choose the WSDL Operation dialog box (see Figure 416) appears.
2. Click the down arrow in the Operation Name field to display the available Web service operations, as shown here:
3. Select the operation you want and click OK.
To create a ddtek:wscall function manually:
1. Open an XQuery and click the Mapper tab.
2. Right-click the Mapper canvas and select Function Block > DataDirect XQuery > wscall/2.
Stylus Studio displays the Choose the WSDL Operation dialog box.
3. Enter the URL of the WSDL whose operation you want your XQuery to execute in the WSDL File field.
Example: http://www.swanandmokashi.com/HomePage/WebServices/StockQuotes.asmx?WSDL
Stylus Studio displays the operations associated with the Web service represented by the WSDL in the Operation Name field.
4. Choose the Web service operation you want your XQuery to execute from the Operation Name field.
Example: GetStockQuotes.
5. Click OK.
Stylus Studio displays the wscall function block on the XQuery Mapper canvas.
The illustration shown in Figure 417 shows a wscall defined with location and payload input ports.
|