axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zhan Xu" <zhan...@gmail.com>
Subject Re: Newbie question: Hello client program can not working against IIS + ASP.Net
Date Fri, 23 May 2008 18:06:59 GMT
Shankar:

Sorry for the late response and thanks a lot for your kind helps! Now
I got an idea of what's wrong.

Zhan Xu

On 5/22/08, Uthaiyashankar <shankar@wso2.com> wrote:
> Hi,
>
>  The sample was written to handle response
>  <greetResponse>
>        Hello Client!
>  <greetResponse>
>
>  But asp.net is returning the reply as
>
>  <greetResponse xmlns="http://tempuri.org/">
>      <greetResult>string</greetResult>
>  </greetResponse>
>
>
>  Note that, "greetResult" element is under "greetResponse". becuause of
> this, axiom_node_get_node_type(service_greeting_node, env)
> return you AXIOM_ELEMENT
>
>  you can modify service to return the response as
> <greetResponse>string</greetResponse>, or you can modify
> client to access "greetResult" node and then extract "string" from it.
>
>  Regards,
>  Shankar
>
>
>
>  Zhan Xu wrote:
>
> >
> > Hi,
> >
> > First, many thanks in advance for reading my question. I'm new to
> > Axis2/C. I am trying to make a simple 'hello' service work.
> >
> > I followed the 'Quick Start Guide'
> >
> (http://ws.apache.org/axis2/c/docs/axis2c_manual.html#quick_start)
> to
> > create a hello service with greet operation. After compiling the
> > client code (hello.c) and running axis2_http_server, all of them work
> > as expected.
> >
> > Now I created an ASP.Net web service:
> >
> > http://MyIISServer/hello/Service.asmx and have a define a
> 'greet' operation.
> >
> > I modified the client code (hello.c) and change the endpoint to
> > http://MyIISServer/hello/Service.asmx instead of
> > http://localhost:9090/axis2/services/hello but it's not
> working.
> >
> > Go further inside the code, I found that the problem rooted from
> > function const axis2_char_t * process_om_response().
> > There is a statement
> > if (service_greeting_node &&
> > axiom_node_get_node_type(service_greeting_node, env) ==
> AXIOM_TEXT) {
> >    .....
> > }
> >
> > Inserting some debug code, I found that the return of
> > axiom_node_get_node_type(service_greeting_node, env) is
> always
> > AXIOM_ELEMENT instead of AXIOM_TEXT. Thus, it will not return the
> > 'hello' string from IIS server.
> >
> > Any ideas?
> >
> > The following is the soap definition:
> >
> > SOAP 1.1
> >
> > The following is a sample SOAP 1.1 request and response. The
> > placeholders shown need to be replaced with actual values.
> >
> > POST /hello/Service.asmx HTTP/1.1
> > Host: MyIISServer
> > Content-Type: text/xml; charset=utf-8
> > Content-Length: length
> > SOAPAction: "http://tempuri.org/greet"
> >
> > <?xml version="1.0" encoding="utf-8"?>
> > <soap:Envelope
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> > xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> > xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
> >  <soap:Body>
> >    <greet xmlns="http://tempuri.org/">
> >      <clientGreeting>string</clientGreeting>
> >    </greet>
> >  </soap:Body>
> > </soap:Envelope>
> >
> > HTTP/1.1 200 OK
> > Content-Type: text/xml; charset=utf-8
> > Content-Length: length
> >
> > <?xml version="1.0" encoding="utf-8"?>
> > <soap:Envelope
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> > xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> > xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
> >  <soap:Body>
> >    <greetResponse xmlns="http://tempuri.org/">
> >      <greetResult>string</greetResult>
> >    </greetResponse>
> >  </soap:Body>
> > </soap:Envelope>
> >
> > SOAP 1.2
> >
> > The following is a sample SOAP 1.2 request and response. The
> > placeholders shown need to be replaced with actual values.
> >
> > POST /hello/Service.asmx HTTP/1.1
> > Host: MyIISServer
> > Content-Type: application/soap+xml; charset=utf-8
> > Content-Length: length
> >
> > <?xml version="1.0" encoding="utf-8"?>
> > <soap12:Envelope
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> > xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> > xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
> >  <soap12:Body>
> >    <greet xmlns="http://tempuri.org/">
> >      <clientGreeting>string</clientGreeting>
> >    </greet>
> >  </soap12:Body>
> > </soap12:Envelope>
> >
> > HTTP/1.1 200 OK
> > Content-Type: application/soap+xml; charset=utf-8
> > Content-Length: length
> >
> > <?xml version="1.0" encoding="utf-8"?>
> > <soap12:Envelope
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> > xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> > xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
> >  <soap12:Body>
> >    <greetResponse xmlns="http://tempuri.org/">
> >      <greetResult>string</greetResult>
> >    </greetResponse>
> >  </soap12:Body>
> > </soap12:Envelope>
> >
> > Zhan Xu
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> axis-c-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-c-user-help@ws.apache.org
> >
> >
> >
> >
> >
>
>
> ---------------------------------------------------------------------
>  To unsubscribe, e-mail:
> axis-c-user-unsubscribe@ws.apache.org
>  For additional commands, e-mail: axis-c-user-help@ws.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


Mime
View raw message