Creating a ddtek:wscall Function

There are two ways to create a ddtek:wscall function in XQuery Mapper:

Use this method when you have created a Web service call using the Stylus Studio Web Service Call Composer. See , , on page 901 for more information on this topic.

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 378) appears.

2. Click the down arrow in the Operation Name field to display the available Web service operations, as shown here:

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.

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 379 shows a wscall defined with location and payload input ports.

 
Free Stylus Studio XML Training:
W3C Member