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 <[EMAIL PROTECTED]> 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" <[EMAIL PROTECTED]>
> To: <[email protected]>;
> <[email protected]>
> 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:
> [EMAIL PROTECTED]
> > For additional commands, e-mail:
> [EMAIL PROTECTED]
> > 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to