You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by muhwas <mu...@yahoo.com> on 2007/04/02 22:21:26 UTC
calling webservice using service interface only
Hi guys,
How i can call a tuscany java web service using a
service interface only. I don't want any tuscany
related code inside client code
CompositeContext compositeContext =
CurrentCompositeContext.getContext();
compositeContext.locateService(service.class,
"ServiceClientComponent");
inside client code.
thanks,
muhwas
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org
Re: calling webservice using service interface only
Posted by muhwas <mu...@yahoo.com>.
Hi Raymond,
I am running HelloWorldWSClient sample.I am running on
Windows XP. In HelloWorldClient there is a code
CompositeContext compositeContext =
CurrentCompositeContext.getContext();
HelloWorldService helloWorldService=
compositeContext.locateService(HelloWorldService.class,
"HelloWorldServiceComponent");
String value =
helloWorldService.getGreetings("World");
I am trying to find out the best way to call the
service using the business interface only that is
helloWorldService.getGreetings("World");
I just want this line in the client code. I don't want
getContext or locateService method inside client code.
I am asking what is the best way to get rid of this
code. Move it into a serviceFactory or some
configuration inside SCDL file which give me the
reference to the service or may be define service as a
bean inside Spring applicationContext which will
create SCA run time for me and return context to the
client?
regards,
muhwas
--- Raymond Feng <en...@gmail.com> wrote:
> Hi, muhwas.
>
> What level of Tuscany code are you evaluating? And
> what hosting environment
> do you plan to run Tuscany?
>
> The latest SCA 1.0 java spec intentionally leaves
> the way for non-component
> client to get the ComponentContext to be vendor
> specific. At the moment in
> Tuscany, you might to want to look at the following
> code:
>
>
https://svn.apache.org/repos/asf/incubator/tuscany/java/sca/runtime/embedded/src/main/java/org/apache/tuscany/api/SCARuntime.java
>
> Back to the question that you prefer not to use
> Tuscany-specific code in the
> client, are you looking for a launcher?
>
> Sorry for all the questions. But they will probably
> help us better
> understand your requirements.
>
> Thanks,
> Raymond
>
> ----- Original Message -----
> From: "muhwas" <mu...@yahoo.com>
> To: <tu...@ws.apache.org>;
> <tu...@ws.apache.org>
> Sent: Monday, April 02, 2007 1:21 PM
> Subject: calling webservice using service interface
> only
>
>
> > Hi guys,
> >
> > How i can call a tuscany java web service using a
> > service interface only. I don't want any tuscany
> > related code inside client code
> >
> > CompositeContext compositeContext =
> > CurrentCompositeContext.getContext();
> >
> > compositeContext.locateService(service.class,
> > "ServiceClientComponent");
> >
> > inside client code.
> >
> > thanks,
> > muhwas
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> tuscany-dev-unsubscribe@ws.apache.org
> > For additional commands, e-mail:
> tuscany-dev-help@ws.apache.org
> >
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail:
> tuscany-dev-help@ws.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org
Re: calling webservice using service interface only
Posted by Raymond Feng <en...@gmail.com>.
Hi, muhwas.
What level of Tuscany code are you evaluating? And what hosting environment
do you plan to run Tuscany?
The latest SCA 1.0 java spec intentionally leaves the way for non-component
client to get the ComponentContext to be vendor specific. At the moment in
Tuscany, you might to want to look at the following code:
https://svn.apache.org/repos/asf/incubator/tuscany/java/sca/runtime/embedded/src/main/java/org/apache/tuscany/api/SCARuntime.java
Back to the question that you prefer not to use Tuscany-specific code in the
client, are you looking for a launcher?
Sorry for all the questions. But they will probably help us better
understand your requirements.
Thanks,
Raymond
----- Original Message -----
From: "muhwas" <mu...@yahoo.com>
To: <tu...@ws.apache.org>; <tu...@ws.apache.org>
Sent: Monday, April 02, 2007 1:21 PM
Subject: calling webservice using service interface only
> Hi guys,
>
> How i can call a tuscany java web service using a
> service interface only. I don't want any tuscany
> related code inside client code
>
> CompositeContext compositeContext =
> CurrentCompositeContext.getContext();
>
> compositeContext.locateService(service.class,
> "ServiceClientComponent");
>
> inside client code.
>
> thanks,
> muhwas
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org