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 Michael Mole <mj...@us.ibm.com> on 2007/10/03 22:49:06 UTC

Axis2C: how to check for SOAP fault

How can I check for a SOAP fault using my ret_node in the following 
statement:
axiom_node_t *ret_node = NULL;
ret_node =  axis2_svc_client_send_receive_with_op_qname( svc_client, env, 
op_qname, payload);

Should I check the node type?

Thanks,
Mike

Michael J Molé
Software Engineer
IBM Software Group - Rational
(781)676-2710

Re: Axis2C: how to check for SOAP fault

Posted by Stefano Pettini <sp...@users.sourceforge.net>.
Samisa Abeysinghe wrote:
> Stefano Pettini wrote:
>> Hi,
>>
>> there is a "axis2_svc_client_get_last_response_has_fault", but 
>> doesn't seem to work well (or, probably, I'm using it in the wrong 
>> way). Fault received from Java JAX-WS implementations are detected, 
>> while faults received from Axis2/C servers are not.
>>
>> Here's my piece of code. Don't consider it correct, as I just said, 
>> sometimes works, sometimes not:
> hmm, this is a strange error.
> Could you please capture the SOAP messages that it works for and not 
> work for and send those. That may help  identify the problem. I 
> suppose there is something wrong with the SOAP versions in use, but 
> that is only a guess.
>
> Samisa...
>
Filed AXIS2C-715.

Thank you.
Stefano.


---------------------------------------------------------------------
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: how to check for SOAP fault

Posted by Samisa Abeysinghe <sa...@gmail.com>.
Stefano Pettini wrote:
> Hi,
>
> there is a "axis2_svc_client_get_last_response_has_fault", but doesn't 
> seem to work well (or, probably, I'm using it in the wrong way). Fault 
> received from Java JAX-WS implementations are detected, while faults 
> received from Axis2/C servers are not.
>
> Here's my piece of code. Don't consider it correct, as I just said, 
> sometimes works, sometimes not:
hmm, this is a strange error.
Could you please capture the SOAP messages that it works for and not 
work for and send those. That may help  identify the problem. I suppose 
there is something wrong with the SOAP versions in use, but that is only 
a guess.

Samisa...
>
>    response = axis2_svc_client_send_receive(axClient, axEnv, xml);
>
>    if (response)
>    {
>        if (axis2_svc_client_get_last_response_has_fault(axClient, axEnv))
>        {
>
>         FAULT
>
> Bye.
>
> PS.
> I'm back !! I had email problems, and I still have them, but I've 
> found a magic workaround :-)
>
> Stefano
>
> Michael Mole wrote:
>>
>> How can I check for a SOAP fault using my ret_node in the following 
>> statement:
>> axiom_node_t *ret_node = NULL;
>> ret_node =  axis2_svc_client_send_receive_with_op_qname( svc_client, 
>> env, op_qname, payload);
>>
>> Should I check the node type?
>>
>> Thanks,
>> Mike
>>
>> Michael J Molé
>> Software Engineer
>> IBM Software Group - Rational
>> (781)676-2710 
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-user-help@ws.apache.org
>
>


-- 
Samisa Abeysinghe - Apche Axis2/C
"http://ws.apache.org/axis2/c/?Apache&nbsp;Axis2/C&nbsp;The&nbsp;Web&nbsp;Services&nbsp;Engine"


---------------------------------------------------------------------
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: how to check for SOAP fault

Posted by Stefano Pettini <sp...@users.sourceforge.net>.
Hi,

there is a "axis2_svc_client_get_last_response_has_fault", but doesn't 
seem to work well (or, probably, I'm using it in the wrong way). Fault 
received from Java JAX-WS implementations are detected, while faults 
received from Axis2/C servers are not.

Here's my piece of code. Don't consider it correct, as I just said, 
sometimes works, sometimes not:

    response = axis2_svc_client_send_receive(axClient, axEnv, xml);

    if (response)
    {
        if (axis2_svc_client_get_last_response_has_fault(axClient, axEnv))
        {

         FAULT

Bye.

PS.
I'm back !! I had email problems, and I still have them, but I've found 
a magic workaround :-)

Stefano

Michael Mole wrote:
>
> How can I check for a SOAP fault using my ret_node in the following 
> statement:
> axiom_node_t *ret_node = NULL;
> ret_node =  axis2_svc_client_send_receive_with_op_qname( svc_client, 
> env, op_qname, payload);
>
> Should I check the node type?
>
> Thanks,
> Mike
>
> Michael J Molé
> Software Engineer
> IBM Software Group - Rational
> (781)676-2710 

---------------------------------------------------------------------
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: how to check for SOAP fault

Posted by Samisa Abeysinghe <sa...@wso2.com>.
Michael Mole wrote:
>
> How can I check for a SOAP fault using my ret_node in the following 
> statement:
> axiom_node_t *ret_node = NULL;
> ret_node =  axis2_svc_client_send_receive_with_op_qname( svc_client, 
> env, op_qname, payload);
>
> Should I check the node type?
You can use the function:
axis2_svc_client_get_last_response_has_fault(svc_client, env)

It returns true if there is a fault.

Samisa...

-- 
Samisa Abeysinghe : WSO2 WSF/PHP
"http://wso2.org/projects/wsf/php?WSO2&nbsp;Web&nbsp;Services&nbsp;Framework%2FPHP&nbsp;-&nbsp;Open&nbsp;source&nbsp;PHP&nbsp;extention&nbsp;for&nbsp;providing&nbsp;and&nbsp;consuming&nbsp;Web&nbsp;services&nbsp;in&nbsp;PHP"


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