Return-Path: Delivered-To: apmail-ws-axis-user-archive@www.apache.org Received: (qmail 42335 invoked from network); 28 Sep 2009 05:56:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 28 Sep 2009 05:56:43 -0000 Received: (qmail 95942 invoked by uid 500); 28 Sep 2009 05:56:40 -0000 Delivered-To: apmail-ws-axis-user-archive@ws.apache.org Received: (qmail 95855 invoked by uid 500); 28 Sep 2009 05:56:40 -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 95843 invoked by uid 99); 28 Sep 2009 05:56:40 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Sep 2009 05:56:40 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of amilasuriarachchi@gmail.com designates 209.85.221.179 as permitted sender) Received: from [209.85.221.179] (HELO mail-qy0-f179.google.com) (209.85.221.179) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Sep 2009 05:56:28 +0000 Received: by qyk9 with SMTP id 9so6175438qyk.30 for ; Sun, 27 Sep 2009 22:56:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=mUE2b1esRdapF/2pYNMygOE5q5FhAJq1qblwvUN2OIA=; b=Lu7cgn6I8NVGHkwyxDFj1CVpwsuKZlFC/RUQxysyOrJTrug2Nh8ZWMYMxKtWhcFNIx oMiqlDkLoQUCv9k62OHtsgTO/LP0PZMji8pjMlO/drQCtqthIqPAPTV5vtiCtuy+qFGy pHuZ0WuU44D19dmUr3S23yhjBeNpRbgD40joY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=x9vefBMHifIBC+fnU1tqcBtq/0Tw7alZGM5uhtfiBavLWaaSvVtYO63DYPq2pN48yP UzJYrH2NO3kJX8D3iYsIgczQrv+BbG/pFzVArBe5xTlzotpkcDYJMnV4F41yuJDqHQFA +XdwB8/LXtm0MESpEUlF52AsLY0GGh0VXW3z4= MIME-Version: 1.0 Received: by 10.229.13.12 with SMTP id z12mr1034116qcz.102.1254117367571; Sun, 27 Sep 2009 22:56:07 -0700 (PDT) In-Reply-To: References: Date: Mon, 28 Sep 2009 11:26:07 +0530 Message-ID: <60708f4b0909272256p416395bcy5b6830174de3303f@mail.gmail.com> Subject: Re: Testing REST functionality From: Amila Suriarachchi To: axis-user@ws.apache.org Content-Type: multipart/alternative; boundary=0016363ba21233657e04749cf4da X-Virus-Checked: Checked by ClamAV on apache.org --0016363ba21233657e04749cf4da Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On Sun, Sep 27, 2009 at 9:44 PM, Martin Gainty wrote: > could someone determine if checking contentType to determine RESTRequest > is sufficient? > > org.apache.axis2.transport.http.HttpTransportUtils{ > public static final String MEDIA_TYPE_APPLICATION_XML =3D "application/xm= l"; > public static final String MEDIA_TYPE_X_WWW_FORM =3D > "application/x-www-form-urlencoded"; > public static final String MEDIA_TYPE_MULTIPART_FORM_DATA =3D > "multipart/form-data"; > > public static boolean isRESTRequest(String contentType) { > return contentType !=3D null && > > (contentType.indexOf(HTTPConstants.MEDIA_TYPE_APPLICATION_XML) > -1 || > contentType.indexOf(HTTPConstants.MEDIA_TYPE_X_WWW_FORM) = > > -1 || > > contentType.indexOf(HTTPConstants.MEDIA_TYPE_MULTIPART_FORM_DATA) > -1); > } > } > some other projects are mapping REST based on URL parse(and not necessari= ly > contentType test) > does REST have a spec to follow and if so is there any parsing of URL to > determine if this is a REST request? > I think most of the Axis2 Rest stuff is based on the wsdl 2.0 http binding. thanks, Amila. > > thanks, > Martin Gainty > ______________________________________________ > Verzicht und Vertraulichkeitanmerkung/Note de d=E9ni et de confidentialit= =E9 > > Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene > Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugt= e > Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht > dient lediglich dem Austausch von Informationen und entfaltet keine > rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von > E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. > > Ce message est confidentiel et peut =EAtre privil=E9gi=E9. Si vous n'=EAt= es pas le destinataire pr=E9vu, nous te demandons avec bont=E9 que pour sat= isfaire informez l'exp=E9diteur. N'importe quelle diffusion non autoris=E9e= ou la copie de ceci est interdite. Ce message sert =E0 l'information seule= ment et n'aura pas n'importe quel effet l=E9galement obligatoire. =C9tant d= onn=E9 que les email peuvent facilement =EAtre sujets =E0 la manipulation, = nous ne pouvons accepter aucune responsabilit=E9 pour le contenu fourni. > > > > > > ------------------------------ > Hotmail=AE has ever-growing storage! Don=92t worry about storage limits. = Check > it out. > --=20 Amila Suriarachchi WSO2 Inc. blog: http://amilachinthaka.blogspot.com/ --0016363ba21233657e04749cf4da Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: quoted-printable

On Sun, Sep 27, 2009 at 9:44 PM, Martin = Gainty <mgainty= @hotmail.com> wrote:
could someone determine if checking contentType to determine RESTRequest is= sufficient?

org.apache.axis2.transport.http.HttpTransportUtils{
= public static final String MEDIA_TYPE_APPLICATION_XML =3D "application= /xml";
=A0=A0=A0 public static final String MEDIA_TYPE_X_WWW_FORM =3D
=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0 "application/x-www-form-urlencoded";
= =A0=A0=A0 public static final String MEDIA_TYPE_MULTIPART_FORM_DATA =3D &qu= ot;multipart/form-data";

=A0=A0=A0 public static boolean isRESTRequest(String contentType) {
=A0= =A0=A0=A0=A0=A0=A0 return contentType !=3D null &&
=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (contentType.indexOf(HTTPConstants.MEDIA_TYP= E_APPLICATION_XML) > -1 ||
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0 contentType.indexOf(HTTPConstants.MEDIA_TYPE_X_WWW_FORM) > -1 ||
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 contentType.indexOf(HTTPConst= ants.MEDIA_TYPE_MULTIPART_FORM_DATA) > -1);
=A0=A0=A0 }
}
some = other projects are mapping REST based on URL parse(and not necessarily cont= entType test)
does REST have a spec to follow and if so is there any par= sing of URL to determine if this is a REST request?

I think most of the Axis2 Rest stuff is based o= n the wsdl 2.0 http binding.

thanks,
Amila.

thanks,
Martin Gainty
_____________________________________= _________
Verzicht und Vertraulichkeitanmerkung/Note de d=E9ni et de co= nfidentialit=E9
=A0
Diese Nachricht ist vertraulich. Sollten Sie= nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitt= eilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulae= ssig. Diese Nachricht dient lediglich dem Austausch von Informationen und e= ntfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulier= barkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.<= br>
Ce message est confidentiel et peut =EAtre privil=E9gi=E9. Si vo=
us n'=EAtes pas le destinataire pr=E9vu, nous te demandons avec bont=E9=
 que pour satisfaire informez l'exp=E9diteur. N'importe quelle diff=
usion non autoris=E9e ou la copie de ceci est interdite. Ce message sert =
=E0 l'information seulement et n'aura pas n'importe quel effet =
l=E9galement obligatoire. =C9tant donn=E9 que les email peuvent facilement =
=EAtre sujets =E0 la manipulation, nous ne pouvons accepter aucune responsa=
bilit=E9 pour le contenu fourni.





Hotmail=AE has ever-growi= ng storage! Don=92t worry about storage limits. Check it out.



--
Amila Suriarachchi
W= SO2 Inc.
blog: http://am= ilachinthaka.blogspot.com/
--0016363ba21233657e04749cf4da--