Practical Usage


Let’s emphasize a few things we’ve mentioned over the course of the chapter. First, you should focus on building Web services that use the document-literal scheme. This is the scheme that’s being promoted by the WS-I in its basic profile. It also has much better potential for interoperability, especially with .NET applications.

Second, you should use WSDL if at all possible. If you have existing Java code, use Java2WSDL to generate a first cut at a WSDL file. Then you can clean up the file and modularize it. You can use the modularization we showed in the WSDL2Java example, or you can use the one that Java2WSDL uses (if you use Java2WSDL, you can have Java2WSDL do it for you). Once you have a good WSDL file, you should use WSDL2Java to generate the Java classes you need. If you need to work with existing code, then have WSDL2Java generate the skeleton classes, and use the prewritten forwarding methods in the skeleton to connect the skeleton to your existing code. Don’t forget to throw away the template implementation class if you use the skeleton this way.

Third, use TCPMon as a tool when you’re debugging. Doing so can save you many hours of frustration and give you some insight into what your code is doing.

Fourth, ask Axis to generate a JUnit test case for you and write a decent set of tests for your application.

Fifth, make sure you use the Ant tasks to save you from repetitive typing. You can also use the JUnit task for Ant to run your generated test case.




Professional XML Development with Apache Tools. Xerces, Xalan, FOP, Cocoon, Axis, Xindice
Professional XML Development with Apache Tools: Xerces, Xalan, FOP, Cocoon, Axis, Xindice (Wrox Professional Guides)
ISBN: 0764543555
EAN: 2147483647
Year: 2003
Pages: 95

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net