I have tried to generate the client stub using WSDL2C tool
for a wsdl at http://www50.brinkster.com/vbfacileinpt/np.asmx?wsdl

This tool generates two files (.c and .h files)

The .c file is the one which gets the request and returns the response.
However, both request and response is a node type, and hence my guess is  that 
we will need to send an xml request to the same.

I havent modified the xml request yet (I do not know what is a valid request 
that needs to be sent to this service)

<ns0:GetPrimeNumbers xmlns:ns0="http://microsoft.com/webservices";>
<ns0:max>23</ns0:max>
</ns0:GetPrimeNumbers>

but I get the same error ....

Can somebody point out what could be going wrong ?


Ramesh.



--- On Wed, 25/3/09, ramesh Gopal <[email protected]> wrote:

> From: ramesh Gopal <[email protected]>
> Subject: Re: How do I embed code to add soap:Envelope and soap:Body within a 
> C client ???
> To: "Apache AXIS C User List" <[email protected]>
> Date: Wednesday, 25 March, 2009, 7:02 PM
> Hi,
> 
> Attached the sample C client .
> 
> 
> Rgds,
> Ramesh
> 
> 
> --- On Wed, 25/3/09, Samisa Abeysinghe <[email protected]>
> wrote:
> 
> > From: Samisa Abeysinghe <[email protected]>
> > Subject: Re: How do I embed code to add soap:Envelope
> and soap:Body within a C client ???
> > To: "Apache AXIS C User List" <[email protected]>
> > Date: Wednesday, 25 March, 2009, 6:50 PM
> > Can you please send the full client
> > code that you are using?
> > 
> > Samisa...
> > 
> > ramesh Gopal wrote:
> > > Hi,
> > >
> > > 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="http://microsoft.com/webservices";>
> > > <ns0:max>23</ns0:max>
> > > </ns0:GetPrimeNumbers>
> > >
> > > However, I think it should look like :
> > >
> > > <?xml version="1.0" encoding="UTF-8"?>
> > > <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";
> > > xmlns:tns="http://www50.brinkster.com/vbfacileinpt/np";
> > xmlns:xs="http://www.w3.org/2001/XMLSchema";>
> > > <soap:Body>
> > > <tns:GetPrimeNumbers>
> > > <tns:Max>10</tns:Max>
> > > </tns:GetPrimeNumbers>
> > > </soap:Body>
> > > </soap:Envelope>
> > >
> > > How do I modify the source code to send the
> soap:body
> > and soap:envelope
> > >
> > > Code listing :
> > > --------------
> > > tns = axiom_namespace_create(env, "http://microsoft.com/webservices";, 
> > > "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;
> > >
> > >
> > > Rgds,
> > > Ramesh.
> > >
> > >
> > >
> > >       Add more friends to
> > your messenger and enjoy! Go to http://messenger.yahoo.com/invite/
> > >   
> > >
> >
> ------------------------------------------------------------------------
> > >
> > >
> > > Internal Virus Database is out of date.
> > > Checked by AVG - http://www.avg.com 
> > > Version: 8.0.176 / Virus Database: 270.10.7/1892
> -
> > Release Date: 1/13/2009 8:04 PM
> > >
> > >   
> > 
> > 
> > -- 
> > Samisa Abeysinghe 
> > Director, Engineering; WSO2 Inc.
> > 
> > http://www.wso2.com/ - "The Open Source SOA Company"
> > 
> >
> 
> 
>       Connect with friends all over the
> world. Get Yahoo! India Messenger at http://in.messenger.yahoo.com/?wm=n/


      Bollywood news, movie reviews, film trailers and more! Go to 
http://in.movies.yahoo.com/

Reply via email to