[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1065
  • Last Modified:

What is SOAP Header value in Response of WebService, when SOAP Fault occurs?

I am working with WebService client, which is running under JBOss. My WebService is running on WebLogic Server. I am getting SOAP Response in sucess scenario and everything is just fine. In Success scenario, I am getting content type as text/xml and one of elements in header as SOAPAction having value blank. In error scenario (SOAPFault), what value I should expect in header for SOAPAction?
0
mlps_umesh
Asked:
mlps_umesh
  • 2
1 Solution
 
cmalakarCommented:
SOAPAction header is meant for request... not responses..

In SOAP Fault response, you can look for SOAP Fault Element inside the body...

Also you can use "faultstring" to retrieve the human readable error.
0
 
mlps_umeshAuthor Commented:
Yes !!! That's what happens in normal scenario.

 I have written a proxy servlet which intercepts all WebService requests for routing them to appropriate WebServices on URL patterns. Servlet uses HttpClient POST method to actually invoke WebService. WebService response is validated for status code and routed back to caller. If SOAP response has SOAP Fault error, does caller (SOAP Client) expect a SOAP Fault error code or any specific information into header. When I am routing SOAP Fault request back to SOAP Client, i am getting following error on Console -

 <Handler weblogic.webservice.core.handler.CheckSoapFaultHandler threw an exception from its handleResponse method. The exception was:
jvm 1    | weblogic.utils.NestedRuntimeException - with nested exception:
jvm 1    | [java.io.IOException: The InputStream did not contain a valid SOAP message.].>

Any suggations? Where am I wrong?

Thanks,
0
 
cmalakarCommented:
>> The InputStream did not contain a valid SOAP message

This exception seems to be happening because, the client is not getting the valid response in case of faults.

Please check what is complete message that you got at servlet and what is being forwarded to client..
I think, client is not getting the correct/valid soap message.

you can refer.. the following link...

http://www.w3.org/TR/2000/NOTE-SOAP-20000508/#_Toc478383541

Which actually shows the SOAP message in case of success response and failure response (fault)
Success -- Example 7 and 9
Fault -- Example 9 & 10

SOAPMessage will contain the SOAP Fault tag incase of Faults...
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now