axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rico M <>
Subject Modifying envelope of Axis
Date Mon, 19 Jul 2010 14:35:46 GMT

I am trying to modify the SOAP envelope generated by Axis. What i need to do
is add some name spaces to it.

   <soap:Envelope xmlns:xsi=""
xmlns:xsd="" xmlns:soap="">

I tried to add the name spaces to it via the following call :

    axiom_node_t* greet_om_node = NULL;
    axiom_element_t * greet_om_ele = NULL;
    axiom_namespace_t *ns0=NULL,*ns2 = NULL,*ns3 = NULL;

   ns0 =axiom_namespace_create(env,
   ns2 =axiom_namespace_create(env, "", "xsi");
   ns3 =axiom_namespace_create(env, "",

    greet_om_ele = axiom_element_create(env, NULL, "greet", ns0,
    axiom_element_declare_namespace(greet_om_ele, env, greet_om_node, ns2);
    axiom_element_declare_namespace(greet_om_ele, env, greet_om_node, ns3);
    axiom_element_set_text(greet_om_ele, env, "Hello Server!",

This however adds it to the element. i.e. :

<soap:Envelope xmlns:soap=""><soap:Body><soap:greet
xmlns:xsi="" xmlns:xsd="">Hello

Can you please suggest what is wrong above?


View raw message