You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by sm...@wipro.com on 2007/05/24 13:18:28 UTC

Rest APIs

Hi

 

    Can anybody help me enable rest APIs in my webservices?

 

 

Regards

Smitha Aldrin




The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
 
www.wipro.com

Re: Rest APIs

Posted by Saminda Abeyruwan <sa...@gmail.com>.
http://wso2.org/blog/keith/958

If you are using primary API, following is an example,

########
        OMElement data = ... ;
        EndpointReference epr = ...;
        Options options = new Options();
        options.setTo(epr);
        //set the correct REST invocation properties.
        options.setProperty(
org.apache.axis2.Constants.Configuration.MESSAGE_TYPE,

ServerConstants.HTTPConstants.MEDIA_TYPE_X_WWW_FORM);
        options.setProperty(
                org.apache.axis2.Constants.Configuration.HTTP_METHOD,
                org.apache.axis2.Constants.Configuration.HTTP_METHOD_POST);
        ServiceClient sender =
                new ServiceClient(null,null);
        sender.setOptions(options);
        OMElement response = sender.sendReceive(data);

#########

If you have the proper WSDL2.0 document, wsdl2java  will generate the proper
code. :)

Thank you

Saminda

On 5/24/07, smitha.aldrin@wipro.com <sm...@wipro.com> wrote:
>
>   I have written my programs using primary APIs not using wsdl2java tool.
>
> So is it going to create any difference?
>
>
>  ------------------------------
>
> *From:* Saminda Abeyruwan [mailto:samindaa@gmail.com]
> *Sent:* Thursday, May 24, 2007 6:16 PM
> *To:* axis-dev@ws.apache.org
> *Subject:* Re: Rest APIse
>
>
>
> http://wso2.org/blog/dims/1133
>
> On 5/24/07, *smitha.aldrin@wipro.com *<sm...@wipro.com> wrote:
>
> Hi
>
>
>
> I am using Axis2.
>
>
>  ------------------------------
>
> *From:* Saminda Abeyruwan [mailto:samindaa@gmail.com]
> *Sent:* Thursday, May 24, 2007 5:58 PM
> *To:* axis-dev@ws.apache.org
> *Subject:* Re: Rest APIs
>
>
>
> Axis2 or Axis 1.x mate ?
>
> Saminda
>
> On 5/24/07, *smitha.aldrin@wipro.com* < smitha.aldrin@wipro.com> wrote:
>
> Hi
>
>
>
>     Can anybody help me enable rest APIs in my webservices?
>
>
>
>
>
> Regards
>
> Smitha Aldrin
>
>
> The information contained in this electronic message and any attachments
> to this message are intended for the exclusive use of the addressee(s) and
> may contain proprietary, confidential or privileged information. If you are
> not the intended recipient, you should not disseminate, distribute or copy
> this e-mail. Please notify the sender immediately and destroy all copies of
> this message and any attachments.
>
> WARNING: Computer viruses can be transmitted via email. The recipient
> should check this email and any attachments for the presence of viruses. The
> company accepts no liability for any damage caused by any virus transmitted
> by this email.
>
> www.wipro.com
>
>
>
>
> --
> Saminda Abeyruwan
>
> Software Engineer
> WSO2 Inc. - www.wso2.org
>
>
> The information contained in this electronic message and any attachments
> to this message are intended for the exclusive use of the addressee(s) and
> may contain proprietary, confidential or privileged information. If you are
> not the intended recipient, you should not disseminate, distribute or copy
> this e-mail. Please notify the sender immediately and destroy all copies of
> this message and any attachments.
>
> WARNING: Computer viruses can be transmitted via email. The recipient
> should check this email and any attachments for the presence of viruses. The
> company accepts no liability for any damage caused by any virus transmitted
> by this email.
>
> www.wipro.com
>
>
>
>
> --
> Saminda Abeyruwan
>
> Software Engineer
> WSO2 Inc. - www.wso2.org
>
> The information contained in this electronic message and any attachments
> to this message are intended for the exclusive use of the addressee(s) and
> may contain proprietary, confidential or privileged information. If you are
> not the intended recipient, you should not disseminate, distribute or copy
> this e-mail. Please notify the sender immediately and destroy all copies of
> this message and any attachments.
>
> WARNING: Computer viruses can be transmitted via email. The recipient
> should check this email and any attachments for the presence of viruses. The
> company accepts no liability for any damage caused by any virus transmitted
> by this email.
>
> www.wipro.com
>



-- 
Saminda Abeyruwan

Software Engineer
WSO2 Inc. - www.wso2.org

RE: Rest APIs

Posted by sm...@wipro.com.
 I have written my programs using primary APIs not using wsdl2java tool.

So is it going to create any difference?

 

________________________________

From: Saminda Abeyruwan [mailto:samindaa@gmail.com] 
Sent: Thursday, May 24, 2007 6:16 PM
To: axis-dev@ws.apache.org
Subject: Re: Rest APIs

 

http://wso2.org/blog/dims/1133

On 5/24/07, smitha.aldrin@wipro.com <sm...@wipro.com> wrote:

Hi 

 

I am using Axis2.

 

________________________________

From: Saminda Abeyruwan [mailto:samindaa@gmail.com] 
Sent: Thursday, May 24, 2007 5:58 PM
To: axis-dev@ws.apache.org
Subject: Re: Rest APIs

 

Axis2 or Axis 1.x mate ?

Saminda 

On 5/24/07, smitha.aldrin@wipro.com < smitha.aldrin@wipro.com
<ma...@wipro.com> > wrote:

Hi

 

    Can anybody help me enable rest APIs in my webservices?

 

 

Regards

Smitha Aldrin


The information contained in this electronic message and any attachments
to this message are intended for the exclusive use of the addressee(s)
and may contain proprietary, confidential or privileged information. If
you are not the intended recipient, you should not disseminate,
distribute or copy this e-mail. Please notify the sender immediately and
destroy all copies of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient
should check this email and any attachments for the presence of viruses.
The company accepts no liability for any damage caused by any virus
transmitted by this email. 

www.wipro.com




-- 
Saminda Abeyruwan

Software Engineer
WSO2 Inc. - www.wso2.org 


The information contained in this electronic message and any attachments
to this message are intended for the exclusive use of the addressee(s)
and may contain proprietary, confidential or privileged information. If
you are not the intended recipient, you should not disseminate,
distribute or copy this e-mail. Please notify the sender immediately and
destroy all copies of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient
should check this email and any attachments for the presence of viruses.
The company accepts no liability for any damage caused by any virus
transmitted by this email. 

www.wipro.com




-- 
Saminda Abeyruwan

Software Engineer
WSO2 Inc. - www.wso2.org 




The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
 
www.wipro.com

Re: Rest APIs

Posted by Saminda Abeyruwan <sa...@gmail.com>.
http://wso2.org/blog/dims/1133

On 5/24/07, smitha.aldrin@wipro.com <sm...@wipro.com> wrote:
>
>  Hi
>
>
>
> I am using Axis2.
>
>
>  ------------------------------
>
> *From:* Saminda Abeyruwan [mailto:samindaa@gmail.com]
> *Sent:* Thursday, May 24, 2007 5:58 PM
> *To:* axis-dev@ws.apache.org
> *Subject:* Re: Rest APIs
>
>
>
> Axis2 or Axis 1.x mate ?
>
> Saminda
>
> On 5/24/07, *smitha.aldrin@wipro.com* < smitha.aldrin@wipro.com> wrote:
>
> Hi
>
>
>
>     Can anybody help me enable rest APIs in my webservices?
>
>
>
>
>
> Regards
>
> Smitha Aldrin
>
>
> The information contained in this electronic message and any attachments
> to this message are intended for the exclusive use of the addressee(s) and
> may contain proprietary, confidential or privileged information. If you are
> not the intended recipient, you should not disseminate, distribute or copy
> this e-mail. Please notify the sender immediately and destroy all copies of
> this message and any attachments.
>
> WARNING: Computer viruses can be transmitted via email. The recipient
> should check this email and any attachments for the presence of viruses. The
> company accepts no liability for any damage caused by any virus transmitted
> by this email.
>
> www.wipro.com
>
>
>
>
> --
> Saminda Abeyruwan
>
> Software Engineer
> WSO2 Inc. - www.wso2.org
>
> The information contained in this electronic message and any attachments
> to this message are intended for the exclusive use of the addressee(s) and
> may contain proprietary, confidential or privileged information. If you are
> not the intended recipient, you should not disseminate, distribute or copy
> this e-mail. Please notify the sender immediately and destroy all copies of
> this message and any attachments.
>
> WARNING: Computer viruses can be transmitted via email. The recipient
> should check this email and any attachments for the presence of viruses. The
> company accepts no liability for any damage caused by any virus transmitted
> by this email.
>
> www.wipro.com
>



-- 
Saminda Abeyruwan

Software Engineer
WSO2 Inc. - www.wso2.org

RE: Rest APIs

Posted by sm...@wipro.com.
Hi 

 

I am using Axis2.

 

________________________________

From: Saminda Abeyruwan [mailto:samindaa@gmail.com] 
Sent: Thursday, May 24, 2007 5:58 PM
To: axis-dev@ws.apache.org
Subject: Re: Rest APIs

 

Axis2 or Axis 1.x mate ?

Saminda 

On 5/24/07, smitha.aldrin@wipro.com < smitha.aldrin@wipro.com
<ma...@wipro.com> > wrote:

Hi

 

    Can anybody help me enable rest APIs in my webservices?

 

 

Regards

Smitha Aldrin


The information contained in this electronic message and any attachments
to this message are intended for the exclusive use of the addressee(s)
and may contain proprietary, confidential or privileged information. If
you are not the intended recipient, you should not disseminate,
distribute or copy this e-mail. Please notify the sender immediately and
destroy all copies of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient
should check this email and any attachments for the presence of viruses.
The company accepts no liability for any damage caused by any virus
transmitted by this email. 

www.wipro.com




-- 
Saminda Abeyruwan

Software Engineer
WSO2 Inc. - www.wso2.org 




The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
 
www.wipro.com

Re: Rest APIs

Posted by Saminda Abeyruwan <sa...@gmail.com>.
Axis2 or Axis 1.x mate ?

Saminda

On 5/24/07, smitha.aldrin@wipro.com <sm...@wipro.com> wrote:
>
>  Hi
>
>
>
>     Can anybody help me enable rest APIs in my webservices?
>
>
>
>
>
> Regards
>
> Smitha Aldrin
>
> The information contained in this electronic message and any attachments
> to this message are intended for the exclusive use of the addressee(s) and
> may contain proprietary, confidential or privileged information. If you are
> not the intended recipient, you should not disseminate, distribute or copy
> this e-mail. Please notify the sender immediately and destroy all copies of
> this message and any attachments.
>
> WARNING: Computer viruses can be transmitted via email. The recipient
> should check this email and any attachments for the presence of viruses. The
> company accepts no liability for any damage caused by any virus transmitted
> by this email.
>
> www.wipro.com
>



-- 
Saminda Abeyruwan

Software Engineer
WSO2 Inc. - www.wso2.org

Re: Rest APIs

Posted by keith chapman <ke...@gmail.com>.
Hi Samisa,

Yes this doc needs some updates. I'll open a jira on this so that it wont be
missed before the next release.

Thanks,
Keith.

On 5/25/07, Samisa Abeysinghe <sa...@gmail.com> wrote:
>
> keith chapman wrote:
> > Hi Samitha,
> >
> > Are you using Axis2-1.1.1? from your axis2.xml it looks like so. The
> > code fragment that saminda
> Samisa not saminda ;)
> > had given works on Axis2-1.2 and not 1.1.
> BTW, just a minor note. In http://ws.apache.org/axis2/1_2/rest-ws.html,
> there is no mention on how to enable REST on server side. Yes it is
> enabled by default, but would be great if that is mentioned, along with
> info on how to disable REST.
>
> Thanks,
> Samisa...
>
> >
> > Can you confirm on your version please.
> >
> > Thanks,
> > Keith.
> >
> > On 5/25/07, *smitha.aldrin@wipro.com <ma...@wipro.com>*
> > <smitha.aldrin@wipro.com <ma...@wipro.com>> wrote:
> >
> >
> >     Hi
> >     Following is my axis2.xml entries by default.
> >
> >     <!-- If the enableRESTInAxis2MainServlet is true, then
> >     Axis2MainServlet
> >     will handle both SOAP and REST messages -->
> >         <parameter name="enableRESTInAxis2MainServlet"
> >     locked="true">false</parameter>
> >
> >         <!-- Following parameter will completely disable REST handling
> in
> >     both the servlets-->
> >         <parameter name="disableREST" locked="true">false</parameter>
> >
> >         <!-- This will disable the separate servlet we have for REST
> >     handling. -->
> >         <parameter name="disableSeparateEndpointForREST"
> >     locked="true">false</parameter>
> >
> >     It seems axis2.war is coming by default with rest API's disabled.
> >
> >     When I am trying to access
> >     http://localhost:8080/axis2/rest/Version/getVersion through
> >     browser i am
> >     getting the following error "Please enable REST support in
> >     WEB-INF/conf/axis2.xml and WEB-INF/web.xml"
> >
> >     -----Original Message-----
> >     From: Samisa Abeysinghe [mailto:samisa.abeysinghe@gmail.com
> >     <ma...@gmail.com>]
> >     Sent: Friday, May 25, 2007 7:43 AM
> >     To: axis-dev@ws.apache.org <ma...@ws.apache.org>
> >     Subject: Re: Rest APIs
> >
> >     smitha.aldrin@wipro.com <ma...@wipro.com> wrote:
> >     >
> >     > Hi
> >     >
> >     >
> >     >
> >     >     Can anybody help me enable rest APIs in my webservices?
> >     >
> >     http://ws.apache.org/axis2/1_2/rest-ws.html
> >
> >     Axis2 HTTP endpoints can handle both REST and SOAP by default,
> unless
> >     you explicitly disable it using disableREST parameter in axis2.xml
> >     conf
> >     file.
> >
> >     HTH.
> >
> >     Samisa...
> >
> >     --
> >     Samisa Abeysinghe : http://www.bloglines.com/blog/samisa
> >
> >
> >
> ---------------------------------------------------------------------
> >     To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> >     <ma...@ws.apache.org>
> >     For additional commands, e-mail: axis-dev-help@ws.apache.org
> >     <ma...@ws.apache.org>
> >
> >
> >
> >     The information contained in this electronic message and any
> >     attachments to this message are intended for the exclusive use of
> >     the addressee(s) and may contain proprietary, confidential or
> >     privileged information. If you are not the intended recipient, you
> >     should not disseminate, distribute or copy this e-mail. Please
> >     notify the sender immediately and destroy all copies of this
> >     message and any attachments.
> >
> >     WARNING: Computer viruses can be transmitted via email. The
> >     recipient should check this email and any attachments for the
> >     presence of viruses. The company accepts no liability for any
> >     damage caused by any virus transmitted by this email.
> >
> >     www.wipro.com <http://www.wipro.com>
> >
> >
> ---------------------------------------------------------------------
> >     To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> >     <ma...@ws.apache.org>
> >     For additional commands, e-mail: axis-dev-help@ws.apache.org
> >     <ma...@ws.apache.org>
> >
> >
> >
> >
> > --
> > Keith Chapman
> > WSO2 Inc.
> > Oxygen for Web Services Developers.
> > http://wso2.org/
>
>
> --
> Samisa Abeysinghe : http://www.bloglines.com/blog/samisa
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>


-- 
Keith Chapman
WSO2 Inc.
Oxygen for Web Services Developers.
http://wso2.org/

Re: Rest APIs

Posted by Samisa Abeysinghe <sa...@gmail.com>.
keith chapman wrote:
> Hi Samitha,
>
> Are you using Axis2-1.1.1? from your axis2.xml it looks like so. The 
> code fragment that saminda 
Samisa not saminda ;)
> had given works on Axis2-1.2 and not 1.1.
BTW, just a minor note. In http://ws.apache.org/axis2/1_2/rest-ws.html, 
there is no mention on how to enable REST on server side. Yes it is 
enabled by default, but would be great if that is mentioned, along with 
info on how to disable REST.

Thanks,
Samisa...

>
> Can you confirm on your version please.
>
> Thanks,
> Keith.
>
> On 5/25/07, *smitha.aldrin@wipro.com <ma...@wipro.com>* 
> <smitha.aldrin@wipro.com <ma...@wipro.com>> wrote:
>
>
>     Hi
>     Following is my axis2.xml entries by default.
>
>     <!-- If the enableRESTInAxis2MainServlet is true, then
>     Axis2MainServlet
>     will handle both SOAP and REST messages -->
>         <parameter name="enableRESTInAxis2MainServlet"
>     locked="true">false</parameter>
>
>         <!-- Following parameter will completely disable REST handling in
>     both the servlets-->
>         <parameter name="disableREST" locked="true">false</parameter>
>
>         <!-- This will disable the separate servlet we have for REST
>     handling. -->
>         <parameter name="disableSeparateEndpointForREST"
>     locked="true">false</parameter>
>
>     It seems axis2.war is coming by default with rest API's disabled.
>
>     When I am trying to access
>     http://localhost:8080/axis2/rest/Version/getVersion through
>     browser i am
>     getting the following error "Please enable REST support in
>     WEB-INF/conf/axis2.xml and WEB-INF/web.xml"
>
>     -----Original Message-----
>     From: Samisa Abeysinghe [mailto:samisa.abeysinghe@gmail.com
>     <ma...@gmail.com>]
>     Sent: Friday, May 25, 2007 7:43 AM
>     To: axis-dev@ws.apache.org <ma...@ws.apache.org>
>     Subject: Re: Rest APIs
>
>     smitha.aldrin@wipro.com <ma...@wipro.com> wrote:
>     >
>     > Hi
>     >
>     >
>     >
>     >     Can anybody help me enable rest APIs in my webservices?
>     >
>     http://ws.apache.org/axis2/1_2/rest-ws.html
>
>     Axis2 HTTP endpoints can handle both REST and SOAP by default, unless
>     you explicitly disable it using disableREST parameter in axis2.xml
>     conf
>     file.
>
>     HTH.
>
>     Samisa...
>
>     --
>     Samisa Abeysinghe : http://www.bloglines.com/blog/samisa
>
>
>     ---------------------------------------------------------------------
>     To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
>     <ma...@ws.apache.org>
>     For additional commands, e-mail: axis-dev-help@ws.apache.org
>     <ma...@ws.apache.org>
>
>
>
>     The information contained in this electronic message and any
>     attachments to this message are intended for the exclusive use of
>     the addressee(s) and may contain proprietary, confidential or
>     privileged information. If you are not the intended recipient, you
>     should not disseminate, distribute or copy this e-mail. Please
>     notify the sender immediately and destroy all copies of this
>     message and any attachments.
>
>     WARNING: Computer viruses can be transmitted via email. The
>     recipient should check this email and any attachments for the
>     presence of viruses. The company accepts no liability for any
>     damage caused by any virus transmitted by this email.
>
>     www.wipro.com <http://www.wipro.com>
>
>     ---------------------------------------------------------------------
>     To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
>     <ma...@ws.apache.org>
>     For additional commands, e-mail: axis-dev-help@ws.apache.org
>     <ma...@ws.apache.org>
>
>
>
>
> -- 
> Keith Chapman
> WSO2 Inc.
> Oxygen for Web Services Developers.
> http://wso2.org/ 


-- 
Samisa Abeysinghe : http://www.bloglines.com/blog/samisa


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Re: Rest APIs

Posted by keith chapman <ke...@gmail.com>.
The error you got was misleading. Its fixed in the latest release though.

Thanks,
Keith.

On 5/25/07, smitha.aldrin@wipro.com <sm...@wipro.com> wrote:
>
>  Hi Keith
>
>
>
> Thanks for your help.
>
> I also could execute .
>
> The problem lies in the way I was giving the url.I was not specifiying the
> method in the url.
>
>
>
> Thanks
>
> Smitha
>
>
>
>
>  ------------------------------
>
> *From:* keith chapman [mailto:keithgchapman@gmail.com]
> *Sent:* Friday, May 25, 2007 11:35 AM
> *To:* axis-dev@ws.apache.org
> *Subject:* Re: Rest APIs
>
>
>
> Hi,
>
> I just downloaded axis2-1.1.1 deployed it in tomcat and invoked the
> version servive from the browser using http://localhost:8091/axis2/rest/Version/getVersion
> it works fine out of the box.
>
> Thanks,
> Keith.
>
> On 5/25/07, *smitha.aldrin@wipro.com* < smitha.aldrin@wipro.com> wrote:
>
> Hi Keith
>
>
>
> Thanks for the reply…
>
> Yeah …I am using axis2-1.1.1.Can't we directly give the Rest Epr to the
> browser and get it executed?
>
> My requirement is to get it executed directly by giving the Rest Epr in
> the browser.
>
>
>  ------------------------------
>
> *From:* keith chapman [mailto:keithgchapman@gmail.com]
> *Sent:* Friday, May 25, 2007 10:58 AM
>
>
> *To:* axis-dev@ws.apache.org
> *Subject:* Re: Rest APIs
>
>
>
> Hi Samitha,
>
> Are you using Axis2-1.1.1? from your axis2.xml it looks like so. The code
> fragment that saminda had given works on Axis2-1.2 and not 1.1.
>
> Can you confirm on your version please.
>
> Thanks,
> Keith.
>
> On 5/25/07, *smitha.aldrin@wipro.com* <smitha.aldrin@wipro.com > wrote:
>
>
> Hi
> Following is my axis2.xml entries by default.
>
> <!-- If the enableRESTInAxis2MainServlet is true, then Axis2MainServlet
> will handle both SOAP and REST messages -->
>     <parameter name="enableRESTInAxis2MainServlet"
> locked="true">false</parameter>
>
>     <!-- Following parameter will completely disable REST handling in
> both the servlets-->
>     <parameter name="disableREST" locked="true">false</parameter>
>
>     <!-- This will disable the separate servlet we have for REST
> handling. -->
>     <parameter name="disableSeparateEndpointForREST"
> locked="true">false</parameter>
>
> It seems axis2.war is coming by default with rest API's disabled.
>
> When I am trying to access
> http://localhost:8080/axis2/rest/Version/getVersion through browser i am
> getting the following error "Please enable REST support in
> WEB-INF/conf/axis2.xml and WEB-INF/web.xml"
>
> -----Original Message-----
> From: Samisa Abeysinghe [mailto:samisa.abeysinghe@gmail.com]
> Sent: Friday, May 25, 2007 7:43 AM
> To: axis-dev@ws.apache.org
> Subject: Re: Rest APIs
>
> smitha.aldrin@wipro.com wrote:
> >
> > Hi
> >
> >
> >
> >     Can anybody help me enable rest APIs in my webservices?
> >
> http://ws.apache.org/axis2/1_2/rest-ws.html
>
> Axis2 HTTP endpoints can handle both REST and SOAP by default, unless
> you explicitly disable it using disableREST parameter in axis2.xml conf
> file.
>
> HTH.
>
> Samisa...
>
> --
> Samisa Abeysinghe : http://www.bloglines.com/blog/samisa
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>
>
> The information contained in this electronic message and any attachments
> to this message are intended for the exclusive use of the addressee(s) and
> may contain proprietary, confidential or privileged information. If you are
> not the intended recipient, you should not disseminate, distribute or copy
> this e-mail. Please notify the sender immediately and destroy all copies of
> this message and any attachments.
>
> WARNING: Computer viruses can be transmitted via email. The recipient
> should check this email and any attachments for the presence of viruses. The
> company accepts no liability for any damage caused by any virus transmitted
> by this email.
>
> www.wipro.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>
>
>
> --
> Keith Chapman
> WSO2 Inc.
> Oxygen for Web Services Developers.
> http://wso2.org/
>
>
> The information contained in this electronic message and any attachments
> to this message are intended for the exclusive use of the addressee(s) and
> may contain proprietary, confidential or privileged information. If you are
> not the intended recipient, you should not disseminate, distribute or copy
> this e-mail. Please notify the sender immediately and destroy all copies of
> this message and any attachments.
>
> WARNING: Computer viruses can be transmitted via email. The recipient
> should check this email and any attachments for the presence of viruses. The
> company accepts no liability for any damage caused by any virus transmitted
> by this email.
>
> www.wipro.com
>
>
>
>
> --
> Keith Chapman
> WSO2 Inc.
> Oxygen for Web Services Developers.
> http://wso2.org/
>
> The information contained in this electronic message and any attachments
> to this message are intended for the exclusive use of the addressee(s) and
> may contain proprietary, confidential or privileged information. If you are
> not the intended recipient, you should not disseminate, distribute or copy
> this e-mail. Please notify the sender immediately and destroy all copies of
> this message and any attachments.
>
> WARNING: Computer viruses can be transmitted via email. The recipient
> should check this email and any attachments for the presence of viruses. The
> company accepts no liability for any damage caused by any virus transmitted
> by this email.
>
> www.wipro.com
>



-- 
Keith Chapman
WSO2 Inc.
Oxygen for Web Services Developers.
http://wso2.org/

RE: Rest APIs

Posted by sm...@wipro.com.
Hi Keith

 

Thanks for your help.

I also could execute .

The problem lies in the way I was giving the url.I was not specifiying
the method in the url.

 

Thanks 

Smitha 

 

 

________________________________

From: keith chapman [mailto:keithgchapman@gmail.com] 
Sent: Friday, May 25, 2007 11:35 AM
To: axis-dev@ws.apache.org
Subject: Re: Rest APIs

 

Hi,

I just downloaded axis2-1.1.1 deployed it in tomcat and invoked the
version servive from the browser using
http://localhost:8091/axis2/rest/Version/getVersion it works fine out of
the box. 

Thanks,
Keith.

On 5/25/07, smitha.aldrin@wipro.com < smitha.aldrin@wipro.com
<ma...@wipro.com> > wrote:

Hi Keith

 

Thanks for the reply...

Yeah ...I am using axis2-1.1.1.Can't we directly give the Rest Epr to
the browser and get it executed?

My requirement is to get it executed directly by giving the Rest Epr in
the browser. 

 

________________________________

From: keith chapman [mailto:keithgchapman@gmail.com] 
Sent: Friday, May 25, 2007 10:58 AM


To: axis-dev@ws.apache.org
Subject: Re: Rest APIs

 

Hi Samitha,

Are you using Axis2-1.1.1? from your axis2.xml it looks like so. The
code fragment that saminda had given works on Axis2-1.2 and not 1.1.

Can you confirm on your version please.

Thanks,
Keith.

On 5/25/07, smitha.aldrin@wipro.com <smitha.aldrin@wipro.com > wrote:


Hi
Following is my axis2.xml entries by default.

<!-- If the enableRESTInAxis2MainServlet is true, then Axis2MainServlet 
will handle both SOAP and REST messages -->
    <parameter name="enableRESTInAxis2MainServlet"
locked="true">false</parameter>

    <!-- Following parameter will completely disable REST handling in 
both the servlets-->
    <parameter name="disableREST" locked="true">false</parameter>

    <!-- This will disable the separate servlet we have for REST
handling. --> 
    <parameter name="disableSeparateEndpointForREST"
locked="true">false</parameter>

It seems axis2.war is coming by default with rest API's disabled.

When I am trying to access 
http://localhost:8080/axis2/rest/Version/getVersion through browser i am
getting the following error "Please enable REST support in
WEB-INF/conf/axis2.xml and WEB-INF/web.xml" 

-----Original Message-----
From: Samisa Abeysinghe [mailto:samisa.abeysinghe@gmail.com]
Sent: Friday, May 25, 2007 7:43 AM
To: axis-dev@ws.apache.org
Subject: Re: Rest APIs

smitha.aldrin@wipro.com wrote:
>
> Hi
>
>
>
>     Can anybody help me enable rest APIs in my webservices? 
>
http://ws.apache.org/axis2/1_2/rest-ws.html

Axis2 HTTP endpoints can handle both REST and SOAP by default, unless
you explicitly disable it using disableREST parameter in axis2.xml conf
file.

HTH.

Samisa...

--
Samisa Abeysinghe : http://www.bloglines.com/blog/samisa


--------------------------------------------------------------------- 
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org 



The information contained in this electronic message and any attachments
to this message are intended for the exclusive use of the addressee(s)
and may contain proprietary, confidential or privileged information. If
you are not the intended recipient, you should not disseminate,
distribute or copy this e-mail. Please notify the sender immediately and
destroy all copies of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient
should check this email and any attachments for the presence of viruses.
The company accepts no liability for any damage caused by any virus
transmitted by this email. 

www.wipro.com

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org 
For additional commands, e-mail: axis-dev-help@ws.apache.org




-- 
Keith Chapman
WSO2 Inc.
Oxygen for Web Services Developers. 
http://wso2.org/ 


The information contained in this electronic message and any attachments
to this message are intended for the exclusive use of the addressee(s)
and may contain proprietary, confidential or privileged information. If
you are not the intended recipient, you should not disseminate,
distribute or copy this e-mail. Please notify the sender immediately and
destroy all copies of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient
should check this email and any attachments for the presence of viruses.
The company accepts no liability for any damage caused by any virus
transmitted by this email. 

www.wipro.com




-- 
Keith Chapman
WSO2 Inc.
Oxygen for Web Services Developers.
http://wso2.org/ 




The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
 
www.wipro.com

Re: Rest APIs

Posted by keith chapman <ke...@gmail.com>.
Hi,

I just downloaded axis2-1.1.1 deployed it in tomcat and invoked the version
servive from the browser using
http://localhost:8091/axis2/rest/Version/getVersion it works fine out of the
box.

Thanks,
Keith.

On 5/25/07, smitha.aldrin@wipro.com <sm...@wipro.com> wrote:
>
>  Hi Keith
>
>
>
> Thanks for the reply…
>
> Yeah …I am using axis2-1.1.1.Can't we directly give the Rest Epr to the
> browser and get it executed?
>
> My requirement is to get it executed directly by giving the Rest Epr in
> the browser.
>
>
>  ------------------------------
>
> *From:* keith chapman [mailto:keithgchapman@gmail.com]
> *Sent:* Friday, May 25, 2007 10:58 AM
> *To:* axis-dev@ws.apache.org
> *Subject:* Re: Rest APIs
>
>
>
> Hi Samitha,
>
> Are you using Axis2-1.1.1? from your axis2.xml it looks like so. The code
> fragment that saminda had given works on Axis2-1.2 and not 1.1.
>
> Can you confirm on your version please.
>
> Thanks,
> Keith.
>
> On 5/25/07, *smitha.aldrin@wipro.com* <smitha.aldrin@wipro.com > wrote:
>
>
> Hi
> Following is my axis2.xml entries by default.
>
> <!-- If the enableRESTInAxis2MainServlet is true, then Axis2MainServlet
> will handle both SOAP and REST messages -->
>     <parameter name="enableRESTInAxis2MainServlet"
> locked="true">false</parameter>
>
>     <!-- Following parameter will completely disable REST handling in
> both the servlets-->
>     <parameter name="disableREST" locked="true">false</parameter>
>
>     <!-- This will disable the separate servlet we have for REST
> handling. -->
>     <parameter name="disableSeparateEndpointForREST"
> locked="true">false</parameter>
>
> It seems axis2.war is coming by default with rest API's disabled.
>
> When I am trying to access
> http://localhost:8080/axis2/rest/Version/getVersion through browser i am
> getting the following error "Please enable REST support in
> WEB-INF/conf/axis2.xml and WEB-INF/web.xml"
>
> -----Original Message-----
> From: Samisa Abeysinghe [mailto:samisa.abeysinghe@gmail.com]
> Sent: Friday, May 25, 2007 7:43 AM
> To: axis-dev@ws.apache.org
> Subject: Re: Rest APIs
>
> smitha.aldrin@wipro.com wrote:
> >
> > Hi
> >
> >
> >
> >     Can anybody help me enable rest APIs in my webservices?
> >
> http://ws.apache.org/axis2/1_2/rest-ws.html
>
> Axis2 HTTP endpoints can handle both REST and SOAP by default, unless
> you explicitly disable it using disableREST parameter in axis2.xml conf
> file.
>
> HTH.
>
> Samisa...
>
> --
> Samisa Abeysinghe : http://www.bloglines.com/blog/samisa
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>
>
> The information contained in this electronic message and any attachments
> to this message are intended for the exclusive use of the addressee(s) and
> may contain proprietary, confidential or privileged information. If you are
> not the intended recipient, you should not disseminate, distribute or copy
> this e-mail. Please notify the sender immediately and destroy all copies of
> this message and any attachments.
>
> WARNING: Computer viruses can be transmitted via email. The recipient
> should check this email and any attachments for the presence of viruses. The
> company accepts no liability for any damage caused by any virus transmitted
> by this email.
>
> www.wipro.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>
>
>
> --
> Keith Chapman
> WSO2 Inc.
> Oxygen for Web Services Developers.
> http://wso2.org/
>
> The information contained in this electronic message and any attachments
> to this message are intended for the exclusive use of the addressee(s) and
> may contain proprietary, confidential or privileged information. If you are
> not the intended recipient, you should not disseminate, distribute or copy
> this e-mail. Please notify the sender immediately and destroy all copies of
> this message and any attachments.
>
> WARNING: Computer viruses can be transmitted via email. The recipient
> should check this email and any attachments for the presence of viruses. The
> company accepts no liability for any damage caused by any virus transmitted
> by this email.
>
> www.wipro.com
>



-- 
Keith Chapman
WSO2 Inc.
Oxygen for Web Services Developers.
http://wso2.org/

RE: Rest APIs

Posted by sm...@wipro.com.
Hi Keith

 

Thanks for the reply...

Yeah ...I am using axis2-1.1.1.Can't we directly give the Rest Epr to
the browser and get it executed?

My requirement is to get it executed directly by giving the Rest Epr in
the browser. 

 

________________________________

From: keith chapman [mailto:keithgchapman@gmail.com] 
Sent: Friday, May 25, 2007 10:58 AM
To: axis-dev@ws.apache.org
Subject: Re: Rest APIs

 

Hi Samitha,

Are you using Axis2-1.1.1? from your axis2.xml it looks like so. The
code fragment that saminda had given works on Axis2-1.2 and not 1.1.

Can you confirm on your version please.

Thanks,
Keith.

On 5/25/07, smitha.aldrin@wipro.com <smitha.aldrin@wipro.com > wrote:


Hi
Following is my axis2.xml entries by default.

<!-- If the enableRESTInAxis2MainServlet is true, then Axis2MainServlet 
will handle both SOAP and REST messages -->
    <parameter name="enableRESTInAxis2MainServlet"
locked="true">false</parameter>

    <!-- Following parameter will completely disable REST handling in 
both the servlets-->
    <parameter name="disableREST" locked="true">false</parameter>

    <!-- This will disable the separate servlet we have for REST
handling. --> 
    <parameter name="disableSeparateEndpointForREST"
locked="true">false</parameter>

It seems axis2.war is coming by default with rest API's disabled.

When I am trying to access 
http://localhost:8080/axis2/rest/Version/getVersion through browser i am
getting the following error "Please enable REST support in
WEB-INF/conf/axis2.xml and WEB-INF/web.xml" 

-----Original Message-----
From: Samisa Abeysinghe [mailto:samisa.abeysinghe@gmail.com]
Sent: Friday, May 25, 2007 7:43 AM
To: axis-dev@ws.apache.org
Subject: Re: Rest APIs

smitha.aldrin@wipro.com wrote:
>
> Hi
>
>
>
>     Can anybody help me enable rest APIs in my webservices? 
>
http://ws.apache.org/axis2/1_2/rest-ws.html

Axis2 HTTP endpoints can handle both REST and SOAP by default, unless
you explicitly disable it using disableREST parameter in axis2.xml conf
file.

HTH.

Samisa...

--
Samisa Abeysinghe : http://www.bloglines.com/blog/samisa


--------------------------------------------------------------------- 
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org 



The information contained in this electronic message and any attachments
to this message are intended for the exclusive use of the addressee(s)
and may contain proprietary, confidential or privileged information. If
you are not the intended recipient, you should not disseminate,
distribute or copy this e-mail. Please notify the sender immediately and
destroy all copies of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient
should check this email and any attachments for the presence of viruses.
The company accepts no liability for any damage caused by any virus
transmitted by this email. 

www.wipro.com

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org 
For additional commands, e-mail: axis-dev-help@ws.apache.org




-- 
Keith Chapman
WSO2 Inc.
Oxygen for Web Services Developers. 
http://wso2.org/ 




The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
 
www.wipro.com

Re: Rest APIs

Posted by keith chapman <ke...@gmail.com>.
Hi Samitha,

Are you using Axis2-1.1.1? from your axis2.xml it looks like so. The code
fragment that saminda had given works on Axis2-1.2 and not 1.1.

Can you confirm on your version please.

Thanks,
Keith.

On 5/25/07, smitha.aldrin@wipro.com <sm...@wipro.com> wrote:
>
>
> Hi
> Following is my axis2.xml entries by default.
>
> <!-- If the enableRESTInAxis2MainServlet is true, then Axis2MainServlet
> will handle both SOAP and REST messages -->
>     <parameter name="enableRESTInAxis2MainServlet"
> locked="true">false</parameter>
>
>     <!-- Following parameter will completely disable REST handling in
> both the servlets-->
>     <parameter name="disableREST" locked="true">false</parameter>
>
>     <!-- This will disable the separate servlet we have for REST
> handling. -->
>     <parameter name="disableSeparateEndpointForREST"
> locked="true">false</parameter>
>
> It seems axis2.war is coming by default with rest API's disabled.
>
> When I am trying to access
> http://localhost:8080/axis2/rest/Version/getVersion through browser i am
> getting the following error "Please enable REST support in
> WEB-INF/conf/axis2.xml and WEB-INF/web.xml"
>
> -----Original Message-----
> From: Samisa Abeysinghe [mailto:samisa.abeysinghe@gmail.com]
> Sent: Friday, May 25, 2007 7:43 AM
> To: axis-dev@ws.apache.org
> Subject: Re: Rest APIs
>
> smitha.aldrin@wipro.com wrote:
> >
> > Hi
> >
> >
> >
> >     Can anybody help me enable rest APIs in my webservices?
> >
> http://ws.apache.org/axis2/1_2/rest-ws.html
>
> Axis2 HTTP endpoints can handle both REST and SOAP by default, unless
> you explicitly disable it using disableREST parameter in axis2.xml conf
> file.
>
> HTH.
>
> Samisa...
>
> --
> Samisa Abeysinghe : http://www.bloglines.com/blog/samisa
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>
>
> The information contained in this electronic message and any attachments
> to this message are intended for the exclusive use of the addressee(s) and
> may contain proprietary, confidential or privileged information. If you are
> not the intended recipient, you should not disseminate, distribute or copy
> this e-mail. Please notify the sender immediately and destroy all copies of
> this message and any attachments.
>
> WARNING: Computer viruses can be transmitted via email. The recipient
> should check this email and any attachments for the presence of viruses. The
> company accepts no liability for any damage caused by any virus transmitted
> by this email.
>
> www.wipro.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>


-- 
Keith Chapman
WSO2 Inc.
Oxygen for Web Services Developers.
http://wso2.org/

RE: Rest APIs

Posted by sm...@wipro.com.
Hi
Following is my axis2.xml entries by default.

<!-- If the enableRESTInAxis2MainServlet is true, then Axis2MainServlet
will handle both SOAP and REST messages -->
    <parameter name="enableRESTInAxis2MainServlet"
locked="true">false</parameter>

    <!-- Following parameter will completely disable REST handling in
both the servlets-->
    <parameter name="disableREST" locked="true">false</parameter>

    <!-- This will disable the separate servlet we have for REST
handling. -->
    <parameter name="disableSeparateEndpointForREST"
locked="true">false</parameter>

It seems axis2.war is coming by default with rest API's disabled.

When I am trying to access
http://localhost:8080/axis2/rest/Version/getVersion through browser i am
getting the following error "Please enable REST support in
WEB-INF/conf/axis2.xml and WEB-INF/web.xml"

-----Original Message-----
From: Samisa Abeysinghe [mailto:samisa.abeysinghe@gmail.com] 
Sent: Friday, May 25, 2007 7:43 AM
To: axis-dev@ws.apache.org
Subject: Re: Rest APIs

smitha.aldrin@wipro.com wrote:
>
> Hi
>
>  
>
>     Can anybody help me enable rest APIs in my webservices?
>
http://ws.apache.org/axis2/1_2/rest-ws.html

Axis2 HTTP endpoints can handle both REST and SOAP by default, unless 
you explicitly disable it using disableREST parameter in axis2.xml conf 
file.

HTH.

Samisa...

-- 
Samisa Abeysinghe : http://www.bloglines.com/blog/samisa


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org



The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
 
www.wipro.com

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Re: Rest APIs

Posted by Samisa Abeysinghe <sa...@gmail.com>.
smitha.aldrin@wipro.com wrote:
>
> Hi
>
>  
>
>     Can anybody help me enable rest APIs in my webservices?
>
http://ws.apache.org/axis2/1_2/rest-ws.html

Axis2 HTTP endpoints can handle both REST and SOAP by default, unless 
you explicitly disable it using disableREST parameter in axis2.xml conf 
file.

HTH.

Samisa...

-- 
Samisa Abeysinghe : http://www.bloglines.com/blog/samisa


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org