axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ramesh Gopal <>
Subject How do I embed code to add soap:Envelope and soap:Body within a C client ???
Date Wed, 25 Mar 2009 12:00:29 GMT


I am wanting to consume a web service (GetPrimeNumbers).

In order to do this, I have written a sample C code, which generates the xml request. However,
while sending the request, I get an error 

"System.Web.Services.Protocols.SoapException: Server was unable to process request. ---&gt;
System.ArgumentOutOfRangeException: Length cannot be less than zero"

What could be the reason for this error ?

My request node looks like:
<ns0:GetPrimeNumbers xmlns:ns0="">

However, I think it should look like :

<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap=""
xmlns:tns="" xmlns:xs="">

How do I modify the source code to send the soap:body and soap:envelope

Code listing :
tns = axiom_namespace_create(env, "", "tns");
    echo_om_ele = axiom_element_create(env, NULL, "GetPrimeNumbers", tns, &echo_om_node);
    text_om_ele = axiom_element_create(env, echo_om_node, "max", tns, &text_om_node);
    axiom_element_set_text(text_om_ele, env, "10", text_om_node);
return echo_om_node;


      Add more friends to your messenger and enjoy! Go to

View raw message