On Sun, Sep 27, 2009 at 9:44 PM, Martin Gainty <[email protected]> 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 = "application/xml";
>     public static final String MEDIA_TYPE_X_WWW_FORM =
>             "application/x-www-form-urlencoded";
>     public static final String MEDIA_TYPE_MULTIPART_FORM_DATA =
> "multipart/form-data";
>
>     public static boolean isRESTRequest(String contentType) {
>         return contentType != 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 necessarily
> 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éni et de confidentialité
>
> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
> Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte
> 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 être privilégié. Si vous n'êtes pas le 
> destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
> l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci 
> est interdite. Ce message sert à l'information seulement et n'aura pas 
> n'importe quel effet légalement obligatoire. Étant donné que les email 
> peuvent facilement être sujets à la manipulation, nous ne pouvons accepter 
> aucune responsabilité pour le contenu fourni.
>
>
>
>
>
> ------------------------------
> Hotmail® has ever-growing storage! Don’t worry about storage limits. Check
> it 
> out.<http://windowslive.com/Tutorial/Hotmail/Storage?ocid=TXT_TAGLM_WL_HM_Tutorial_Storage_062009>
>



-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/

Reply via email to