Sending faults from server

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Sending faults from server

Ian H
Linux Mandrake 10.0
 
I've got a web service that needs to send a fault back under some
conditions.
 
It appears that the sample files for version 1.5 don't work, and neither
does my app (undeclared namespace prefix in the fault message).  I suspect
this may be a bug, since the sample doclitfault fails in the same way as my
webserver.  The server send back an invalid fault message and the client
segfaults on it.
 
I asked this question on the dev list, but don't know if it got through... I
don't see a record of it, and haven't had a response.
 
Assuming this is a bug, is there a workaround?  I'd like to be able to send
a message back to the client with some informative text, plus an error code
if possible.
 
Thanks
Ian Harder
 
P.S.  For reference, here are the doclitfault request and fault messages.
Note the undeclared prefix ns1 in the fault detail.

---request---
POST /axis/doclitfault HTTP/1.1
Host: localhost:80
Content-Type: text/xml; charset=UTF-8
SOAPAction: "doclitfault#div"
Content-Length: 387

<?xml version='1.0' encoding='utf-8' ?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Body>
<ns1:div xmlns:ns1="http://soapinterop.org">
<ns1:arg_0_0>2</ns1:arg_0_0>
<ns1:arg_1_0>0</ns1:arg_1_0>
</ns1:div>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

---fault---
HTTP/1.1 200 OK
Date: Thu, 05 May 2005 20:31:26 GMT
Server: Apache-AdvancedExtranetServer/2.0.48 (Mandrake Linux/6.8.100mdk)
mod_ssl/2.0.48 OpenSSL/0.9.7c PHP/4.3.4
Content-Length: 633
Content-Type: text/xml

<?xml version='1.0' encoding='utf-8' ?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>AxisC++ Faultcode</faultcode>
<faultstring>Custom Out of bound exception</faultstring>
<faultactor>server name:listen port</faultactor>
<detail><DivByZeroStruct><ns1:varString>Division by zero
exception</ns1:varString>
<ns1:varInt>1</ns1:varInt>
<ns1:varFloat>10.520000</ns1:varFloat>
</DivByZeroStruct>
</detail>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Reply | Threaded
Open this post in threaded view
|

Re: Sending faults from server

Samisa Abeysinghe
This seems to be a bug. SOAP faults on the server side are not well
tested. On client side, there has been some testing. I also have come
across in the past, where the server sends faults in invalid formats.
Hence, this needs be fixed.

Samisa...

On Thu, 2005-05-05 at 20:35, Ian Harder wrote:

> Linux Mandrake 10.0
>  
> I've got a web service that needs to send a fault back under some
> conditions.
>  
> It appears that the sample files for version 1.5 don't work, and neither
> does my app (undeclared namespace prefix in the fault message).  I suspect
> this may be a bug, since the sample doclitfault fails in the same way as my
> webserver.  The server send back an invalid fault message and the client
> segfaults on it.
>  
> I asked this question on the dev list, but don't know if it got through... I
> don't see a record of it, and haven't had a response.
>  
> Assuming this is a bug, is there a workaround?  I'd like to be able to send
> a message back to the client with some informative text, plus an error code
> if possible.
>  
> Thanks
> Ian Harder
>  
> P.S.  For reference, here are the doclitfault request and fault messages.
> Note the undeclared prefix ns1 in the fault detail.
>
> ---request---
> POST /axis/doclitfault HTTP/1.1
> Host: localhost:80
> Content-Type: text/xml; charset=UTF-8
> SOAPAction: "doclitfault#div"
> Content-Length: 387
>
> <?xml version='1.0' encoding='utf-8' ?>
> <SOAP-ENV:Envelope
> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <SOAP-ENV:Body>
> <ns1:div xmlns:ns1="http://soapinterop.org">
> <ns1:arg_0_0>2</ns1:arg_0_0>
> <ns1:arg_1_0>0</ns1:arg_1_0>
> </ns1:div>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
>
> ---fault---
> HTTP/1.1 200 OK
> Date: Thu, 05 May 2005 20:31:26 GMT
> Server: Apache-AdvancedExtranetServer/2.0.48 (Mandrake Linux/6.8.100mdk)
> mod_ssl/2.0.48 OpenSSL/0.9.7c PHP/4.3.4
> Content-Length: 633
> Content-Type: text/xml
>
> <?xml version='1.0' encoding='utf-8' ?>
> <SOAP-ENV:Envelope
> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <SOAP-ENV:Body>
> <SOAP-ENV:Fault>
> <faultcode>AxisC++ Faultcode</faultcode>
> <faultstring>Custom Out of bound exception</faultstring>
> <faultactor>server name:listen port</faultactor>
> <detail><DivByZeroStruct><ns1:varString>Division by zero
> exception</ns1:varString>
> <ns1:varInt>1</ns1:varInt>
> <ns1:varFloat>10.520000</ns1:varFloat>
> </DivByZeroStruct>
> </detail>
> </SOAP-ENV:Fault>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
--
Samisa Abeysinghe <[hidden email]>
Virtusa Corporation
Reply | Threaded
Open this post in threaded view
|

RE: Sending faults from server

Ian H
Thanks Samisa,

So... is there a work-around of some kind?  I'd like to put this in
production in the project I'm working on, but need to be able to send back
faults.

Is a better approach to use Java Axis for the server?

Thanks,
Ian

-----Original Message-----
From: Samisa Abeysinghe [mailto:[hidden email]]
Sent: May 6, 2005 2:16 AM
To: Apache AXIS C User List
Subject: Re: Sending faults from server

This seems to be a bug. SOAP faults on the server side are not well
tested. On client side, there has been some testing. I also have come
across in the past, where the server sends faults in invalid formats.
Hence, this needs be fixed.

Samisa...

On Thu, 2005-05-05 at 20:35, Ian Harder wrote:
> Linux Mandrake 10.0
>  
> I've got a web service that needs to send a fault back under some
> conditions.
>  
> It appears that the sample files for version 1.5 don't work, and neither
> does my app (undeclared namespace prefix in the fault message).  I suspect
> this may be a bug, since the sample doclitfault fails in the same way as
my
> webserver.  The server send back an invalid fault message and the client
> segfaults on it.
>  
> I asked this question on the dev list, but don't know if it got through...
I
> don't see a record of it, and haven't had a response.
>  
> Assuming this is a bug, is there a workaround?  I'd like to be able to
send
> a message back to the client with some informative text, plus an error
code

> if possible.
>  
> Thanks
> Ian Harder
>  
> P.S.  For reference, here are the doclitfault request and fault messages.
> Note the undeclared prefix ns1 in the fault detail.
>
> ---request---
> POST /axis/doclitfault HTTP/1.1
> Host: localhost:80
> Content-Type: text/xml; charset=UTF-8
> SOAPAction: "doclitfault#div"
> Content-Length: 387
>
> <?xml version='1.0' encoding='utf-8' ?>
> <SOAP-ENV:Envelope
> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <SOAP-ENV:Body>
> <ns1:div xmlns:ns1="http://soapinterop.org">
> <ns1:arg_0_0>2</ns1:arg_0_0>
> <ns1:arg_1_0>0</ns1:arg_1_0>
> </ns1:div>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
>
> ---fault---
> HTTP/1.1 200 OK
> Date: Thu, 05 May 2005 20:31:26 GMT
> Server: Apache-AdvancedExtranetServer/2.0.48 (Mandrake Linux/6.8.100mdk)
> mod_ssl/2.0.48 OpenSSL/0.9.7c PHP/4.3.4
> Content-Length: 633
> Content-Type: text/xml
>
> <?xml version='1.0' encoding='utf-8' ?>
> <SOAP-ENV:Envelope
> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <SOAP-ENV:Body>
> <SOAP-ENV:Fault>
> <faultcode>AxisC++ Faultcode</faultcode>
> <faultstring>Custom Out of bound exception</faultstring>
> <faultactor>server name:listen port</faultactor>
> <detail><DivByZeroStruct><ns1:varString>Division by zero
> exception</ns1:varString>
> <ns1:varInt>1</ns1:varInt>
> <ns1:varFloat>10.520000</ns1:varFloat>
> </DivByZeroStruct>
> </detail>
> </SOAP-ENV:Fault>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
--
Samisa Abeysinghe <[hidden email]>
Virtusa Corporation

Reply | Threaded
Open this post in threaded view
|

RE: Sending faults from server

Samisa Abeysinghe
In reply to this post by Ian H
Hi Ian,
        I do not think there is a workaround unless we fix this bug.
Hopefully we will be able to fix this in 1.6 releases. In the mean time,
it is not a bad idea to use Axis Java for server side as the C++ client
side is well tested and is interoperating with Java well.
        I could look to fix this bug, but will take some time. (Do we
have a Jira on this already?)

Thanks,
Samisa...

-----Original Message-----
From: Ian Harder [mailto:[hidden email]]
Sent: Saturday, May 07, 2005 3:02 AM
To: 'Apache AXIS C User List'
Subject: RE: Sending faults from server

Thanks Samisa,

So... is there a work-around of some kind?  I'd like to put this in
production in the project I'm working on, but need to be able to send
back
faults.

Is a better approach to use Java Axis for the server?

Thanks,
Ian

-----Original Message-----
From: Samisa Abeysinghe [mailto:[hidden email]]
Sent: May 6, 2005 2:16 AM
To: Apache AXIS C User List
Subject: Re: Sending faults from server

This seems to be a bug. SOAP faults on the server side are not well
tested. On client side, there has been some testing. I also have come
across in the past, where the server sends faults in invalid formats.
Hence, this needs be fixed.

Samisa...

On Thu, 2005-05-05 at 20:35, Ian Harder wrote:
> Linux Mandrake 10.0
>  
> I've got a web service that needs to send a fault back under some
> conditions.
>  
> It appears that the sample files for version 1.5 don't work, and
neither
> does my app (undeclared namespace prefix in the fault message).  I
suspect
> this may be a bug, since the sample doclitfault fails in the same way
as
my
> webserver.  The server send back an invalid fault message and the
client
> segfaults on it.
>  
> I asked this question on the dev list, but don't know if it got
through...
I
> don't see a record of it, and haven't had a response.
>  
> Assuming this is a bug, is there a workaround?  I'd like to be able to
send
> a message back to the client with some informative text, plus an error
code
> if possible.
>  
> Thanks
> Ian Harder
>  
> P.S.  For reference, here are the doclitfault request and fault
messages.

> Note the undeclared prefix ns1 in the fault detail.
>
> ---request---
> POST /axis/doclitfault HTTP/1.1
> Host: localhost:80
> Content-Type: text/xml; charset=UTF-8
> SOAPAction: "doclitfault#div"
> Content-Length: 387
>
> <?xml version='1.0' encoding='utf-8' ?>
> <SOAP-ENV:Envelope
> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <SOAP-ENV:Body>
> <ns1:div xmlns:ns1="http://soapinterop.org">
> <ns1:arg_0_0>2</ns1:arg_0_0>
> <ns1:arg_1_0>0</ns1:arg_1_0>
> </ns1:div>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
>
> ---fault---
> HTTP/1.1 200 OK
> Date: Thu, 05 May 2005 20:31:26 GMT
> Server: Apache-AdvancedExtranetServer/2.0.48 (Mandrake
Linux/6.8.100mdk)

> mod_ssl/2.0.48 OpenSSL/0.9.7c PHP/4.3.4
> Content-Length: 633
> Content-Type: text/xml
>
> <?xml version='1.0' encoding='utf-8' ?>
> <SOAP-ENV:Envelope
> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <SOAP-ENV:Body>
> <SOAP-ENV:Fault>
> <faultcode>AxisC++ Faultcode</faultcode>
> <faultstring>Custom Out of bound exception</faultstring>
> <faultactor>server name:listen port</faultactor>
> <detail><DivByZeroStruct><ns1:varString>Division by zero
> exception</ns1:varString>
> <ns1:varInt>1</ns1:varInt>
> <ns1:varFloat>10.520000</ns1:varFloat>
> </DivByZeroStruct>
> </detail>
> </SOAP-ENV:Fault>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
--
Samisa Abeysinghe <[hidden email]>
Virtusa Corporation