Web Services Tools
The Apache Web Services Project has produced Axis, an implementation of the W3C SOAP (Simple Object Access Protocol) standard.
Additionally, using the support of the XML Converters, web services through Axis can be built into your own applications, called and executed through XSLT and/or XQuery, and used in XML Pipelines and XML Reports.
Web Service Call Composer
Everything starts with the Web Service Call Composer. This lets you explore a UDDI Repository or WSDL file and see all of the operations that are exposed. Once we've identified a web service from here, we can save the call to it and reuse the output of that call anywhere we would normally use an XML document.
Web Service Demonstration
A more sophisticated demonstration of the Call Composer is available here, but for our purposes let's just use a simple call that fetches the weather from the United States National Oceanic & Atmospheric Administration (or NOAA).
Web services are described in structure by documents known as
(Web Service Description Language) documents,
and the URL for the NOAA weather WSDL document is
In our copy of Stylus Studio® (evaluation version can be downloaded for free from here) we'll do File|New|Web Service Call, and in the "WSDL URL:" field we'll type the above URL. After pressing [Enter], the screen will look like this:
(click to enlarge)
In the Operations panel, each of the operations exposed by this web service are shown.
We're going to use the
The Name/Type/Value columns list all of the input values that are required by the operation. Clicking in the Value column turns on an editor that allows you to type in a value. Bedford, Massachusetts is the home of Progress Software Corp., DataDirect Technologies' parent company, and we'll use their zip code in our demonstration.
Underneath that is a template for the actual SOAP request. Stylus Studio®
uses the WSDL to create the request that would be sent to the SOAP service, typically through
an HTTP "POST" or "GET". If you choose a different operation on the left, a new request XML document is created in that window, and above its approprate
parameters are shown. As an alternative to entering the value in the top panel, you can actually
modify the XML document in the window — it's live, so if I change
To look at the WSDL itself, click on the button illustrated here, or choose WebServiceCall|Open WSDL Document.
To see an actual operation occur, choose the
The result, in this case, would look something like this:
Axis Generating Java
Apache Axis can be used to generate the Java source code to call this web service, including the code to build the XML DOM in memory and do the sending. To generate these classes, use the WebServiceCall|Generate Java Web Service Client option, and after choosing the target directory for the generated source, all of the necessary code will be written for you.
(click to enlarge)
Axis and XSLT
The XML Converters allow you to use converters anywhere you can use regular XML files. One of the special cases of this is that you can save the web service call from the first step above as a special file called a .wscc file, and then use it as input to XSLT or XQuery. As an example, instead of just retrieving the results, we can format them, all in one step. Or we can perform multiple operations using the XML Pipeline module.
Using the noaa.wscc we generated earlier and a little piece of XSLT code we'll call noaa.xslt (both of which can be downloaded by clicking on their names in this paragraph), we can reformat the results of the web service call so they look more attractive, like this:
Axis and XQuery
Just as Apache Axis web services can be used with XSLT, they can be used with XQuery.
But XQuery has another, direct way of calling web services. If you use the menu choice WebServiceCall|Copy XQuery Call to Clipboard, the actual source code for an XQuery call, using Apache Axis and either DataDirect XQuery or Saxon 8 XQuery, will be created — and it will look something like this:
Stylus Studio® is proud to be able to contribute to the Apache projects, and also to be part of a larger company that has a history of donating code to open source and helping to maintain it. DataDirect Technologies' sister division, Progress Sonic, is responsible for helping drive Axis forward (See Progress Sonic Standards Watch), and both organizations have committer rights on various Apache projects.
See the sweet results of open standards-based Web service development by downloading and evaluating today!
PURCHASE STYLUS STUDIO ONLINE TODAY!!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Try STYLUS Apache AXIS Tools
Download a free trial of our powerful tools for building Web service applications for Apache AXIS.
Attend a Live Webinar This Week!
Learn about Stylus Studio's unique features and benefits in just under an hour. Register for the Stylus Studio QuickStart Training WebCast!