Wednesday, February 7, 2007

Implementing a Complex Axis Web Service

Well, I really want to do something more elaborate with ActiveBPEL and that will require the ability to write complex web services. I ordered the electronic version of "Developing Web Services with Apache Axis" by Ka lok 'Kent' Tong. I like it because it is real straightforward with working examples. There are also some chapters on Axis Security and Encryption which will definitely be worth reading when I get some time.

Check out for more information.
The code is downloadable without cost.

I had to rework some of the code but I am glad to say that I got the complex web service up and running in the ActiveBPEL environment.

You can download my project for this. It is not in a super tidy state but should get you going.
Download it from Here
There are 2 ant files that I use:

buildTheStubs.xml - This will build the stub java source files for the complex web service

buildAndDeployWS.xml - This will deploy the compile and deploy the web service to ActiveBPEL

I copied them into build.xml when I want to run them each.

There is a client java class which will be able to talk to the deployed webservice.

The web service implementation
exposes a method
public ProductQueryResultResultItem[] query(ProductQueryQueryItem[] queryRequest) throws java.rmi.RemoteException, InvalidQuery {

which is quite obviously complex in that it does not have any simple types as parameters or return types.

The client works fine except when I try to look at the wsdl for the webservice
http://localhost:8080/active-bpel/services/BizServiceSOAP?WSDL on my machine

I get the following error message that I will try and have a look into:

AXIS error

Sorry, something seems to have gone wrong... here are the details:Fault - makeTypeElement() was told to create a type "{}>>productQuery>queryItem", with no containing element

faultCode: {}Server.generalException
faultString: makeTypeElement() was told to create a type "{}>>productQuery>queryItem", with no containing element

1 comment:

Anonymous said...


I am also getting the same error. I would be extremely happy if yopu can tell me how it can be fixed.
My Email is
Thanking you,
Krishna Prasad