Creating a ddtek:wscall Function

There 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.
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.
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
 
Free Stylus Studio XML Training: