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 rjain <rj...@yahoo.com> on 2007/03/05 15:40:41 UTC

Re: [axis2] How to Configure/Enable Axis2 for REST

Hi, 

Let me explain what are the steps I do and what is the result I get

1. I have downloaded the axis-2.1.1 distribution, and created a axis2.war
file. 
2. I have Tomcat 5.5.15, and drop the war file in the webapps folder
3. I start Tomcat, and access the following URL 
http://localhost:8080/axis2/services/listServices

It shows me the Version Service with the following URL's 

Service EPR : http://localhost:8080/axis2/services/Version
Service REST epr : http://localhost:8080/axis2/rest/Version

If I try to access the first URL
(http://localhost:8080/axis2/services/Version) I get the following message

Please enable REST support in WEB-INF/conf/axis2.xml and WEB-INF/web.xml

If I try to access the second URL (http://localhost:8080/axis2/rest/Version)
I get the following error message
<soapenv:Fault>
<faultcode/>
−
	<faultstring>
I can not find a service for this request to be serviced. Check the WSDL and
the request URI
</faultstring>
<detail/>
</soapenv:Fault>

Next, I go the axis2.xml and  in the webapps/axis/WEB-INF\conf folder and
change the following settings
    <parameter name="servicePath" locked="false">services</parameter>
    <parameter name="restPath" locked="false">rest</parameter>
    <parameter name="enableRESTInAxis2MainServlet"
locked="true">true</parameter>

The rest all parameters are default, I don't change anything else. 

I stop and start tomcat, access the List services, it shows me the same URL. 
I try to access the first URL, http://localhost:8080/axis2/services/Version,
I get the error message
<soapenv:Fault>
<faultcode/>
−
	<faultstring>
I can not find a service for this request to be serviced. Check the WSDL and
the request URI
</faultstring>
<detail/>
</soapenv:Fault>

I try to access the second URL, http://localhost:8080/axis2/rest/Version, I
get the error message
soapenv:Fault>
<faultcode/>
−
	<faultstring>
I can not find a service for this request to be serviced. Check the WSDL and
the request URI
</faultstring>
<detail/>
</soapenv:Fault>

I check the WSDL at http://localhost:8080/axis2/services/Version?wsdl, and
it is available. 

I have tried with the Nightly builds, where the configuration parameters are
simpler, I have not 
been successful. I would like to know what is the step I am missing or going
wrong. 

Thanx once again for all the help!!

regards
Rajesh


Manoj Khangaonkar wrote:
> 
> Rajesh,
> 
> REST is enabled by default.
> 
> What is not working ? What error are u getting ?
> 
> In the email below - the wrong URL is used to get the Version. The
> documentation has the right URL
> 
> Mj
> 
> 
> On 3/3/07, rjain <rj...@yahoo.com> wrote:
>>
>>
>> Hi,
>>
>> I am trying to configure the axis2.xml and web.xml for REST. What are the
>> parameters I need to set? I have tried all combinations of parameters and
>> it
>> doesn't seem to work. Out of box axis2.war, doesn't work (the Version
>> REST
>> Service doesn't work) Is this broken and do I have to do anything. Please
>> help!!!
>>
>> Below is the conversation from the axis-user mailing list, and I haven't
>> got
>> any useful information
>>
>> regards
>> Rajesh
>>
>>
>>
>> > Hi Glen
>> >
>> > Thanx for the article. But this didn't help.
>> >
>> > If I set both the parameters as described in the document i.e.
>> > <parameter name="enableRESTInAxis2MainServlet"
>> > locked="true">true</parameter>
>> >
>> > <parameter name="disableSeparateEndpointForREST"
>> > locked="true">true</parameter>
>> >
>> > Both the Service URL are same
>> > Service EPR : http://localhost:8080/axis2/services/Version
>> > Service REST epr : http://localhost:8080/axis2/services/Version
>> >
>> > I get the following error
>> >
>> > <soapenv:Fault>
>> > <faultcode/>
>> > −
>> > <faultstring>
>> > I can not find a service for this request to be serviced. Check the
>> WSDL
>> > and
>> > the request URI
>> > </faultstring>
>> > <detail/>
>> > </soapenv:Fault>
>> >
>> >
>> > I hope this feature is not broken in the latest version. Any other
>> > pointers
>> > what I should be doing?
>> >
>>
>> Sorry, I have not done this before.  You may wish to google the
>> parameter properties "enableRESTInAxis2MainServlet" and
>> "disableSeparateEndpointForREST" separately.  Hopefully that will lead
>> you to a working configuration.
>>
>> Glen
>>
>>
>>
>>
>> > ===============================================
>> >
>> >
>> >
>> > GlenMazza wrote:
>> > >
>> > > Am Freitag, den 02.03.2007, 17:05 -0800 schrieb rjain:
>> > >> Hi
>> > >>
>> > >> I am using Axis2 1.1.1 , and I am trying to configure the "Version"
>> > >> Service
>> > >> to be RESTFul.
>> > >
>> > > ...
>> > >
>> > >> Can someone guide me to the documentation of how to Enable AXIS2 for
>> > >> REST,what are the configuration parameters I need to set to make
>> this
>> > >> successful.
>> > >>
>> > >
>> > > Search on this page[1] for the two articles (under External FAQs)
>> with
>> > > the word "REST".  Let us know if they help you.
>> > >
>> > > Glen
>> > >
>> > > [1] http://wiki.apache.org/ws/FrontPage/Axis2/
>> > >
>> > >
>> > >> Thanx!
>> > >> Rajesh
>> > >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/How-to-Configure-Enable-Axis2-for-REST-tf3339998.html#a9289123
>> Sent from the Axis - Dev mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-dev-help@ws.apache.org
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/How-to-Configure-Enable-Axis2-for-REST-tf3339998.html#a9312570
Sent from the Axis - Dev mailing list archive at Nabble.com.


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


Re: [axis2] How to Configure/Enable Axis2 for REST

Posted by keith chapman <ke...@gmail.com>.
On 3/6/07, Glen Daniels <gl...@thoughtcraft.com> wrote:
>
> Hi Anne, all:
>
> Anne Thomas Manes wrote:
> > The reason why the getVersion service works as a RESTful service is
> > that it only supports the GET operation. If you really want to support
> > REST then you need to put constraints on the types of resources and
> > the available methods that can be exposed via a REST interface.
> >
> > If you're tunneling an operation name via the interface, then it isn't
> > REST. It's POX.
> >
> > (Ignore me if you want, but I just had to say it.)
>
> +1.  I think the work that's been done is great in its own way, but a
> lot more thought needs to go into making this right - and "right" in
> this case does not mean exposing every method on a service via POX
> (although that can have its place too).
>
> As a start, we should be able to configure any method on a service as
> the "GET" method - as Chinthaka noted, if there is only one method it
> can default to that, and if there are more you should be able to choose
> one.  In general this points to a way to link up HTTP operations with
> particular WS methods - i.e. we can do the same with PUT, DELETE, etc.
>
> I think the interesting next step will be resource-enabling data that
> lives behind a WS interface, and there's a potentially valuable niche
> here.  Imagine I have an employee management service, which lets me walk
> the organizational hierarchy of my company...
>
> EmployeeService {
>     Employee [] getEmployees();
>     Employee getEmployee(String name);
>     void addEmployee(Employee employee);
> }
>
> Employee {
>     String getName();
>     Employee getManager();
> }
>
> What I want is to be able to map GET on http://server/employees to the
> getEmployees() operation, and return a chunk of XML with links in it:
>
> <employees>
>   <employee uri="http://server/employees/Fred"/>
>   <employee uri="http://server/employees/Wilma"/>
> </employees>
>
> Then if I do a GET on Fred's URI, I'd get something like:
>
> <employee>
>   <name>Fred</name>
>   <manager uri="http://server/employees/MrSlate"/>
> </employee>
>
> That means mapping the "/Fred" suffix somehow to call
> getEmployee("Fred")...



Hi Glen,

With axis2 supporting WSDL 2.0 this can be done with ease  through the
HTTPBinding (As you will know). May be it would be  even more valuable if we
could expose setting these properties  as annotations (httpLocation and
stuff)...

and then maybe allowing PUTs or POSTs to the
> Fred-specific URI in order to edit data about an employee.  There are of
> course other ways to do this as well, this is just an example.
>
> This kind of thing, as I understand it, would be more heading towards
> RESTful services.  It's the mapping that's tricky, which is why efforts
> like the recent RESTful Java JSR submission have been starting up...
>
> --Glen
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>
Thanks,
Keith

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

Re: [axis2] How to Configure/Enable Axis2 for REST

Posted by Glen Daniels <gl...@thoughtcraft.com>.
Hi Anne, all:

Anne Thomas Manes wrote:
> The reason why the getVersion service works as a RESTful service is
> that it only supports the GET operation. If you really want to support
> REST then you need to put constraints on the types of resources and
> the available methods that can be exposed via a REST interface.
> 
> If you're tunneling an operation name via the interface, then it isn't
> REST. It's POX.
> 
> (Ignore me if you want, but I just had to say it.)

+1.  I think the work that's been done is great in its own way, but a
lot more thought needs to go into making this right - and "right" in
this case does not mean exposing every method on a service via POX
(although that can have its place too).

As a start, we should be able to configure any method on a service as
the "GET" method - as Chinthaka noted, if there is only one method it
can default to that, and if there are more you should be able to choose
one.  In general this points to a way to link up HTTP operations with
particular WS methods - i.e. we can do the same with PUT, DELETE, etc.

I think the interesting next step will be resource-enabling data that
lives behind a WS interface, and there's a potentially valuable niche
here.  Imagine I have an employee management service, which lets me walk
the organizational hierarchy of my company...

EmployeeService {
    Employee [] getEmployees();
    Employee getEmployee(String name);
    void addEmployee(Employee employee);
}

Employee {
    String getName();
    Employee getManager();
}

What I want is to be able to map GET on http://server/employees to the
getEmployees() operation, and return a chunk of XML with links in it:

<employees>
  <employee uri="http://server/employees/Fred"/>
  <employee uri="http://server/employees/Wilma"/>
</employees>

Then if I do a GET on Fred's URI, I'd get something like:

<employee>
  <name>Fred</name>
  <manager uri="http://server/employees/MrSlate"/>
</employee>

That means mapping the "/Fred" suffix somehow to call
getEmployee("Fred")... and then maybe allowing PUTs or POSTs to the
Fred-specific URI in order to edit data about an employee.  There are of
course other ways to do this as well, this is just an example.

This kind of thing, as I understand it, would be more heading towards
RESTful services.  It's the mapping that's tricky, which is why efforts
like the recent RESTful Java JSR submission have been starting up...

--Glen

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


Re: [axis2] How to Configure/Enable Axis2 for REST

Posted by Anne Thomas Manes <at...@gmail.com>.
I haven't said anything about this before, but it's really starting to
bother me. There's a real problem with the idea of specifying an
"operation" with a service that supposed to be RESTful.

Keep in mind that REST is an architectural style. Rule number one when
following REST architectural principles. The ONLY operations involved
are those defined by a uniform interface: in the case of HTTP, that
uniform interface supports the following operations: GET, PUT, POST,
DELETE. You perform these operations on "resources" by exchanging
"representations" of those resources (hence the name Representational
State Transfer).

The reason why the getVersion service works as a RESTful service is
that it only supports the GET operation. If you really want to support
REST then you need to put constraints on the types of resources and
the available methods that can be exposed via a REST interface.

If you're tunneling an operation name via the interface, then it isn't
REST. It's POX.

(Ignore me if you want, but I just had to say it.)

Anne

On 3/6/07, Eran Chinthaka <ch...@opensource.lk> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> What is shown in the web interface is the EPR only. You need to append
> the operation name also to that.
>
> Anyway this has more things to think about, in addition to solving the
> problem that you have mentioned.
>
> 1. Seems the error message could have been improved
> 2. Do we wanna use some sort of defaulting where, if the service has
> just one operation then even if the request doesn't contain the
> operation, we can return the proper reply. I think version service has
> just one operation.
>
> Any thoughts on this?
>
> - -- Chinthaka
>
> rjain wrote:
> > Thanx, whew, how could I miss that one!!
> >
> >
> > Manoj Khangaonkar wrote:
> >> Rajest,
> >>
> >> The url you need to enter in the browser is I think
> >>
> >> http://localhost:8080/axis2/rest/Version/getVersion
> >>
> >> Mj
> >>
> >>
> >> On 3/5/07, rjain <rj...@yahoo.com> wrote:
> >>>
> >>> Hi,
> >>>
> >>> Let me explain what are the steps I do and what is the result I get
> >>>
> >>> 1. I have downloaded the axis-2.1.1 distribution, and created a axis2.war
> >>> file.
> >>> 2. I have Tomcat 5.5.15, and drop the war file in the webapps folder
> >>> 3. I start Tomcat, and access the following URL
> >>> http://localhost:8080/axis2/services/listServices
> >>>
> >>> It shows me the Version Service with the following URL's
> >>>
> >>> Service EPR : http://localhost:8080/axis2/services/Version
> >>> Service REST epr : http://localhost:8080/axis2/rest/Version
> >>>
> >>> If I try to access the first URL
> >>> (http://localhost:8080/axis2/services/Version) I get the following
> >>> message
> >>>
> >>> Please enable REST support in WEB-INF/conf/axis2.xml and WEB-INF/web.xml
> >>>
> >>> If I try to access the second URL (
> >>> http://localhost:8080/axis2/rest/Version)
> >>> I get the following error message
> >>> <soapenv:Fault>
> >>> <faultcode/>
> >>> −
> >>>        <faultstring>
> >>> I can not find a service for this request to be serviced. Check the WSDL
> >>> and
> >>> the request URI
> >>> </faultstring>
> >>> <detail/>
> >>> </soapenv:Fault>
> >>>
> >>> Next, I go the axis2.xml and  in the webapps/axis/WEB-INF\conf folder and
> >>> change the following settings
> >>>    <parameter name="servicePath" locked="false">services</parameter>
> >>>    <parameter name="restPath" locked="false">rest</parameter>
> >>>    <parameter name="enableRESTInAxis2MainServlet"
> >>> locked="true">true</parameter>
> >>>
> >>> The rest all parameters are default, I don't change anything else.
> >>>
> >>> I stop and start tomcat, access the List services, it shows me the same
> >>> URL.
> >>> I try to access the first URL,
> >>> http://localhost:8080/axis2/services/Version,
> >>> I get the error message
> >>> <soapenv:Fault>
> >>> <faultcode/>
> >>> −
> >>>        <faultstring>
> >>> I can not find a service for this request to be serviced. Check the WSDL
> >>> and
> >>> the request URI
> >>> </faultstring>
> >>> <detail/>
> >>> </soapenv:Fault>
> >>>
> >>> I try to access the second URL, http://localhost:8080/axis2/rest/Version,
> >>> I
> >>> get the error message
> >>> soapenv:Fault>
> >>> <faultcode/>
> >>> −
> >>>        <faultstring>
> >>> I can not find a service for this request to be serviced. Check the WSDL
> >>> and
> >>> the request URI
> >>> </faultstring>
> >>> <detail/>
> >>> </soapenv:Fault>
> >>>
> >>> I check the WSDL at http://localhost:8080/axis2/services/Version?wsdl,
> >>> and
> >>> it is available.
> >>>
> >>> I have tried with the Nightly builds, where the configuration parameters
> >>> are
> >>> simpler, I have not
> >>> been successful. I would like to know what is the step I am missing or
> >>> going
> >>> wrong.
> >>>
> >>> Thanx once again for all the help!!
> >>>
> >>> regards
> >>> Rajesh
> >>>
> >>>
> >>> Manoj Khangaonkar wrote:
> >>>> Rajesh,
> >>>>
> >>>> REST is enabled by default.
> >>>>
> >>>> What is not working ? What error are u getting ?
> >>>>
> >>>> In the email below - the wrong URL is used to get the Version. The
> >>>> documentation has the right URL
> >>>>
> >>>> Mj
> >>>>
> >>>>
> >>>> On 3/3/07, rjain <rj...@yahoo.com> wrote:
> >>>>>
> >>>>> Hi,
> >>>>>
> >>>>> I am trying to configure the axis2.xml and web.xml for REST. What are
> >>> the
> >>>>> parameters I need to set? I have tried all combinations of parameters
> >>> and
> >>>>> it
> >>>>> doesn't seem to work. Out of box axis2.war, doesn't work (the Version
> >>>>> REST
> >>>>> Service doesn't work) Is this broken and do I have to do anything.
> >>> Please
> >>>>> help!!!
> >>>>>
> >>>>> Below is the conversation from the axis-user mailing list, and I
> >>> haven't
> >>>>> got
> >>>>> any useful information
> >>>>>
> >>>>> regards
> >>>>> Rajesh
> >>>>>
> >>>>>
> >>>>>
> >>>>>> Hi Glen
> >>>>>>
> >>>>>> Thanx for the article. But this didn't help.
> >>>>>>
> >>>>>> If I set both the parameters as described in the document i.e.
> >>>>>> <parameter name="enableRESTInAxis2MainServlet"
> >>>>>> locked="true">true</parameter>
> >>>>>>
> >>>>>> <parameter name="disableSeparateEndpointForREST"
> >>>>>> locked="true">true</parameter>
> >>>>>>
> >>>>>> Both the Service URL are same
> >>>>>> Service EPR : http://localhost:8080/axis2/services/Version
> >>>>>> Service REST epr : http://localhost:8080/axis2/services/Version
> >>>>>>
> >>>>>> I get the following error
> >>>>>>
> >>>>>> <soapenv:Fault>
> >>>>>> <faultcode/>
> >>>>>> −
> >>>>>> <faultstring>
> >>>>>> I can not find a service for this request to be serviced. Check the
> >>>>> WSDL
> >>>>>> and
> >>>>>> the request URI
> >>>>>> </faultstring>
> >>>>>> <detail/>
> >>>>>> </soapenv:Fault>
> >>>>>>
> >>>>>>
> >>>>>> I hope this feature is not broken in the latest version. Any other
> >>>>>> pointers
> >>>>>> what I should be doing?
> >>>>>>
> >>>>> Sorry, I have not done this before.  You may wish to google the
> >>>>> parameter properties "enableRESTInAxis2MainServlet" and
> >>>>> "disableSeparateEndpointForREST" separately.  Hopefully that will lead
> >>>>> you to a working configuration.
> >>>>>
> >>>>> Glen
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>> ===============================================
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>> GlenMazza wrote:
> >>>>>>> Am Freitag, den 02.03.2007, 17:05 -0800 schrieb rjain:
> >>>>>>>> Hi
> >>>>>>>>
> >>>>>>>> I am using Axis2 1.1.1 , and I am trying to configure the
> >>> "Version"
> >>>>>>>> Service
> >>>>>>>> to be RESTFul.
> >>>>>>> ...
> >>>>>>>
> >>>>>>>> Can someone guide me to the documentation of how to Enable AXIS2
> >>> for
> >>>>>>>> REST,what are the configuration parameters I need to set to make
> >>>>> this
> >>>>>>>> successful.
> >>>>>>>>
> >>>>>>> Search on this page[1] for the two articles (under External FAQs)
> >>>>> with
> >>>>>>> the word "REST".  Let us know if they help you.
> >>>>>>>
> >>>>>>> Glen
> >>>>>>>
> >>>>>>> [1] http://wiki.apache.org/ws/FrontPage/Axis2/
> >>>>>>>
> >>>>>>>
> >>>>>>>> Thanx!
> >>>>>>>> Rajesh
> >>>>> --
> >>>>> View this message in context:
> >>>>>
> >>> http://www.nabble.com/How-to-Configure-Enable-Axis2-for-REST-tf3339998.html#a9289123
> >>>>> Sent from the Axis - Dev mailing list archive at Nabble.com.
> >>>>>
> >>>>>
> >>>>> ---------------------------------------------------------------------
> >>>>> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> >>>>> For additional commands, e-mail: axis-dev-help@ws.apache.org
> >>>>>
> >>>>>
> >>>>
> >>> --
> >>> View this message in context:
> >>> http://www.nabble.com/How-to-Configure-Enable-Axis2-for-REST-tf3339998.html#a9312570
> >>> Sent from the Axis - Dev mailing list archive at Nabble.com.
> >>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> >>> For additional commands, e-mail: axis-dev-help@ws.apache.org
> >>>
> >>>
> >>
> >
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.3 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFF7Pq6jON2uBzUhh8RAiNGAJ9wiQ0FrsAITadDdiL9SYwX7CI4yACfYRyU
> DmKTo6sL4eQiYFQdURrQFq8=
> =Dxp3
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>

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


Re: [axis2] How to Configure/Enable Axis2 for REST

Posted by Eran Chinthaka <ch...@opensource.lk>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

What is shown in the web interface is the EPR only. You need to append
the operation name also to that.

Anyway this has more things to think about, in addition to solving the
problem that you have mentioned.

1. Seems the error message could have been improved
2. Do we wanna use some sort of defaulting where, if the service has
just one operation then even if the request doesn't contain the
operation, we can return the proper reply. I think version service has
just one operation.

Any thoughts on this?

- -- Chinthaka

rjain wrote:
> Thanx, whew, how could I miss that one!!
> 
> 
> Manoj Khangaonkar wrote:
>> Rajest,
>>
>> The url you need to enter in the browser is I think
>>
>> http://localhost:8080/axis2/rest/Version/getVersion
>>
>> Mj
>>
>>
>> On 3/5/07, rjain <rj...@yahoo.com> wrote:
>>>
>>> Hi,
>>>
>>> Let me explain what are the steps I do and what is the result I get
>>>
>>> 1. I have downloaded the axis-2.1.1 distribution, and created a axis2.war
>>> file.
>>> 2. I have Tomcat 5.5.15, and drop the war file in the webapps folder
>>> 3. I start Tomcat, and access the following URL
>>> http://localhost:8080/axis2/services/listServices
>>>
>>> It shows me the Version Service with the following URL's
>>>
>>> Service EPR : http://localhost:8080/axis2/services/Version
>>> Service REST epr : http://localhost:8080/axis2/rest/Version
>>>
>>> If I try to access the first URL
>>> (http://localhost:8080/axis2/services/Version) I get the following
>>> message
>>>
>>> Please enable REST support in WEB-INF/conf/axis2.xml and WEB-INF/web.xml
>>>
>>> If I try to access the second URL (
>>> http://localhost:8080/axis2/rest/Version)
>>> I get the following error message
>>> <soapenv:Fault>
>>> <faultcode/>
>>> −
>>>        <faultstring>
>>> I can not find a service for this request to be serviced. Check the WSDL
>>> and
>>> the request URI
>>> </faultstring>
>>> <detail/>
>>> </soapenv:Fault>
>>>
>>> Next, I go the axis2.xml and  in the webapps/axis/WEB-INF\conf folder and
>>> change the following settings
>>>    <parameter name="servicePath" locked="false">services</parameter>
>>>    <parameter name="restPath" locked="false">rest</parameter>
>>>    <parameter name="enableRESTInAxis2MainServlet"
>>> locked="true">true</parameter>
>>>
>>> The rest all parameters are default, I don't change anything else.
>>>
>>> I stop and start tomcat, access the List services, it shows me the same
>>> URL.
>>> I try to access the first URL,
>>> http://localhost:8080/axis2/services/Version,
>>> I get the error message
>>> <soapenv:Fault>
>>> <faultcode/>
>>> −
>>>        <faultstring>
>>> I can not find a service for this request to be serviced. Check the WSDL
>>> and
>>> the request URI
>>> </faultstring>
>>> <detail/>
>>> </soapenv:Fault>
>>>
>>> I try to access the second URL, http://localhost:8080/axis2/rest/Version,
>>> I
>>> get the error message
>>> soapenv:Fault>
>>> <faultcode/>
>>> −
>>>        <faultstring>
>>> I can not find a service for this request to be serviced. Check the WSDL
>>> and
>>> the request URI
>>> </faultstring>
>>> <detail/>
>>> </soapenv:Fault>
>>>
>>> I check the WSDL at http://localhost:8080/axis2/services/Version?wsdl,
>>> and
>>> it is available.
>>>
>>> I have tried with the Nightly builds, where the configuration parameters
>>> are
>>> simpler, I have not
>>> been successful. I would like to know what is the step I am missing or
>>> going
>>> wrong.
>>>
>>> Thanx once again for all the help!!
>>>
>>> regards
>>> Rajesh
>>>
>>>
>>> Manoj Khangaonkar wrote:
>>>> Rajesh,
>>>>
>>>> REST is enabled by default.
>>>>
>>>> What is not working ? What error are u getting ?
>>>>
>>>> In the email below - the wrong URL is used to get the Version. The
>>>> documentation has the right URL
>>>>
>>>> Mj
>>>>
>>>>
>>>> On 3/3/07, rjain <rj...@yahoo.com> wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> I am trying to configure the axis2.xml and web.xml for REST. What are
>>> the
>>>>> parameters I need to set? I have tried all combinations of parameters
>>> and
>>>>> it
>>>>> doesn't seem to work. Out of box axis2.war, doesn't work (the Version
>>>>> REST
>>>>> Service doesn't work) Is this broken and do I have to do anything.
>>> Please
>>>>> help!!!
>>>>>
>>>>> Below is the conversation from the axis-user mailing list, and I
>>> haven't
>>>>> got
>>>>> any useful information
>>>>>
>>>>> regards
>>>>> Rajesh
>>>>>
>>>>>
>>>>>
>>>>>> Hi Glen
>>>>>>
>>>>>> Thanx for the article. But this didn't help.
>>>>>>
>>>>>> If I set both the parameters as described in the document i.e.
>>>>>> <parameter name="enableRESTInAxis2MainServlet"
>>>>>> locked="true">true</parameter>
>>>>>>
>>>>>> <parameter name="disableSeparateEndpointForREST"
>>>>>> locked="true">true</parameter>
>>>>>>
>>>>>> Both the Service URL are same
>>>>>> Service EPR : http://localhost:8080/axis2/services/Version
>>>>>> Service REST epr : http://localhost:8080/axis2/services/Version
>>>>>>
>>>>>> I get the following error
>>>>>>
>>>>>> <soapenv:Fault>
>>>>>> <faultcode/>
>>>>>> −
>>>>>> <faultstring>
>>>>>> I can not find a service for this request to be serviced. Check the
>>>>> WSDL
>>>>>> and
>>>>>> the request URI
>>>>>> </faultstring>
>>>>>> <detail/>
>>>>>> </soapenv:Fault>
>>>>>>
>>>>>>
>>>>>> I hope this feature is not broken in the latest version. Any other
>>>>>> pointers
>>>>>> what I should be doing?
>>>>>>
>>>>> Sorry, I have not done this before.  You may wish to google the
>>>>> parameter properties "enableRESTInAxis2MainServlet" and
>>>>> "disableSeparateEndpointForREST" separately.  Hopefully that will lead
>>>>> you to a working configuration.
>>>>>
>>>>> Glen
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> ===============================================
>>>>>>
>>>>>>
>>>>>>
>>>>>> GlenMazza wrote:
>>>>>>> Am Freitag, den 02.03.2007, 17:05 -0800 schrieb rjain:
>>>>>>>> Hi
>>>>>>>>
>>>>>>>> I am using Axis2 1.1.1 , and I am trying to configure the
>>> "Version"
>>>>>>>> Service
>>>>>>>> to be RESTFul.
>>>>>>> ...
>>>>>>>
>>>>>>>> Can someone guide me to the documentation of how to Enable AXIS2
>>> for
>>>>>>>> REST,what are the configuration parameters I need to set to make
>>>>> this
>>>>>>>> successful.
>>>>>>>>
>>>>>>> Search on this page[1] for the two articles (under External FAQs)
>>>>> with
>>>>>>> the word "REST".  Let us know if they help you.
>>>>>>>
>>>>>>> Glen
>>>>>>>
>>>>>>> [1] http://wiki.apache.org/ws/FrontPage/Axis2/
>>>>>>>
>>>>>>>
>>>>>>>> Thanx!
>>>>>>>> Rajesh
>>>>> --
>>>>> View this message in context:
>>>>>
>>> http://www.nabble.com/How-to-Configure-Enable-Axis2-for-REST-tf3339998.html#a9289123
>>>>> Sent from the Axis - Dev mailing list archive at Nabble.com.
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
>>>>> For additional commands, e-mail: axis-dev-help@ws.apache.org
>>>>>
>>>>>
>>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/How-to-Configure-Enable-Axis2-for-REST-tf3339998.html#a9312570
>>> Sent from the Axis - Dev mailing list archive at Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
>>> For additional commands, e-mail: axis-dev-help@ws.apache.org
>>>
>>>
>>
> 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFF7Pq6jON2uBzUhh8RAiNGAJ9wiQ0FrsAITadDdiL9SYwX7CI4yACfYRyU
DmKTo6sL4eQiYFQdURrQFq8=
=Dxp3
-----END PGP SIGNATURE-----

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


Re: [axis2] How to Configure/Enable Axis2 for REST

Posted by rjain <rj...@yahoo.com>.
Thanx, whew, how could I miss that one!!


Manoj Khangaonkar wrote:
> 
> Rajest,
> 
> The url you need to enter in the browser is I think
> 
> http://localhost:8080/axis2/rest/Version/getVersion
> 
> Mj
> 
> 
> On 3/5/07, rjain <rj...@yahoo.com> wrote:
>>
>>
>> Hi,
>>
>> Let me explain what are the steps I do and what is the result I get
>>
>> 1. I have downloaded the axis-2.1.1 distribution, and created a axis2.war
>> file.
>> 2. I have Tomcat 5.5.15, and drop the war file in the webapps folder
>> 3. I start Tomcat, and access the following URL
>> http://localhost:8080/axis2/services/listServices
>>
>> It shows me the Version Service with the following URL's
>>
>> Service EPR : http://localhost:8080/axis2/services/Version
>> Service REST epr : http://localhost:8080/axis2/rest/Version
>>
>> If I try to access the first URL
>> (http://localhost:8080/axis2/services/Version) I get the following
>> message
>>
>> Please enable REST support in WEB-INF/conf/axis2.xml and WEB-INF/web.xml
>>
>> If I try to access the second URL (
>> http://localhost:8080/axis2/rest/Version)
>> I get the following error message
>> <soapenv:Fault>
>> <faultcode/>
>> −
>>        <faultstring>
>> I can not find a service for this request to be serviced. Check the WSDL
>> and
>> the request URI
>> </faultstring>
>> <detail/>
>> </soapenv:Fault>
>>
>> Next, I go the axis2.xml and  in the webapps/axis/WEB-INF\conf folder and
>> change the following settings
>>    <parameter name="servicePath" locked="false">services</parameter>
>>    <parameter name="restPath" locked="false">rest</parameter>
>>    <parameter name="enableRESTInAxis2MainServlet"
>> locked="true">true</parameter>
>>
>> The rest all parameters are default, I don't change anything else.
>>
>> I stop and start tomcat, access the List services, it shows me the same
>> URL.
>> I try to access the first URL,
>> http://localhost:8080/axis2/services/Version,
>> I get the error message
>> <soapenv:Fault>
>> <faultcode/>
>> −
>>        <faultstring>
>> I can not find a service for this request to be serviced. Check the WSDL
>> and
>> the request URI
>> </faultstring>
>> <detail/>
>> </soapenv:Fault>
>>
>> I try to access the second URL, http://localhost:8080/axis2/rest/Version,
>> I
>> get the error message
>> soapenv:Fault>
>> <faultcode/>
>> −
>>        <faultstring>
>> I can not find a service for this request to be serviced. Check the WSDL
>> and
>> the request URI
>> </faultstring>
>> <detail/>
>> </soapenv:Fault>
>>
>> I check the WSDL at http://localhost:8080/axis2/services/Version?wsdl,
>> and
>> it is available.
>>
>> I have tried with the Nightly builds, where the configuration parameters
>> are
>> simpler, I have not
>> been successful. I would like to know what is the step I am missing or
>> going
>> wrong.
>>
>> Thanx once again for all the help!!
>>
>> regards
>> Rajesh
>>
>>
>> Manoj Khangaonkar wrote:
>> >
>> > Rajesh,
>> >
>> > REST is enabled by default.
>> >
>> > What is not working ? What error are u getting ?
>> >
>> > In the email below - the wrong URL is used to get the Version. The
>> > documentation has the right URL
>> >
>> > Mj
>> >
>> >
>> > On 3/3/07, rjain <rj...@yahoo.com> wrote:
>> >>
>> >>
>> >> Hi,
>> >>
>> >> I am trying to configure the axis2.xml and web.xml for REST. What are
>> the
>> >> parameters I need to set? I have tried all combinations of parameters
>> and
>> >> it
>> >> doesn't seem to work. Out of box axis2.war, doesn't work (the Version
>> >> REST
>> >> Service doesn't work) Is this broken and do I have to do anything.
>> Please
>> >> help!!!
>> >>
>> >> Below is the conversation from the axis-user mailing list, and I
>> haven't
>> >> got
>> >> any useful information
>> >>
>> >> regards
>> >> Rajesh
>> >>
>> >>
>> >>
>> >> > Hi Glen
>> >> >
>> >> > Thanx for the article. But this didn't help.
>> >> >
>> >> > If I set both the parameters as described in the document i.e.
>> >> > <parameter name="enableRESTInAxis2MainServlet"
>> >> > locked="true">true</parameter>
>> >> >
>> >> > <parameter name="disableSeparateEndpointForREST"
>> >> > locked="true">true</parameter>
>> >> >
>> >> > Both the Service URL are same
>> >> > Service EPR : http://localhost:8080/axis2/services/Version
>> >> > Service REST epr : http://localhost:8080/axis2/services/Version
>> >> >
>> >> > I get the following error
>> >> >
>> >> > <soapenv:Fault>
>> >> > <faultcode/>
>> >> > −
>> >> > <faultstring>
>> >> > I can not find a service for this request to be serviced. Check the
>> >> WSDL
>> >> > and
>> >> > the request URI
>> >> > </faultstring>
>> >> > <detail/>
>> >> > </soapenv:Fault>
>> >> >
>> >> >
>> >> > I hope this feature is not broken in the latest version. Any other
>> >> > pointers
>> >> > what I should be doing?
>> >> >
>> >>
>> >> Sorry, I have not done this before.  You may wish to google the
>> >> parameter properties "enableRESTInAxis2MainServlet" and
>> >> "disableSeparateEndpointForREST" separately.  Hopefully that will lead
>> >> you to a working configuration.
>> >>
>> >> Glen
>> >>
>> >>
>> >>
>> >>
>> >> > ===============================================
>> >> >
>> >> >
>> >> >
>> >> > GlenMazza wrote:
>> >> > >
>> >> > > Am Freitag, den 02.03.2007, 17:05 -0800 schrieb rjain:
>> >> > >> Hi
>> >> > >>
>> >> > >> I am using Axis2 1.1.1 , and I am trying to configure the
>> "Version"
>> >> > >> Service
>> >> > >> to be RESTFul.
>> >> > >
>> >> > > ...
>> >> > >
>> >> > >> Can someone guide me to the documentation of how to Enable AXIS2
>> for
>> >> > >> REST,what are the configuration parameters I need to set to make
>> >> this
>> >> > >> successful.
>> >> > >>
>> >> > >
>> >> > > Search on this page[1] for the two articles (under External FAQs)
>> >> with
>> >> > > the word "REST".  Let us know if they help you.
>> >> > >
>> >> > > Glen
>> >> > >
>> >> > > [1] http://wiki.apache.org/ws/FrontPage/Axis2/
>> >> > >
>> >> > >
>> >> > >> Thanx!
>> >> > >> Rajesh
>> >> > >
>> >>
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/How-to-Configure-Enable-Axis2-for-REST-tf3339998.html#a9289123
>> >> Sent from the Axis - Dev mailing list archive at Nabble.com.
>> >>
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
>> >> For additional commands, e-mail: axis-dev-help@ws.apache.org
>> >>
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/How-to-Configure-Enable-Axis2-for-REST-tf3339998.html#a9312570
>> Sent from the Axis - Dev mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-dev-help@ws.apache.org
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/How-to-Configure-Enable-Axis2-for-REST-tf3339998.html#a9318823
Sent from the Axis - Dev mailing list archive at Nabble.com.


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


Re: [axis2] How to Configure/Enable Axis2 for REST

Posted by Manoj Khangaonkar <kh...@gmail.com>.
Rajest,

The url you need to enter in the browser is I think

http://localhost:8080/axis2/rest/Version/getVersion

Mj


On 3/5/07, rjain <rj...@yahoo.com> wrote:
>
>
> Hi,
>
> Let me explain what are the steps I do and what is the result I get
>
> 1. I have downloaded the axis-2.1.1 distribution, and created a axis2.war
> file.
> 2. I have Tomcat 5.5.15, and drop the war file in the webapps folder
> 3. I start Tomcat, and access the following URL
> http://localhost:8080/axis2/services/listServices
>
> It shows me the Version Service with the following URL's
>
> Service EPR : http://localhost:8080/axis2/services/Version
> Service REST epr : http://localhost:8080/axis2/rest/Version
>
> If I try to access the first URL
> (http://localhost:8080/axis2/services/Version) I get the following message
>
> Please enable REST support in WEB-INF/conf/axis2.xml and WEB-INF/web.xml
>
> If I try to access the second URL (
> http://localhost:8080/axis2/rest/Version)
> I get the following error message
> <soapenv:Fault>
> <faultcode/>
> −
>        <faultstring>
> I can not find a service for this request to be serviced. Check the WSDL
> and
> the request URI
> </faultstring>
> <detail/>
> </soapenv:Fault>
>
> Next, I go the axis2.xml and  in the webapps/axis/WEB-INF\conf folder and
> change the following settings
>    <parameter name="servicePath" locked="false">services</parameter>
>    <parameter name="restPath" locked="false">rest</parameter>
>    <parameter name="enableRESTInAxis2MainServlet"
> locked="true">true</parameter>
>
> The rest all parameters are default, I don't change anything else.
>
> I stop and start tomcat, access the List services, it shows me the same
> URL.
> I try to access the first URL,
> http://localhost:8080/axis2/services/Version,
> I get the error message
> <soapenv:Fault>
> <faultcode/>
> −
>        <faultstring>
> I can not find a service for this request to be serviced. Check the WSDL
> and
> the request URI
> </faultstring>
> <detail/>
> </soapenv:Fault>
>
> I try to access the second URL, http://localhost:8080/axis2/rest/Version,
> I
> get the error message
> soapenv:Fault>
> <faultcode/>
> −
>        <faultstring>
> I can not find a service for this request to be serviced. Check the WSDL
> and
> the request URI
> </faultstring>
> <detail/>
> </soapenv:Fault>
>
> I check the WSDL at http://localhost:8080/axis2/services/Version?wsdl, and
> it is available.
>
> I have tried with the Nightly builds, where the configuration parameters
> are
> simpler, I have not
> been successful. I would like to know what is the step I am missing or
> going
> wrong.
>
> Thanx once again for all the help!!
>
> regards
> Rajesh
>
>
> Manoj Khangaonkar wrote:
> >
> > Rajesh,
> >
> > REST is enabled by default.
> >
> > What is not working ? What error are u getting ?
> >
> > In the email below - the wrong URL is used to get the Version. The
> > documentation has the right URL
> >
> > Mj
> >
> >
> > On 3/3/07, rjain <rj...@yahoo.com> wrote:
> >>
> >>
> >> Hi,
> >>
> >> I am trying to configure the axis2.xml and web.xml for REST. What are
> the
> >> parameters I need to set? I have tried all combinations of parameters
> and
> >> it
> >> doesn't seem to work. Out of box axis2.war, doesn't work (the Version
> >> REST
> >> Service doesn't work) Is this broken and do I have to do anything.
> Please
> >> help!!!
> >>
> >> Below is the conversation from the axis-user mailing list, and I
> haven't
> >> got
> >> any useful information
> >>
> >> regards
> >> Rajesh
> >>
> >>
> >>
> >> > Hi Glen
> >> >
> >> > Thanx for the article. But this didn't help.
> >> >
> >> > If I set both the parameters as described in the document i.e.
> >> > <parameter name="enableRESTInAxis2MainServlet"
> >> > locked="true">true</parameter>
> >> >
> >> > <parameter name="disableSeparateEndpointForREST"
> >> > locked="true">true</parameter>
> >> >
> >> > Both the Service URL are same
> >> > Service EPR : http://localhost:8080/axis2/services/Version
> >> > Service REST epr : http://localhost:8080/axis2/services/Version
> >> >
> >> > I get the following error
> >> >
> >> > <soapenv:Fault>
> >> > <faultcode/>
> >> > −
> >> > <faultstring>
> >> > I can not find a service for this request to be serviced. Check the
> >> WSDL
> >> > and
> >> > the request URI
> >> > </faultstring>
> >> > <detail/>
> >> > </soapenv:Fault>
> >> >
> >> >
> >> > I hope this feature is not broken in the latest version. Any other
> >> > pointers
> >> > what I should be doing?
> >> >
> >>
> >> Sorry, I have not done this before.  You may wish to google the
> >> parameter properties "enableRESTInAxis2MainServlet" and
> >> "disableSeparateEndpointForREST" separately.  Hopefully that will lead
> >> you to a working configuration.
> >>
> >> Glen
> >>
> >>
> >>
> >>
> >> > ===============================================
> >> >
> >> >
> >> >
> >> > GlenMazza wrote:
> >> > >
> >> > > Am Freitag, den 02.03.2007, 17:05 -0800 schrieb rjain:
> >> > >> Hi
> >> > >>
> >> > >> I am using Axis2 1.1.1 , and I am trying to configure the
> "Version"
> >> > >> Service
> >> > >> to be RESTFul.
> >> > >
> >> > > ...
> >> > >
> >> > >> Can someone guide me to the documentation of how to Enable AXIS2
> for
> >> > >> REST,what are the configuration parameters I need to set to make
> >> this
> >> > >> successful.
> >> > >>
> >> > >
> >> > > Search on this page[1] for the two articles (under External FAQs)
> >> with
> >> > > the word "REST".  Let us know if they help you.
> >> > >
> >> > > Glen
> >> > >
> >> > > [1] http://wiki.apache.org/ws/FrontPage/Axis2/
> >> > >
> >> > >
> >> > >> Thanx!
> >> > >> Rajesh
> >> > >
> >>
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/How-to-Configure-Enable-Axis2-for-REST-tf3339998.html#a9289123
> >> Sent from the Axis - Dev mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> >> For additional commands, e-mail: axis-dev-help@ws.apache.org
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/How-to-Configure-Enable-Axis2-for-REST-tf3339998.html#a9312570
> Sent from the Axis - Dev mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>