axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Juan Amat <>
Subject Fault handling and misc questions
Date Fri, 29 Sep 2006 20:45:53 GMT
Hi all,

I have been playing (read evaluating) with AXIS C++ 1.6 and I have seen,
what seems to me, incorrect SOAP messages when  a  'user defined' 
exception is
(I was first using the official 1.6b version but there was more issues 
so I took
a snapshot from 09/20/06. OS is Solaris 10)

Here is such a message:

<?xml version='1.0' encoding='utf-8' ?>
<faultcode>AxisC++ Faultcode</faultcode>
<faultstring>Custom Out of bound exception</faultstring>
<faultactor>server name:listen port</faultactor>
<detail><fault xmlns:ns1="AMSMib.xsd  "><ns1:code>2</ns1:code>
<ns1:reason>Obj Not found</ns1:reason>

In my wsdl file the fault message is defined as:

   <wsdl:message name="fault">
       <wsdl:part name="body" element="ams:Fault"/>

So for me this part of the SOAP message contains 3 errors:
<fault xmlns:ns1="AMSMib.xsd  ">
1) 'fault' should be 'Fault'
2) the namespace is missing, ie, it should be ns1:Fault (and maybe this
error is a consequence of the first one)
3) extra space characters are inserted in the name space.

What makes me say that this is incorrect, is that the same fault with 
AXIS Java is:
<ns1:Fault xmlns:ns1="AMSMib.xsd"><ns1:code>2</ns1:code>
<ns1:reason>Obj Not found</ns1:reason>

Am I missing something ? Is is a known issue ? And if so, is there a 
workaround ?

This was the 'fault handling' part. Now the 'misc questions'.
- I have noticed that AXIS C++ (server side) is perfectly happy if all the
parameters needed to call my service can be retrieved from the SOAP 
message, even
if the SOAP message is not a valid XML message. To make it more clear, 
if I send
a SOAP message without the closing tags for the 'Body' or 'Envelope', I 
do get a
proper response from my service.
Is this behavior a 'feature' or a 'bug' ?
- Is there a way to have an 'handler' called when my service throws an 
error ?
I mean something similar to the responseFlow (my objectives is to log 
all the
- has anybody successfully used the SoapDeSerializer::getBodyAsChar() 
method ?
Same question with SoapDeSerializer::setNewSoapBody(). (i do have some 
doubts about
this one after looking at the code as the 'DeSerializerMemBufInputStream 
stream', that
is fed to the parser, is a local variable that will be destroyed when 
the method returns)

Thank you,

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message