Thursday, March 5, 2009

Axis2 - First Element must contain the local name, Envelope

This Exception could occur on both the server side or the client side. This exception is thrown when trying to build the SOAP envelope from the response (or request in the case of server side). The server is expecting a SOAP response but it receives something else (That does not have a SOAP envelope).

The easiest way to resolve this issue is to use a tool such as TCPMonitor and monitor the request and response. That will help you diagnose where the problem is.

5 comments:

igorelli said...

Hi Keith,

Could you describe how to configure synapse if I don't want to wrap the response in SOAP, but pass it as is?

Thanks.

Keith Chapman said...

What is the format of the message you are trying to pass through?

igorelli said...
This comment has been removed by the author.
igorelli said...

Some messages are POX, others are binary, here are the exact content types:

application/fastinfoset
application/json
text/plain
text/xml

Keith Chapman said...

Both Synapse as well as the WSO2 ESB supports all these message types and routing them through the ESB is a trivial task. If you do not specify any specific conversions the ESB would not reformat the message but just pass it through in the same format it received the message in.