SOAP examples

Two demonstration services has been setup (using document literal aka. wrapped mode). The first is the classic calculator and the second is employees, that are a bit more complex with objects (complex type) as input and return.

Service API documentation

Click on HTML button to show automatic generated API documentation for respective SOAP service. This is a builtin feature of this library with support for various output formats (try i.e. with XSLT transformation or Wrapped WSDL).


This is the classic calculator example supporting common arithmetric metods like add, substract, divide and so on. You can browse the source code (slightly modified) or consume the WSDL using your SOAP framework.



The employees demo is a bit more complex and demonstrate passing and returning complex types. It also uses class path and map to resolve namespaced classes.


Java client

A complete java project can be downloaded. It includes two client application for communication with the SOAP services above (you might need to change the WSDL path and re-generate source code using ws-import).



Use the NetBeans IDE to load the project or compile from command line using ant:

ant compile

Run the default client from the command line:

ant run

You can also select which client to run from the classes directory:

( cd build/classes && java client.Calculator )
( cd build/classes && java client.Employees )

Cleanup source code when done:

ant clean