Is this a valid SOAP fault response ..


B

BusyBoy

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

<NS1:Envelope xmlns:NS1="http://schemas.xmlsoap.org/soap/envelope/">
<NS1:Header/>
<NS1:Body>
<NS1:Fault>
<NS1:faultcode>SOAP-ENV:Server</NS1:faultcode>
<NS1:faultstring>This is an operation implementation
generated fault</NS1:faultstring>
<NS1:faultactor/>
<detail>
<NS2:CustomFault xmlns:NS2="http://www.hbos.co.uk/xmlns/
Fault">
<NS2:ExceptionName>DDiNotFoundException</
NS2:ExceptionName>
<NS2:ExceptionReason>No DDs found</NS2:ExceptionReason>
<NS2:ExceptionType>Business</NS2:ExceptionType>
<NS2:ExceptionCode>00009</NS2:ExceptionCode>
<NS2:ExceptionTrace/>
</NS2:BPMSFault>
</detail>
</NS1:Fault>
</NS1:Body>
</NS1:Envelope>

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 'http://schemas.xmlsoap.org/soap/
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.

Thanks

Rajan
 
Ad

Advertisements


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

Top