Hi,
I am trying to return a SOAP Fault from a web service, I am working
with the example in the documentation in the Web Services QuickStart
Tutorial.
If my web service does a "do ..ReturnFault(fault)" in the case of an
error then I can see the SOAP Fault if I call the WebMethod from
within the same namespace, however if I call it from another namespace
via a Web Service client then the SOAP Fault is different and my
original values set in the fault created in the web service are not
sent.
For example, if I call the web method from within the same namespace
in Terminal I get the correct SOAP Fault:
<?xml version='1.0' encoding='UTF-8' standalone='no' ?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV='
http://schemas.xmlsoap.org/soap/
envelope/' xmlns:xsi='
http://www.w3.org/2001/XMLSchema-instance'
xmlns:s='
http://www.w3.org/2001/XMLSchema' >
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:ContactNotFound</faultcode>
<faultstring>application error</faultstring>
<detail>Contact with id 100 could not be found!</detail>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
ztrap "SOAP" }
^
<ZSOAP>zReturnFault+3^SOAPTutorial.SOAPService.1
but when I call it from the Web Service Client in a different
namespace I get:
ERROR #6248: SOAP response is a SOAP fault: faultcode=Server
faultstring=CSP Gateway Error (version:2009.1.1.504.0 build:901.1081f)
faultactor=
detail=
<error xmlns="
http://tempuri.org">
<special>
Server Program Error
</special>
<text>
The Server-side program did not return any data
</text>
</error>
Looking though TCP Trace this is the fault returned from the Web
Service so that must be where the issue resides but I can't figure out
why the SOAP Fault I have generated changes to the second one.
Any ideas?
Cheers,
Gary