Return-Path: Delivered-To: apmail-ws-axis-user-archive@www.apache.org Received: (qmail 74225 invoked from network); 30 Jul 2008 15:57:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 30 Jul 2008 15:57:33 -0000 Received: (qmail 32481 invoked by uid 500); 30 Jul 2008 15:57:25 -0000 Delivered-To: apmail-ws-axis-user-archive@ws.apache.org Received: (qmail 32460 invoked by uid 500); 30 Jul 2008 15:57:25 -0000 Mailing-List: contact axis-user-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-user@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-user@ws.apache.org Received: (qmail 32449 invoked by uid 99); 30 Jul 2008 15:57:25 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Jul 2008 08:57:25 -0700 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Jul 2008 15:56:28 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1KOE2n-0004Vl-Qb for axis-user@ws.apache.org; Wed, 30 Jul 2008 08:56:53 -0700 Message-ID: <18736630.post@talk.nabble.com> Date: Wed, 30 Jul 2008 08:56:53 -0700 (PDT) From: jaybytez To: axis-user@ws.apache.org Subject: Re: Yahoo's Web Service Search REST (via POST and non-XML data block) In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: jaybytez@gmail.com References: <18494234.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org Do I build the POST URL and put it as the text node of an OMElement and send that through the ServiceClient or is there a specific formatted XML that I send to the ServiceClient? Do I create an XML with children nodes that have element names equivalent to the param name and text nodes equivalent to the param value? If so, where is this documented? Thanks - jay keith chapman wrote: > > 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 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 > > -- View this message in context: http://www.nabble.com/Yahoo%27s-Web-Service-Search-REST-%28via-POST-and-non-XML-data-block%29-tp18494234p18736630.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