Hi,

I agree that it would be nice to have flexibility with REST as far as
the I/O to the service.  Right now, I am using WSDL2C to generate code
for my project and the way the code is generated, it requires that the
high level request and response is always there.  If the code generation
was also updated to be more flexible in handling REST style requests,
that would really help.

As an example with GET, I have a method that returns all the data
associated with an item id.  The SOAP request requires a structure that
contains the item id along with userid and password for authentication.
Using REST, I would put the item id in the URL, then probably put the
userid and encoded password into the query string of the URL.  If there
are easy ways to retrieve both pieces of information from inside my
service that would be great.  In the generated code I would like the
call to go through to my service even if there is no XML payload.  Then
for the response I want to send XML describing the item without the SOAP
envelope.

If I was using REST to update an item in my service, I would require
that the XML representation of the item is provided in a PUT.  For this
case it would be the same as the SOAP case except for the lack of a SOAP
envelope.  The only difference might be that I could have the item id in
the URL and possibly the authentication info as in the GET case.  Also,
all of my data elements in the item are optional, so if only one part of
the item needs to be updated, only that XML element would be necessary.
I suppose for these simple update cases, I could allow the update to
occur as a GET, with the fields being updated by putting field name and
value in the query string (e.g.
http://host:9090/axis2/services/myservice/item543?userid=dave&password=A
FDGA3435FD&title="my%20new%20title").  For the response I could either
send an HTTP code or the updated item in XML.

-Dave.

-----Original Message-----
From: Senaka Fernando [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 22, 2008 8:23 PM
To: [email protected]
Subject: Improving REST Support

Hi all,

I'm interested in improving the REST support on Axis2/C. As a step
towards improving the REST support, what I can do is relay to the
service that a particular type of request was made through the message
context and retrieve the appropriate response from the message context
and reply to the sender. This wont be that much of a trouble in doing.
The point is since we are talking about services, the service will
decide what it would do with the request, not the server. If not, when
considering PUT, DELETE, etc. how am I to implement them?

I read through the references below, plus some others which were not
that very helpful. Hope that they may be of some help.

Thanks,
Senaka

References:
[1] http://www.w3.org/2005/Talks/1115-hh-k-ecows/#(1)
[2] http://java.sun.com/developer/technicalArticles/WebServices/restful/


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


**********************************************************************
This email and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed. Any 
unauthorized review, use, disclosure or distribution is prohibited. If you are 
not the intended recipient, please contact the sender by reply e-mail and 
destroy all copies of the original message. 
**********************************************************************


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to