• 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

Why Getting Fault Code in SOAP Response Message

 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi !!!
I am using SAAJ to display the request and response maessages generated by my web service. I am successful to get soap request message but at respose, i get the following fault message. why this happens? where i am wrong. Kindly help me.

Response:

<?xml version="1.0" encoding="UTF-8"?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<S:Fault xmlns:ns3="http://www.w3.org/2003/05/soap-envelope"><faultcode>S:Client</faultcode><faultstring>Cannot find dispatch method for {}</faultstring></S:Fault>
</S:Body>
</S:Envelope>

Best Wishes!!!
 
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!
The value Client in the <faultcode> element indicates that there was something wrong with the request message; most likely it is malformed in some way.
To find the cause of this error, I suggest using soapUI to create and send a valid request message to the service and then compare it to the request message you construct in the code using SAAJ.
Best wishes!
 
somia razzaq
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ivan Krizsan wrote:Hi!
The value Client in the <faultcode> element indicates that there was something wrong with the request message; most likely it is malformed in some way.
To find the cause of this error, I suggest using soapUI to create and send a valid request message to the service and then compare it to the request message you construct in the code using SAAJ.
Best wishes!





I use soapUI to test soap request and response messages. Given following:

Request:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sim="http://j2ee.netbeans.org/wsdl/simple_WSDL">
<soapenv:Header/>
<soapenv:Body>
<sim:simple_WSDLOperation>
<Age>?</Age>
<Name>?</Name>
</sim:simple_WSDLOperation>
</soapenv:Body>
</soapenv:Envelope>


Response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sim="http://j2ee.netbeans.org/wsdl/simple_WSDL" xmlns:sim1="http://xml.netbeans.org/schema/simple_schema">
<soapenv:Header/>
<soapenv:Body>
<sim:simple_WSDLOperationResponse>
<student_object>
<sim1:Age>?</sim1:Age>
<sim1:Name>?</sim1:Name>
</student_object>
</sim:simple_WSDLOperationResponse>
</soapenv:Body>
</soapenv:Envelope>

I have error in both. Can you tell me about this error and how i remove it ?

Best Wishes.
 
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!
It looks like you receive a good response when using soapUI. The next step, as I said before, would be to compare the request from soapUI with the request from your client. My guess is that there is something wrong with your client and it sends bad requests to the service, which then returns a fault.
Best wishes!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic