Smisa,

      Thanks for the response.

      For traditional HTTP commands GET and POST.
      One could write a server and test them with standalone UNIX tools like 
lwp-request or curl.
      And they are working fine.

      But for HTTP PUT generated by above UNIX tools, 
      Axis2c is categorization them as invalid requests.

      Log Snippet logs/axis2.log
[Mon Mar  1 17:26:31 2010] [debug] http_worker.c(200) Client HTTP version 
HTTP/1.1
[Mon Mar  1 17:26:31 2010] [info]  Request served in 0.001 seconds

      HTTP PUT Request (Generated by UNIX tool)
PUT /axis2/services/Concordat/start HTTP/1.1
Connection: close
Host: localhost:9090
User-Agent: l

      However echo_rest example with HTTP_PUT request is going tru.
      Below is the actual HTTP PUT request generated by, echo_rest -mPUT usage,

PUT /axis2/services/echo/echoString HTTP/1.1
User-Agent: Axis2C/1.6.0
Content-Length: 111
Content

      One can observe a clear difference in the structure of HTTP PUT generated 
by UNIX Tool(lwp-request) and the same echo_rest.

      Like hear your comments on the above observation.
Thanks,
Satish.





________________________________
From: Samisa Abeysinghe <[email protected]>
To: Apache AXIS C Developers List <[email protected]>
Sent: Wed, February 17, 2010 10:24:31 PM
Subject: Re: Fw: REST: HTTP_PUT: Debugging

This might be a bug in Axis2/C. We need to test with the REST sample. Did you 
try with our sample and did it work?

Samisa...


On Thu, Feb 18, 2010 at 12:38 AM, Satish Bvs <[email protected]> wrote:

Nandika,
>
>
>      Can you help with below question.
>
>
>      We started adopting
> Axis2C framework for our project recently.
>      And thank you for the the platform
> work.
>
>
>      Currently we are stuck with a roadblock and seek your help or guidance.
>
>
>      Problem Statement,
>              Unable to place an successful HTTP: PUT request for an REST 
> enabled operation.
>              But were able to place and POST operation and it
> went tru.
>      
>      Logs & System Files,
>              services.xml (segmenet)
><operation name="start">
><parameter name="RESTMethod">PUT</parameter>
><parameter name="RESTLocation">start</parameter>
></operation>
>
>
>Post Request & Response (through curl)
>curl http://localhost:9090/services/Concordat/start -T Temp
><html><head><title>500 Internal Server Error</title></head><body><h2>Internal 
>Server Error</h2><p>The server encountered an unexpected condition which 
>prevented it from fulfilling the request.</p></body></html>
>
>
>      logs/axis2.log
>[Tue Feb  2 18:38:00 2010] [info]  Starting HTTP server thread
>[Tue Feb  2 18:38:01 2010] [debug] http_worker.c(200) Client HTTP version 
>HTTP/1.1
>[Tue Feb  2 18:38:01 2010] [info]  Request served in 0.001 seconds
>
>
>       Observations
>              1. If the REST operation is not properly mapped, 
>      
>            The log statement would be,
>                        [Tue Feb  2 18:39:44 2010] [debug] rest_disp.c(114) 
> Checking for service using target endpoint address : 
> http://127.0.0.1:9090/services/Concordat/start
>[Tue Feb  2 18:39:44 2010] [debug] core_utils.c(772) Checking
> for
> operation using REST HTTP Location fragment : /start
>[Tue Feb  2 18:39:44 2010] [error] core_utils.c(1081) REST maping structure is 
>NULL for the accessed URL
>
>
>      2. For the HTTP:PUT request there is no segment,
>                        That is checking for even endpoint address,
>
>
>
>
>      Any ideas will be very helpful.
>      And I will happy to give any necessary details.
>
>
>Thanks,
>Satish.
>
>
>
>
>
>
>


-- 
Samisa Abeysinghe 
Director, Engineering - WSO2 Inc.

http://wso2.com/ - "lean . enterprise . middleware"



      

Reply via email to