tuscany-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Luciano Resende <luckbr1...@gmail.com>
Subject Re: Calling a simple http webpage in Tuscany
Date Tue, 20 Nov 2012 06:33:01 GMT
On Mon, Nov 19, 2012 at 10:12 PM, Jet Knight <dolt131943@gmail.com> wrote:

> remote url/service must match some standard protocol, that has be
> implemented in Tuscany.
>
> e.g. JSONRPC, WebService.
>
> if you are use custom protocol , you must write a wrap class.
> Look like your service response is not JSONRPC format, but a custom JSON
> format.
>
> On Mon, Nov 19, 2012 at 5:54 PM, Osama Abboud
> <abboud@kom.tu-darmstadt.de> wrote:
> > Hi,
> >
> > I have a web service that I want to use in Tuscany without writing a any
> code.
> >
> > The web service has the task of checking whether a certain text is spam
> or not.
> >
> > I use this URL:  http://remoteserver.com/isspam/test-is-this-spam
> >
> > I get over http the following response:
> {"text":"test-is-this-spam","isspam":0,"result":"Text is not spam."}.
> >
> > My current solution is based on a wrapper (written in Java) that acts as
> a Tuscany component, and does the work of calling the URL and retrieving
> the result.
> > But this is not what I want.
> >
> > Is there a way to link the mentioned service without writing any code? I
> just want Tuscany to handle calling the URL and returning the response and
> provide it to some other component. Is this possible?
> >
> > Thanks for the help.
> > Osama Abboud
> >
> >
> >
>
>
>
> --
> Jet Knight
>

It seems that you are posting a value to a REST resource, and receiving a
json response. You might be able to use the REST reference binding support.

-- 
Luciano Resende
http://people.apache.org/~lresende
http://twitter.com/lresende1975
http://lresende.blogspot.com/

Mime
View raw message