Originally posted by Ulf Dittmer:
Well, I have to admit that your code looks nicer :-)
In all honesty, the AXIOM code I copied from somewhere - it's possible that it could be simplified. But you have a MessageServiceStub class that seems to do the hard work - where does that come from?
The Options stuff is mostly about setting the SOAPAction header (which WS-Addressing needs, and which AXIOM doesn't set by itself); the endpoint could be set in other ways.
The MessageServiceStub class was created when I ran WSDL2Java which is included with Axis2. The base setup(which the security stuff) is the same as the original Axis stuff. The only weird thing I noticed was the SendMessages class. It seems that Axis2 makes a separate inner class for your parameters, whereas Axis simply sets them as part of the method, like a normal
java method.