tuscany-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Osama Abboud <abb...@kom.tu-darmstadt.de>
Subject Re: Calling a simple http webpage in Tuscany
Date Tue, 20 Nov 2012 10:05:33 GMT
Thanks for the swift replies. I was also looking into REST to bind the service, but did not
find out how. Do you have an idea?

Having a look here: https://cwiki.apache.org/TUSCANYxDOCx2x/sca-java-bindingrest.html
all the components require a java implementation, so I was not sure how to realise binding
my spam service.

Any ideas?

Thanks.


From: Luciano Resende <luckbr1975@gmail.com>
Subject: Re: Calling a simple http webpage in Tuscany
Date: November 20, 2012 7:33:01 AM GMT+01:00
To: "user@tuscany.apache.org" <user@tuscany.apache.org>



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