axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "keith chapman" <keithgchap...@gmail.com>
Subject Re: Yahoo's Web Service Search REST (via POST and non-XML data block)
Date Thu, 17 Jul 2008 13:53:42 GMT
You can set the OMElement into service Client and change its contentType as
follows,

opts.setProperty(Constants.Configuration.MESSAGE_TYPE,HTTPConstants.MEDIA_TYPE_MULTIPART_FORM_DATA)

This will send the data out as application/form-data which is what yahoo
expects.

Thanks,
Keith.

On Thu, Jul 17, 2008 at 12:24 AM, jaybytez <jaybytez@gmail.com> wrote:

>
> I am testing out REST with Axis2 and I believe I have a good handle on
> using
> with GET Method Type.  The problem I am having (in interacting with freely
> available REST services) is that services like what are provided by Yahoo
> do
> not create an XML Structure for POST REST services like the Axis2 example
> shows.  Instead Yahoo suggests just putting the parameters into the POST
> body, but the sendAndReceive methods of the ServiceClient only take an
> OMElement.  Does this mean that I cannot use the ServiceClient (and it
> appears RPCServiceClient did not work for me either), unless my POST builds
> an XML Body?
>
> Here is the Yahoo doc: http://developer.yahoo.com/search/rest.html#POSTthat
> explains building POST based REST requests.
>
> Again, I can use the GET functionality...I just want to make sure I
> understand when I would use POST and how that could be done through Axis2.
>
> Thanks - jay.
> --
> View this message in context:
> http://www.nabble.com/Yahoo%27s-Web-Service-Search-REST-%28via-POST-and-non-XML-data-block%29-tp18494234p18494234.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
Keith Chapman
Senior Software Engineer
WSO2 Inc.
Oxygenating the Web Service Platform.
http://wso2.org/

blog: http://www.keith-chapman.org

Mime
View raw message