Is this a valid SOAP fault response ..



Is the following a valid SOAP Response for a SOAP Fault ?
I am getting a response as shown

<NS1:Envelope xmlns:NS1="">
<NS1:faultstring>This is an operation implementation
generated fault</NS1:faultstring>
<NS2:CustomFault xmlns:NS2="
<NS2:ExceptionReason>No DDs found</NS2:ExceptionReason>

The above is the response which we are getting from SOAPUI .

Whenever a soapexception is being thrown in my consumer code I am
expecting the excpeiton to be caught as an SoapException object and
not as an exception object.

see the code below :

catch (SoapException soap)
int i;
i = 0;
catch (Exception e)
int i;
i = 0;

Here the above fault comes to the second block i.e. ( Exception e).

The exception shown is

"Start element 'faultcode' from namespace '' expected. Found element
'NS1:faultcode' from namespace '
envelope/'. Line 2, position 118."

Is this a problem because the SoapFault has ns1 prefixed. I would have
though ASP.Net can take care of the NS1 prefixing.




Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question