SOAP Fault

620 views
Skip to first unread message

Gary

unread,
Jul 8, 2010, 5:03:06 AM7/8/10
to Caché, Ensemble, DeepSee
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

Alex Schaefer

unread,
Jul 8, 2010, 8:18:37 AM7/8/10
to intersystems...@googlegroups.com
That second error is related to the CSP gateway, meaning it does not even reach the web service code on the server side. Something with your csp communication seems to be set up wrong. Can you access the csp gateway from your client machine (csp samples, SOAP demo, etc.)?

Hi,

Any ideas?

Cheers,
Gary

--
InterSystems: Advanced software technologies for breakthrough applications

Caché 2010.1.2 released on May 29, 2010

Gary

unread,
Jul 8, 2010, 9:15:50 AM7/8/10
to Caché, Ensemble, DeepSee
Hi Alex,

Thanks for the reply. They are both on the same machine so I'm not
sure what the issue is. I will look into the csp gateway for problems
though. The funny thing is though if no fault was thrown then the web
service was returning what was expected which lead me to believe that
the communication side of things were fine.

On 8 July, 13:18, Alex Schaefer <Alex.Schae...@intersystems.com>
wrote:
> Caché 2010.1.2 released on May 29, 2010- Hide quoted text -
>
> - Show quoted text -

OldMster

unread,
Jul 8, 2010, 2:22:44 PM7/8/10
to Caché, Ensemble, DeepSee
That error will also be generated of the code the CSP gateway calls
fails without returning any data. If the code hits an error and dies
'silently' , this error will result.
Mark

Gary

unread,
Jul 8, 2010, 4:44:37 PM7/8/10
to Caché, Ensemble, DeepSee
Yeah, this is what I thought was happening but cannot figure out why
the soap fault is not being returned. I have imported the sample code
and the same thing happens.

OldMster

unread,
Jul 8, 2010, 10:37:47 PM7/8/10
to Caché, Ensemble, DeepSee
Make sure your code doesn't change the current device - I have made
that mistake once or twice.
Mark
Reply all
Reply to author
Forward
0 new messages