Discussion:
How can I set parameter's type?
WangJ
2013-07-07 00:57:44 UTC
Permalink
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!
Rajika Kumarasiri
2013-07-10 05:30:22 UTC
Permalink
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
Post by WangJ
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.
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!
WangJ
2013-07-14 15:07:51 UTC
Permalink
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!

Loading...