You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by Gordon Brown <go...@yahoo.com> on 2010/11/23 00:16:57 UTC

set operation name in axis2/c client

Hi All, 

 Is there a way to set the operation name in the axis2/c client?

I have the following piece of code that has been working for me:

=====================
_wsf_service_client = axis2_svc_client_create(_env, client_home); 
axis2_endpoint_ref_t *endpoint_ref = axis2_endpoint_ref_create(_env, 
m_endpointAddr);
/* Setup options */_options = axis2_options_create(_env);
axis2_options_set_to(_options, _env, endpoint_ref);
axis2_options_set_soap_version(_options, _env, AXIOM_SOAP11);
axis2_options_set_enable_rest(_options, _env, AXIS2_FALSE); 
status = axis2_options_set_soap_action(_options, _env, soap_action);     <== 
setting soapAction
.....axiom_node_t * node = axis2_svc_client_send_receive(_wsf_service_client, 
_env, firstChild);
......
=====================
 
But now that I have a WSDL that defines NO soapAction. I wonder if I need to 
send the operation name over together with the request. But then I noticed that 
I don't seem to have an API to set the operation name to the options.
 
Thanks in advance!
G


      

Sending and Receiving binary data over the wire

Posted by ramesh Gopal <fa...@yahoo.com>.
Hello,

Does anybody have a sample prototype of sending and receiving binary data over wire using AXIS2C apis ?
I went through the docs from http://wso2.org/library/articles/sending-receiving-attachments-axis2-c, and did a sample implementation, but it doesn't seem to work.

I set the MTOMenable flag to true in axis2.xml file and it worked.

However, my requirement is :

1) Client sends a file attachment over the wire (ofcourse with binary data in-line using MTOM)
2) On Axis layer, I retrieve the data and push this data into a file
3) The MTOMenable flag must not be used/ set to false

Pls help me with this.

Rgds,
Ramesh



Re: set operation name in axis2/c client

Posted by Nandika Jayawardana <ja...@gmail.com>.
Even if your wsdl does not define a soap action, soap body dispatching could
still find the operation.

Regards
Nandika

On Tue, Nov 23, 2010 at 4:46 AM, Gordon Brown <go...@yahoo.com>wrote:

> Hi All,
>
>  Is there a way to set the operation name in the axis2/c client?
>
> I have the following piece of code that has been working for me:
>
>
> =====================
>
> _wsf_service_client = axis2_svc_client_create(_env, client_home);
>
>
>
> axis2_endpoint_ref_t *endpoint_ref = axis2_endpoint_ref_create(_env,
> m_endpointAddr);
>
>
>
> /* Setup options */
>
> _options = axis2_options_create(_env);
>
> axis2_options_set_to(_options, _env, endpoint_ref);
>
> axis2_options_set_soap_version(_options, _env, AXIOM_SOAP11);
>
> axis2_options_set_enable_rest(_options, _env, AXIS2_FALSE);
>
>
>
> status = axis2_options_set_soap_action(_options, _env, soap_action);
> <== setting soapAction
>
> .....
>
> axiom_node_t * node = axis2_svc_client_send_receive(_wsf_service_client,
> _env, firstChild);
>
> ......
>
> =====================
>
>
>
> But now that I have a WSDL that defines NO soapAction. I wonder if I need
> to send the operation name over together with the request. But then I
> noticed that I don't seem to have an API to set the operation name to the
> options.
>
>
>
> Thanks in advance!
> G
>
>
>
>