Thanks Anne.

 

How do you submit a request having complex types with a POST?  Can you
show me for the login method sample with User object containing username
& password?

 

Thanks

Raghu

 

________________________________

From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 03, 2007 2:41 PM
To: axis-user@ws.apache.org
Subject: Re: Axis2 & rest

 

You can submit a resource representation (containing complex types)
using PUT or POST. 
But Jeff is correct that you cannot submit a complex query parameter via
URL encoding.

Also note that encoding a password as a query parameter in a URL (per
Raghu's example) violates just about every security best practice
imaginable. 

And this time I'll bite my tongue and not rant about the
inappropriateness of turning a method into a resource.

Anne

On 7/3/07, Walker, Jeff <[EMAIL PROTECTED]> wrote:

You don't pass complex types in REST web services. Period. 
It's all about those Query parameters, the name-value pairs following
the '?' and separated by the '&'.
REST services is all about manipulating resources, not passing complex
types.
If you want to send complex types, then you need the so-called 'big' web
services technologies like SOAP/WSDL.
-jeff


-----Original Message-----
From: Raghu Upadhyayula [mailto: [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> ]
Sent: Tuesday, July 03, 2007 3:45 PM
To: axis-user@ws.apache.org
Subject: RE: Axis2 & rest

Hi Zakaria,

        For the methods with simple parameters you use it like this.... 

        Say I have a webservice MyService with login method and username
& password parameters, then the rest URL will look like this.

http://localhost/axis2/services/MyService/login?username=raghu&password=
xxx

        But I'm not sure how to call it if the parameter is a complex
type, like if my login method takes in a User object which has username 
& password as members of the User object, then I'm not sure how to call
that.


Thanks
Raghu

-----Original Message-----
From: zakaria ghandour [mailto: [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> ]
Sent: Tuesday, July 03, 2007 9:10 AM
To: axis-user@ws.apache.org
Subject: Re: Axis2 & rest


Hi,

axis2/services/{service name}/{Operation name} 

can you tel me how to call ws as rest if there is parameters ??

thanks
--
View this message in context:
http://www.nabble.com/Axis2---rest-tf4018616.html#a11414842 
Sent from the Axis - User mailing list archive at Nabble.com.


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


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




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

 

Reply via email to