I need to create connection to web service with axis2. I would like to know how can I convert recieved xmls to Java objects. Is there any good tutorials to learn how to do this?
+3
A:
Axis2 is pretty well documented. Make sure to check the axis2 user guide. On the other hand be aware of that using web services and axis2 is not a piece of cake sort of think, so read the docs exhausitvly. ;)
KB22
2009-10-22 07:29:45
+2
A:
Either the XML is part of the SOAP request. In that case, Axis2 will convert it to Java for you.
If XML is part of a "data blob", then you need to do this yourself. There are several options:
You can have a look at the generators which Axis2 uses. Try the docs.
Use an XML OO mapper like Castor.
You can write your own mapper (not really recommended).
If you can influence the sender side, you can try to create XML that follows the rules for XMLEncoder. That would allow you to use the standard Java Serialization API to build objects.
Aaron Digulla
2009-10-22 07:38:25