Using Web Service Calls as XML

In addition to opening a Web service call in the Web Service Call Composer for testing purposes, you can open a Web service call as an XML document anywhere in Stylus Studio - in the XML editor, or as a source document in the XQuery mapper for example. When you open a Web service call as an XML document, Stylus Studio automatically executes the SOAP request and displays the SOAP response.

Consider the following Web service call, stock.wsc. The Web service operation used in this example returns current stock quote and other information based on the ticker symbols provided as parameters. Here is the SOAP request composed by Stylus Studio:

<?xml version="1.0" standalone="no"?> 
<SOAP-ENV:Envelope xmlns:SOAPSDK1="" 
xmlns:SOAPSDK3="" xmlns:SOAP-
		<s0:GetStockQuotes xmlns:s0=""> 
		<GetStockQuotesResponse xmlns=""> 
					<CompanyName>PROGRESS SOFT</CompanyName> 
					<YearRange>11.50 - 24.06</YearRange> 

And here is the SOAP response returned by the Web service:

<?xml version="1.0" encoding="utf-8"?> 
<soap:Envelope xmlns:soap="" 

The saved Web service call can be used as the source document for an XQuery in the XQuery mapper, as shown in Figure 403:

XQueries composed using a Web service call as a source document return real-time data from the Web service as a result.

Free Stylus Studio XML Training:
W3C Member