• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

AXIS2 Axis fault SOAPEnvelope must contain a body element

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The SoapUI tool or TCPMON will let you examine exactly what is being sent.

Bill
 
Rodrigo Soto
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
reply
    Bookmark Topic Watch Topic
  • New Topic