You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by keith chapman <ke...@gmail.com> on 2007/05/30 13:06:37 UTC
Re: calling web service using REST
http://localhost:81/axis2/services/MyService/getInfo?systemName=
Administrator&systemPassword=Password123
should work.
On 5/30/07, Binoy K Philip <bi...@renaissance-it.com> wrote:
>
>
> Hi All,
> Who do I call a web service operation from browser having input and out
> put
> my target is end point is
> http://localhost:81/axis2/services/MyService/getInfo
>
> ans sopa boady is
> <soapenv:Body><ns1:getInfo xlns:ns1="
> http://webservice.opt.srit.com/xsd"><ns1:systemName>Administrator</ns1:systemName><ns1:systemPassword>Password123</ns1:systemPassword></ns1:getInfo></soapenv:Body
> >
>
>
> Thanks in Advance
> Binoy K Philip
>
--
Keith Chapman
WSO2 Inc.
Oxygen for Web Services Developers.
http://wso2.org/
Re: calling web service using REST
Posted by Anne Thomas Manes <at...@gmail.com>.
On 6/1/07, keith chapman <ke...@gmail.com> wrote:
> Hi,
>
> Axis2 fully supports WSDL 2.0 including the HTTPBinding (Or REST binding if
> one may call it). Which means that Axis2 supports restfull services. Before
> 1.11 Axis2 only supported the POST and GET methods but with the
> implementation of WSDL 2.0 it now supports POST, GET, PUT and DELETE. This
> Enable REST with Web services, Part 1: REST and Web services in WSDL 2.0
> article by Eran Chinthaka explains Axis2, REST and WSDL 2.0.
Well, I'm still a little worried by Eran's approach. The fact that
WSDL is fundamentally centered around defining operations means that
it's still fundamentally disconnected from REST. In fact, in the
article, Eran gives the following example (paraphrased):
****
Given a service that expects a SOAP message containing the following
input information
<GetInformation>
<Name>MyName </Name>
<Age>22 </Age>
</GetInformation>
How can you send this request to the service using HTTP GET (where you
must encode the request in the URI)?
The answer is: http://myserver/PersonInfoService/GetInformation?Name=MyName&Age=22.
***
But, you see the problem is that the URI references the method
("GetInformation") rather than the resource (the person who's
information you're trying to receive).
Hint: a URL that contains a method name is not RESTful. It means you're
tunneling an RPC through the URL.
This is the fundamental disconnect between method-oriented and
resource-oriented systems. (Notice that unlike Eran, I don't refer to
method-orientation as "service-orientation" because I don't believe
that service-orientation mandates a method-oriented approach, nor is
it preclude a resource-oriented design style).
The challenge is that if you want to expose a RESTful system, then you
need to define a completely different type of interface. You can't
simply expose your methods. You have to map your method-oriented
interface to a resource-oriented one.
In Eran's example, you would not expose something called a
"PersonInfoService". You would instead expose a resource that
represents people, e.g.,
http://myserver/People
To get a list of people, do
GET http://myserver/People
To add a new person to the list, do
POST http://myserver/People
and send in the XML representation of the person. This POST will
create a new resource. For example, if I POSTed a representation of
myself, the system would create a child resource called
http://myserver/People/Anne
The People resource would have a child resource for each person in the system:
http://myserver/People/Anne
http://myserver/People/Eran
If I want to get information about Eran, I'd say
GET http://myserver/People/Eran
If I want to get Eran's age, I could say
GET http://myserver/People/Eran/age
If I want to find all people aged 25, I could say:
GET http://myserver/People?age="25"
And rather than just returning me a list of people, the system should
return to me a list of the URIs that represent all the people that
match the query. (one URI fro each person.)
At the end of Eran's article he says, "At the same time, you need to
understand that [the WSDL 2.0] HTTP binding doesn't enable you to
implement a full REST style system."
That's because the binding doesn't do anything to help map a
method-oriented interface to a resource-oriented one.
But I should point out that it isn't impossible to do this mapping. It
isn't that hard to map
GET http://myserver/People/Eran
to
person getInformation("Eran")
but it's just really hard to do it automatically.
Anne
>
> Thanks,
> Keith.
>
>
>
> On 6/1/07, Vibhor_Sharma <vs...@gryphonnetworks.com> wrote:
> > Thanks for the insight
> >
> > then why does Axis claim that we have suport for REST style web services
> >
> > woul'nt it be a wrong thing to do when as ISV we adopt Axis2 and state
> this to our customers that our web services support both kind of interfaces.
> >
> > Vibhor
> >
> > ________________________________
> >
> > From: Anne Thomas Manes [mailto:atmanes@gmail.com]
> > Sent: Fri 6/1/2007 10:19 AM
> > To: axis-user@ws.apache.org
> > Subject: Re: calling web service using REST
> >
> >
> >
> > I'd just like to point out again that what you're describing here is
> > not REST. It's POX over HTTP, but it's not REST. I've written more
> > about this in my blog.
> >
> http://atmanes.blogspot.com/2007/06/how-not-to-do-restful-web-services.html
> >
> > Anne
> >
> > On 5/30/07, keith chapman < keithgchapman@gmail.com> wrote:
> > > http://localhost:81/axis2/services/MyService/getInfo
> > > ?systemName=Administrator&systemPassword= Password123
> > >
> > > should work.
> > >
> > > On 5/30/07, Binoy K Philip <binoy.philip@renaissance-it.com > wrote:
> > > >
> > > >
> > > >
> > > > Hi All,
> > > > Who do I call a web service operation from browser having input and
> out
> > > put
> > > > my target is end point is
> > > > http://localhost:81/axis2/services/ MyService/getInfo
> > > >
> > > > ans sopa boady is
> > > > <soapenv:Body><ns1:getInfo
> > > xlns:ns1="http://webservice.opt.srit.com/xsd
> "><ns1:systemName>Administrator</ns1:systemName><ns1:systemPassword>Password123</ns1:systemPassword></ns1:getInfo></soapenv:Body
> > > >
> > > >
> > > >
> > > > Thanks in Advance
> > > > Binoy K Philip
> > >
> > >
> > >
> > > --
> > > Keith Chapman
> > > WSO2 Inc.
> > > Oxygen for Web Services Developers.
> > > http://wso2.org/
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
>
>
>
> --
>
> Keith Chapman
> WSO2 Inc.
> Oxygen for Web Services Developers.
> http://wso2.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: calling web service using REST
Posted by keith chapman <ke...@gmail.com>.
Hi,
Axis2 fully supports WSDL 2.0 including the HTTPBinding (Or REST binding if
one may call it). Which means that Axis2 supports restfull services. Before
1.11 Axis2 only supported the POST and GET methods but with the
implementation of WSDL 2.0 it now supports POST, GET, PUT and DELETE.
This Enable
REST with Web services, Part 1: REST and Web services in WSDL
2.0<http://www.ibm.com/developerworks/webservices/library/ws-rest1/?S_TACT=105AGX04&S_CMP=HP>article
by Eran Chinthaka explains Axis2, REST and WSDL
2.0.
Thanks,
Keith.
On 6/1/07, Vibhor_Sharma <vs...@gryphonnetworks.com> wrote:
>
> Thanks for the insight
>
> then why does Axis claim that we have suport for REST style web services
>
> woul'nt it be a wrong thing to do when as ISV we adopt Axis2 and state
> this to our customers that our web services support both kind of interfaces.
>
> Vibhor
>
> ________________________________
>
> From: Anne Thomas Manes [mailto:atmanes@gmail.com]
> Sent: Fri 6/1/2007 10:19 AM
> To: axis-user@ws.apache.org
> Subject: Re: calling web service using REST
>
>
>
> I'd just like to point out again that what you're describing here is
> not REST. It's POX over HTTP, but it's not REST. I've written more
> about this in my blog.
>
> http://atmanes.blogspot.com/2007/06/how-not-to-do-restful-web-services.html
>
> Anne
>
> On 5/30/07, keith chapman <ke...@gmail.com> wrote:
> > http://localhost:81/axis2/services/MyService/getInfo
> > ?systemName=Administrator&systemPassword= Password123
> >
> > should work.
> >
> > On 5/30/07, Binoy K Philip <binoy.philip@renaissance-it.com > wrote:
> > >
> > >
> > >
> > > Hi All,
> > > Who do I call a web service operation from browser having input and
> out
> > put
> > > my target is end point is
> > > http://localhost:81/axis2/services/ MyService/getInfo
> > >
> > > ans sopa boady is
> > > <soapenv:Body><ns1:getInfo
> > xlns:ns1="http://webservice.opt.srit.com/xsd
> "><ns1:systemName>Administrator</ns1:systemName><ns1:systemPassword>Password123</ns1:systemPassword></ns1:getInfo></soapenv:Body
> > >
> > >
> > >
> > > Thanks in Advance
> > > Binoy K Philip
> >
> >
> >
> > --
> > Keith Chapman
> > WSO2 Inc.
> > Oxygen for Web Services Developers.
> > http://wso2.org/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
--
Keith Chapman
WSO2 Inc.
Oxygen for Web Services Developers.
http://wso2.org/
Re: calling web service using REST
Posted by Philipp Leitner <ph...@gmx.at>.
Well, in my opinion very few of the typical 'Programmable Web' REST
interfaces (see for instance Flickr or Google) actually support REST,
but only what Anne calls POX over HTTP. To me (and I know that most will
disagree) the REST architecure is a little bit unpractical for many
applications (see e.g. "statelessness"), but the term REST is incredibly
popular :) That leads to a lot of frameworks and interfaces pretend to
be "RESTful", while they actually are not. So at least you would be in
good company ...
/philipp
Vibhor_Sharma wrote:
> Thanks for the insight
>
> then why does Axis claim that we have suport for REST style web services
>
> woul'nt it be a wrong thing to do when as ISV we adopt Axis2 and state this to our customers that our web services support both kind of interfaces.
>
> Vibhor
>
> ________________________________
>
> From: Anne Thomas Manes [mailto:atmanes@gmail.com]
> Sent: Fri 6/1/2007 10:19 AM
> To: axis-user@ws.apache.org
> Subject: Re: calling web service using REST
>
>
>
> I'd just like to point out again that what you're describing here is
> not REST. It's POX over HTTP, but it's not REST. I've written more
> about this in my blog.
> http://atmanes.blogspot.com/2007/06/how-not-to-do-restful-web-services.html
>
> Anne
>
> On 5/30/07, keith chapman <ke...@gmail.com> wrote:
>> http://localhost:81/axis2/services/MyService/getInfo
>> ?systemName=Administrator&systemPassword= Password123
>>
>> should work.
>>
>> On 5/30/07, Binoy K Philip <binoy.philip@renaissance-it.com > wrote:
>>>
>>>
>>> Hi All,
>>> Who do I call a web service operation from browser having input and out
>> put
>>> my target is end point is
>>> http://localhost:81/axis2/services/ MyService/getInfo
>>>
>>> ans sopa boady is
>>> <soapenv:Body><ns1:getInfo
>> xlns:ns1="http://webservice.opt.srit.com/xsd"><ns1:systemName>Administrator</ns1:systemName><ns1:systemPassword>Password123</ns1:systemPassword></ns1:getInfo></soapenv:Body
>>>
>>>
>>> Thanks in Advance
>>> Binoy K Philip
>>
>>
>> --
>> Keith Chapman
>> WSO2 Inc.
>> Oxygen for Web Services Developers.
>> http://wso2.org/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>
>
>
> ------------------------------------------------------------------------
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
RE: calling web service using REST
Posted by Vibhor_Sharma <vs...@gryphonnetworks.com>.
Thanks for the insight
then why does Axis claim that we have suport for REST style web services
woul'nt it be a wrong thing to do when as ISV we adopt Axis2 and state this to our customers that our web services support both kind of interfaces.
Vibhor
________________________________
From: Anne Thomas Manes [mailto:atmanes@gmail.com]
Sent: Fri 6/1/2007 10:19 AM
To: axis-user@ws.apache.org
Subject: Re: calling web service using REST
I'd just like to point out again that what you're describing here is
not REST. It's POX over HTTP, but it's not REST. I've written more
about this in my blog.
http://atmanes.blogspot.com/2007/06/how-not-to-do-restful-web-services.html
Anne
On 5/30/07, keith chapman <ke...@gmail.com> wrote:
> http://localhost:81/axis2/services/MyService/getInfo
> ?systemName=Administrator&systemPassword= Password123
>
> should work.
>
> On 5/30/07, Binoy K Philip <binoy.philip@renaissance-it.com > wrote:
> >
> >
> >
> > Hi All,
> > Who do I call a web service operation from browser having input and out
> put
> > my target is end point is
> > http://localhost:81/axis2/services/ MyService/getInfo
> >
> > ans sopa boady is
> > <soapenv:Body><ns1:getInfo
> xlns:ns1="http://webservice.opt.srit.com/xsd"><ns1:systemName>Administrator</ns1:systemName><ns1:systemPassword>Password123</ns1:systemPassword></ns1:getInfo></soapenv:Body
> >
> >
> >
> > Thanks in Advance
> > Binoy K Philip
>
>
>
> --
> Keith Chapman
> WSO2 Inc.
> Oxygen for Web Services Developers.
> http://wso2.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: calling web service using REST
Posted by Anne Thomas Manes <at...@gmail.com>.
I'd just like to point out again that what you're describing here is
not REST. It's POX over HTTP, but it's not REST. I've written more
about this in my blog.
http://atmanes.blogspot.com/2007/06/how-not-to-do-restful-web-services.html
Anne
On 5/30/07, keith chapman <ke...@gmail.com> wrote:
> http://localhost:81/axis2/services/MyService/getInfo
> ?systemName=Administrator&systemPassword= Password123
>
> should work.
>
> On 5/30/07, Binoy K Philip <binoy.philip@renaissance-it.com > wrote:
> >
> >
> >
> > Hi All,
> > Who do I call a web service operation from browser having input and out
> put
> > my target is end point is
> > http://localhost:81/axis2/services/ MyService/getInfo
> >
> > ans sopa boady is
> > <soapenv:Body><ns1:getInfo
> xlns:ns1="http://webservice.opt.srit.com/xsd"><ns1:systemName>Administrator</ns1:systemName><ns1:systemPassword>Password123</ns1:systemPassword></ns1:getInfo></soapenv:Body
> >
> >
> >
> > Thanks in Advance
> > Binoy K Philip
>
>
>
> --
> Keith Chapman
> WSO2 Inc.
> Oxygen for Web Services Developers.
> http://wso2.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org