Soap faultcode = Client doesn't trigger an exception in a call from client - XML SOAP
This is a discussion on Soap faultcode = Client doesn't trigger an exception in a call from client - XML SOAP ; Hi.
My question is about Soap Toolkit 3.0.
I've written a soap server that serializes a message instead of using
SoapServer30 (the reason why is off-topic). When I serialize a fault message
with FaultCode = "Server" my soap client, which ...
-
Soap faultcode = Client doesn't trigger an exception in a call from client
Hi.
My question is about Soap Toolkit 3.0.
I've written a soap server that serializes a message instead of using
SoapServer30 (the reason why is off-topic). When I serialize a fault message
with FaultCode = "Server" my soap client, which uses SoapClient30, triggers an
exception. But when I serialize a fault message with FaultCode = "Client" there
is no client side exception.
Is it by design? How can I trigger a client side exception with FaultCode =
"Client"? Should I provide a fault detail element? If yes are there guidelines
or minimal requirements so that SoapClient30 understands?
Thanks for any hint/suggestion.
Vince C.
-
Re: Soap faultcode = Client doesn't trigger an exception in a call from client
Don't know exactly what's happening but a fault code of client means there
was an error on the client. How are you triggering a client error from the
server?
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Vince C." <none@hotmail.com> wrote in message
news:utCOrsAtDHA.2148@TK2MSFTNGP12.phx.gbl...
> Hi.
>
> My question is about Soap Toolkit 3.0.
>
> I've written a soap server that serializes a message instead of using
> SoapServer30 (the reason why is off-topic). When I serialize a fault
message
> with FaultCode = "Server" my soap client, which uses SoapClient30,
triggers an
> exception. But when I serialize a fault message with FaultCode = "Client"
there
> is no client side exception.
>
> Is it by design? How can I trigger a client side exception with FaultCode
=
> "Client"? Should I provide a fault detail element? If yes are there
guidelines
> or minimal requirements so that SoapClient30 understands?
>
> Thanks for any hint/suggestion.
>
> Vince C.
>
>
-
Re: Soap faultcode = Client doesn't trigger an exception in a call from client
"Roger Wolter[MSFT]" <rwolter@online.microsoft.com> a écrit dans le message de
news:%23zyRnDDtDHA.2416@TK2MSFTNGP10.phx.gbl...
> Don't know exactly what's happening but a fault code of client means there
> was an error on the client. How are you triggering a client error from the
> server?
My question may have sounded unclear. I was wondering why an MSSoapClient30
instance triggers an exception when it receives a Soap fault message from the
server only. Like this:
var pSC = Server.CreateObject( "MSSoapClient30");
pSC.SoapInit( ... );
pSC.RemoteMethod();
If RemoteMethod() on the remote web service returns a SOAP fault message with
faultcode equal to Server, en error is raised. Whilst returning a fault message
with faultcode = "Client", no error is raised and processing goes on.
If I read Soap documentation correctly a Soap fault message with faultcode
"Server" means an error occured mostly due to server state. Faultcode "Client"
means an error was due to client, e.g. sending a wrong request.
For instance the Calc sample web service sends back to the client a fault
message with faultcode equal to "Client" when a division by zero is requested.
OTOH it sends a fault message with faultcode "Server" if it can't create Calc
object, for instance.
I think in both cases the SoapClient30 object should trigger an exception. I saw
it was not the case with my code. So I was asking the question "is it by design
or is my code wrong? or is it me?"
Does it make sense?
Vince C.
Similar Threads
-
By Application Development in forum Java
Replies: 0
Last Post: 04-17-2007, 03:29 AM
-
By Application Development in forum Perl
Replies: 0
Last Post: 03-16-2005, 07:19 PM
-
By Application Development in forum XML SOAP
Replies: 1
Last Post: 10-24-2003, 06:21 PM
-
By Application Development in forum XML SOAP
Replies: 1
Last Post: 09-16-2003, 04:43 PM
-
By Application Development in forum XML SOAP
Replies: 0
Last Post: 08-29-2003, 10:16 AM