Example

Consider the following StockQuotesSoap SOAP request defined using the Swan and Mokashi WSDL:

<?xml version="1.0"?>
               
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
               
	<SOAP-ENV:Body>
               
		<s0:GetQuotes xmlns:s0="http://swanandmokashi.com">
               
			<s0:QuoteTicker>prgs</s0:QuoteTicker>
               
		</s0:GetQuotes>
               
	</SOAP-ENV:Body>
               
</SOAP-ENV:Envelope>
               

            

This SOAP request was created using the Stylus Studio Web Service Call Composer, as described in How to Compose a Web Service Call.

The XQuery generated by Stylus Studio for this Web service call looks like this:

declare namespace ws = "ddtekjava:com.stylusstudio.webservice.SOAPCall";
               
declare function ws:call($location as element(), $payload as element()) as 
document-node() external;
               
 
               
ws:call(
               
<location 
address="http://www.swanandmokashi.com/HomePage/WebServices/StockQuotes.asmx" 
               
 soapaction="http://swanandmokashi.com/GetQuotes" />,
               
 
               
<s0:GetQuotes xmlns:s0="http://swanandmokashi.com">
               
	<s0:QuoteTicker>prgs</s0:QuoteTicker>
               
</s0:GetQuotes>
               
)
               

            

In addition to the header that declares the ws namespace and Java extension function, ws:call(), the generated code includes comments that specify .jar files that must be present in your Classpath in order to run the resulting XQuery in Stylus Studio. Here's an example of the complete code generated by Stylus Studio for a Swan & Mokashi Web service:

(: This function requires the following items in the classpath :)
               
(: axis-all.jar;xercesimpl.jar :)
               
(: xml-apis.jar only if running on Java 1.4 :)
               
 
               
(: Saxon function binding :)
               
(:declare namespace ws = "java:com.stylusstudio.webservice.SOAPCall";:)
               
 
               
(: DataDirect XQuery function binding :)
               
declare namespace ws = "ddtekjava:com.stylusstudio.webservice.SOAPCall";
               
declare function ws:call($location as element(), $payload as element()) as 
document-node() external;
               
 
               
ws:call(
               
<location 
address="http://www.swanandmokashi.com/HomePage/WebServices/StockQuotes.asmx" 
soapaction="http://swanandmokashi.com/GetQuotes" />,
               
 
               
<s0:GetQuotes xmlns:s0="http://swanandmokashi.com">
               
	<s0:QuoteTicker>prgs</s0:QuoteTicker>
               
</s0:GetQuotes>
               
)
               

            

XQuery Mapper

Stylus Studio has the industry's only XQuery mapper, enabling you to develop sophisticated XML mappings consisting of queries and data transformation in an intuitive, visual manner.

Whitepaper: FIXML - Working with Complex Message Sets Defined Using XML Schema

The advanced XML Schema handling and presentation capabilities of Stylus Studio have valuable implications for users of industry-specific XML message sets.

How to Build PDF Forms using Stylus Studio

Learn how to build PDF Forms using Stylus Studio and the RenderX XEP FO processor

Varying Record Layout to XML

Not every row in a text file has to have the same layout. Convert to XML has advanced pattern-recognition tools to route the data to where it belongs.

Stylus Most Wanted

 
Free Stylus Studio XML Training:
W3C Member