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 WangJ <wj...@hotmail.com> on 2013/07/07 02:57:44 UTC
How can I set parameter's type?
Hi.
I use AXIS2C V0.96 invoke the service that has been encapsulated by Tuscany SCA M3. The service only accept float type parameter. I don't know how to send a float type parameter in client. The received parameter's type of the service is always string type.
The request's code is:axiom_node_t *build_om_request(const axis2_env_t *env){ axiom_node_t* greet_om_node = NULL; axiom_element_t * greet_om_ele = NULL; axiom_node_t* arg0_node = NULL; axiom_element_t * arg0_ele = NULL; axiom_node_t* arg1_node = NULL; axiom_element_t * arg1_ele = NULL;
greet_om_ele = axiom_element_create(env, NULL, "add", NULL, &greet_om_node); arg0_ele = axiom_element_create(env, greet_om_node, "arg0", NULL, &arg0_node); arg1_ele = axiom_element_create(env, greet_om_node, "arg1", NULL, &arg1_node); AXIOM_ELEMENT_SET_TEXT(arg0_ele, env, "12.0", arg0_node); AXIOM_ELEMENT_SET_TEXT(arg1_ele, env, "23.0", arg1_node);
return greet_om_node;}
Thanks!
RE: How can I set parameter's type?
Posted by WangJ <wj...@hotmail.com>.
I have look the echo and math examples. The parameter's type is string in these examples. Interger parameter is converted string type, then is sent to service.
Thanks!
Re: How can I set parameter's type?
Posted by Rajika Kumarasiri <ra...@gmail.com>.
What's the SOAP message that's required by the service ? Just construct the
required message using axiom api. Take a look at the echo and math
examples.
Rajika
On Sat, Jul 6, 2013 at 8:57 PM, WangJ <wj...@hotmail.com> wrote:
> Hi.
>
> I use AXIS2C V0.96 invoke the service that has been encapsulated by
> Tuscany SCA M3. The service only accept float type parameter. I don't know
> how to send a float type parameter in client. The received parameter's
> type of the service is always string type.
>
> The request's code is:
> axiom_node_t *
> build_om_request(const axis2_env_t *env)
> {
> axiom_node_t* greet_om_node = NULL;
> axiom_element_t * greet_om_ele = NULL;
> axiom_node_t* arg0_node = NULL;
> axiom_element_t * arg0_ele = NULL;
> axiom_node_t* arg1_node = NULL;
> axiom_element_t * arg1_ele = NULL;
>
> greet_om_ele = axiom_element_create(env, NULL, "add", NULL,
> &greet_om_node);
> arg0_ele = axiom_element_create(env, greet_om_node, "arg0", NULL,
> &arg0_node);
> arg1_ele = axiom_element_create(env, greet_om_node, "arg1", NULL,
> &arg1_node);
> AXIOM_ELEMENT_SET_TEXT(arg0_ele, env, "12.0", arg0_node);
> AXIOM_ELEMENT_SET_TEXT(arg1_ele, env, "23.0", arg1_node);
>
> return greet_om_node;
> }
>
> Thanks!
>