You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-user@axis.apache.org by Krankurs Leonid <lk...@ford.com> on 2006/09/27 01:52:47 UTC

axis2c 0.93, fault processing

Hi,

i am using axis2c 0.93 ... 

the response from the server has a fault:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
  xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
 xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soapenv:Header/>
    <soapenv:Body>
          <soapenv:Fault>
             <faultcode>soapenv:Server.generalException</faultcode>
             <faultstring><![CDATA[org.xml.sax.SAXParseException: 
                The content of elements must consist of well-formed
character data or markup. 
                  Message being parsed: ]]>
             </faultstring>
          </soapenv:Fault>
    </soapenv:Body>
</soapenv:Envelope>


i did follow      axis2c-src-0.93\axiom\test\soap\test_soap.c



1. checked for presence of the fault 

AXIOM_SOAP_BODY_HAS_FAULT(body, env) 

returned true - expected


2. got the fault object

axiom_soap_fault_t* fault = AXIOM_SOAP_BODY_GET_FAULT(body, env); 

returns non-NULL - expected


3. tried to get the fault code

axiom_soap_fault_code* code = AXIOM_SOAP_FAULT_GET_CODE(fault, env);

returned NULL - not expected 


3.1 tried 

axiom_soap_fault_node* node = AXIOM_SOAP_FAULT_GET_NODE(fault, env);

returned NULL - not expected


4. What method of what axis object is to call to get the content of
<faultstring>


5. All other methods of axiom_soap_fault_t*
like

axiom_soap_fault_detail* detail = AXIOM_SOAP_FAULT_GET_DETAIL(fault, env);

axis2_char_t* exception = AXIOM_SOAP_FAULT_GET_EXCEPTION(fault, env);

returned NULL


PLease help!


Best regards,
Leonid
-- 
View this message in context: http://www.nabble.com/axis2c-0.93%2C-fault-processing-tf2341903.html#a6518189
Sent from the Axis - C++ - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


Re: axis2c 0.93, fault processing

Posted by Nandika Jayawardana <ja...@gmail.com>.
Hi Krankurs,
we have a soap12 model in axis2c and when processing soap11 , soap11 fault
is maped in to a soap12 fault and faultstring part is stored in
fault_reason's text.

Thanks
nandika

On 9/28/06, Dinesh Premalal <xy...@gmail.com> wrote:
>
> Hi Krankurs,
>
> Please see my comments inline...
>
> axiom_soap_fault_code* code = AXIOM_SOAP_FAULT_GET_CODE(fault, env);
> >
> > returned NULL - not expected
>
>
> There was a bug in the soap_builder, now it fixed. Please get a new
> checkout and
> try.
>
>
> > 4. What method of what axis object is to call to get the content of
> > <faultstring>
>
>
>
> You could use , following code  snippet ...
>
> > <snippet>
> >  reason = AXIOM_SOAP_FAULT_GET_REASON (soap_fault, env);
> >  reason_text = AXIOM_SOAP_FAULT_REASON_GET_FIRST_SOAP_FAULT_TEXT
> > (reason, env);
> >  value_text = AXIOM_SOAP_FAULT_TEXT_GET_TEXT (reason_text, env);
> > </snippet>
> >
>
> we recently fixed number of bugs in soap handling , I would recommend you
> to try with the latest source.
>
> We appreciate your interest in Axis2c!
>
> thanks,
> Dinesh
>
>
>
> --
> W.Dinesh Premalal
> http://xydinesh.blogspot.com/

Re: axis2c 0.93, fault processing

Posted by Dinesh Premalal <xy...@gmail.com>.
Hi Krankurs,

Please see my comments inline...

axiom_soap_fault_code* code = AXIOM_SOAP_FAULT_GET_CODE(fault, env);
>
> returned NULL - not expected


There was a bug in the soap_builder, now it fixed. Please get a new checkout
and
try.


> 4. What method of what axis object is to call to get the content of
> <faultstring>



You could use , following code  snippet ...

> <snippet>
>  reason = AXIOM_SOAP_FAULT_GET_REASON (soap_fault, env);
>  reason_text = AXIOM_SOAP_FAULT_REASON_GET_FIRST_SOAP_FAULT_TEXT (reason,
> env);
>  value_text = AXIOM_SOAP_FAULT_TEXT_GET_TEXT (reason_text, env);
> </snippet>
>

we recently fixed number of bugs in soap handling , I would recommend you to
try with the latest source.

We appreciate your interest in Axis2c!

thanks,
Dinesh



-- 
W.Dinesh Premalal
http://xydinesh.blogspot.com/