| Author |
AXIS2 Axis fault SOAPEnvelope must contain a body element
|
Rodrigo Soto
Greenhorn
Joined: Oct 13, 2009
Posts: 11
|
|
Hi all, I am developing a client that generates a soap messages and sends it to a public registry. When I create this messages it does not goes through and returns a Axisfault here is the stack trace:
Here is the method that creates the soap message:
I thank you in advance.
|
 |
Ivan Krizsan
Bartender
Joined: Oct 04, 2006
Posts: 2193
|
|
Hi!
Apparently your SOAP message does not contain a SOAP body element or perhaps it is in the wrong place.
Try printing out the SOAP message before you send it to check that it is a valid SOAP message. The easiest way that I know is to apply a null XSLT transform with the destination being System.out.
Best wishes!
|
 |
William Brogden
Author and all-around good cowpoke
Rancher
Joined: Mar 22, 2000
Posts: 12266
|
|
The SoapUI tool or TCPMON will let you examine exactly what is being sent.
Bill
|
Java Resources at www.wbrogden.com
|
 |
Rodrigo Soto
Greenhorn
Joined: Oct 13, 2009
Posts: 11
|
|
Thank you for your prompt responses. I have used the TCPMon and this the soap messages does have a soapenv:Body, here it is the message
I hope this helps to narrow the problem down. Thank you in advance.
|
 |
Ivan Krizsan
Bartender
Joined: Oct 04, 2006
Posts: 2193
|
|
Hi!
I am not entirely sure why you have problems, but after having checked the SOAP message, I discovered the following:
1. In the headerblock <wsa:Action>, the namespace prefix soapEnv is used, despite it not having been declared (only the namespace with the prefix soapenv is declared).
2. I ran the SOAP message through an XML validator. There are some values that should be wrapped in CDATA sections:
I inserted CDATA section in all but the last two. In the two last ones, the value of the value attribute causes validation problems.
Hope this helps!
|
 |
Rodrigo Soto
Greenhorn
Joined: Oct 13, 2009
Posts: 11
|
|
|
Well the I dont know if the problem is really that because when I send the soap message to the server it tries to validate the message against some xsd but I do not have control over that. The problem is that the server is sending a fault message stating that there does not exist a WS-Action but it is there. I have been working on this problem and have not find any solution. Any other thoughts on how to solve this?
|
 |
 |
I agree. Here's the link: jrebel
|
|
subject: AXIS2 Axis fault SOAPEnvelope must contain a body element
|
|
|