Welcome Guest!
Create Account | Login
Locator+ Code:

Search:
FTPOnline Channels Conferences Resources Hot Topics Partner Sites Magazines About FTP RSS 2.0 Feed

Free Subscription to Java Pro

email article
printer friendly

Tooling for Smoother Web Services
A good set of tools lets you focus on your own skills and knowledge to write Web services and make them run smoothly
by Peter Varhol

Posted April 14, 2004

On the surface, developing Web services is no different than developing any other application component. You write code. Some of that code accepts requests from an outside source. Other parts of the code make calls to a database, and store or retrieve data. Still more code processes the request and analyzes that data. These are activities that developers perform on any application, whether or not it is a Web service or includes one or more Web services.

ADVERTISEMENT

But Web services perform some of these tasks a little differently than a standard application component, and will often have very different use models. While it's possible to use a standard IDE and other development tools to build Web services, this approach may not be the most productive one to build reliable and high-performing services.

Instead, while developers will likely work within an established IDE to write code, there's much more to creating Web services. For example, it helps if the IDE editor can be configured to conveniently create XML documents. If not, developers have to turn to an alternative approach to build XML documents, such as using an external editor or by building them manually within the IDE. Either approach will reduce the productivity of developers.

A development environment that automates much of the standard forms and code saves developers time and makes them more productive in writing logic rather than reinventing the user interface or other reusable component. Your tools should include a library of available code or visual components for building the SOAP listener, WSDL generator, and other parts of the service that you have to write every time.

On top of writing XML, developers need: to be able to test the resulting SOAP transactions to help identify errors, either in the structure or the XML; the ability to support WSDL as a mechanism for formulating requests; and even to help debug the Web services. These requirements entail a combination of a way to view and debug SOAP messages, the ability to automatically formulate a test case from a WSDL query to test the validity of the WSDL call, and a way to send erroneous SOAP messages to the service to test its input error-handling code.

Test Performance
But the needs go well beyond editing files and debugging code. One of the key issues for anyone experimenting with Web services is application performance. Any development toolkit should include the ability to measure the performance of not only the Web service itself, but also the entire application including the Web service because performance may be significantly affected by the nature and frequency of the SOAP calls made by the client application to the Web service, rather than an issue with just one or the other in isolation.

Testing also extends to functional and load testing. Functional testing can often be assisted by freely available test harness tools like JUnit, but it can be complemented by other free and commercial products that record and track defects, analyze test results in more detail, and prepare reports on test progress. And JUnit along with code coverage features can also support unit testing, enabling the developer to have confidence in the reliability of the code during development.

Load testing is tricky, especially when practiced on a Web service. The Web service has no direct user interaction, which means that you have to write a test harness to call the Web service and perform load testing through the test harness. While this method makes testing possible, it may not accurately assess the ability of the service to scale to the level needed by real applications calling that service. In addition to using a test harness, your load testing facility should also work across an entire application, including client, one or more Web services, and database, to ensure that the Web service scales in a realistic scenario.

Of course, the most important aspect of writing a Web service is your own skill and knowledge—both of Java Web services and of the problem domain. But a good set of developer tools can let you focus on those strengths and make the rest of the process go more smoothly.

About the Author
Peter Varhol is a technical evangelist for Compuware Corporation. Contact Peter at .




Back to top













Java Pro | Visual Studio Magazine | Windows Server System Magazine
.NET Magazine | Enterprise Architect | XML & Web Services Magazine
VSLive! | Thunder Lizard Events | Discussions | Newsletters | FTP Home