John Juliciana wrote:i have a requirement to read a xml from a 3rd party which is sent via xml over http in the request body and post it to a different WEB service. I have to write a web service to capture that XML and post it. How do i read the XML which comes in the request body and post it using Axis? Im new to web services and need help on this. i have a setup axis 2 and apache successfully.
Any help is highly appreciated
Thanks in advance
John
Hi John,
Apache axis2 contains a tool called wsdl2java which generates stub(
java classes) from wsdl. This stub will contain methods which are mapped to wsdl methods. In each method you'll find local variable called "env". On this "env" variable if you invoke getBody() call (i.e. env.getBody()) then it will return you SOAP request body(xml) sometimes it may be formatted to some notation(like '<' would be replaced with '<') , in such case you may need to apply your own logic to parse such notations.
Let me know if I'm not clear.
Thanks.