You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by wang feng <fw...@gmail.com> on 2008/03/04 07:54:45 UTC

Deploy a web service ,but not to target with reference

Hi,all.
    I have deployed a component service with web service, and have made a reference to it.
    I have two ways to reference,but only the first is ok,what wrong is the second?

first:
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
	targetNamespace="http://helloworldsdo"
    name="hellojavaws">
    <component name="HelloWorldServiceJavaComponent">
        <implementation.java class="com.primeton.demo.helloworld.HelloWorldImpl" />
	    <service name="HelloWorldService">
	        <interface.wsdl interface="http://helloworldsdo#wsdl.interface(HelloWorld)" />
	        <binding.ws/>
	    </service>
    </component>
	
	<component name="HelloWorldServiceJavaInvokeComponent">
      <implementation.java class="com.primeton.demo.helloworld.HelloWorldServiceComponent"/>
	</component>
    
    <reference name="HelloWorldServiceJava" promote="HelloWorldServiceJavaInvokeComponent/helloWorldService">
        <interface.java interface="com.primeton.demo.helloworld.HelloWorldService" />
        <binding.ws wsdlElement="http://helloworldsdo#wsdl.port(HelloWorldService/HelloWorldSoapPort)"/>
    </reference>
</composite>

second:
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
	targetNamespace="http://helloworldsdo"
    name="hellojavaws">
    <component name="HelloWorldServiceJavaComponent">
        <implementation.java class="com.primeton.demo.helloworld.HelloWorldImpl" />
	    <service name="HelloWorldService">
	        <interface.wsdl interface="http://helloworldsdo#wsdl.interface(HelloWorld)" />
	        <binding.ws/>
	    </service>
    </component>
	
	<component name="HelloWorldServiceJavaInvokeComponent">
    <implementation.java class="com.primeton.demo.helloworld.HelloWorldServiceComponent"/>
	  <reference name="helloWorldService" target="HelloWorldServiceJavaComponent"/>
	</component>
</composite>
 				
--------------
wang feng
2008-03-04


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: Re: Deploy a web service ,but not to target with reference

Posted by Raymond Feng <en...@gmail.com>.
IMO, if the only binding configured for the service is binding.ws, then the 
service proxy returned from SCADomain.getService(...) should invoke the 
service using binding.ws. It's not very clear though if there are multiple 
bindings for the service. The selection of a binding is not well defined by 
the spec.

Thanks,
Raymond

--------------------------------------------------
From: "wang feng" <fw...@gmail.com>
Sent: Monday, March 03, 2008 11:51 PM
To: <tu...@ws.apache.org>
Subject: Re: Re: Deploy a web service ,but not to target with reference

> If the component's service was deployed with web service,would the service 
> invoker must through web service client?
>
> Such as the example,  can I get the service through
> HelloWorldService service = scaDomain.getService(HelloWorldService.class, 
> "HelloWorldServiceJavaComponent/HelloWorldService");
>
> If yes,is the service invoker through web service,not directly through 
> binding.sca.
>
> <component name="HelloWorldServiceJavaComponent">
>        <implementation.java 
> class="com.primeton.demo.helloworld.HelloWorldImpl" />
>     <service name="HelloWorldService">
>         <interface.wsdl 
> interface="http://helloworldsdo#wsdl.interface(HelloWorld)" />
>         <binding.ws/>
>     </service>
>    </component>
>
> Thanks,
> Wang Feng
>
>
> On 2008-03-04,Raymond Feng <en...@gmail.com> wrote:
>
>>Hi,
>>
>>In the 2nd case, the service is exposed using binding.ws. But the 
>>reference
>>uses the binding.sca (without an explicit binding, it's default to
>>binding.sca). The wiring should complain that the bindings are not
>>compatible.
>>
>>Thanks,
>>Raymond
>>
>>--------------------------------------------------
>>From: "wang feng" <fw...@gmail.com>
>>Sent: Monday, March 03, 2008 10:54 PM
>>To: "tuscany-dev" <tu...@ws.apache.org>
>>Subject: Deploy a web service ,but not to target with reference
>>
>>> Hi,all.
>>>    I have deployed a component service with web service, and have made a
>>> reference to it.
>>>    I have two ways to reference,but only the first is ok,what wrong is 
>>> the
>>> second?
>>>
>>> first:
>>> <composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
>>> targetNamespace="http://helloworldsdo"
>>>    name="hellojavaws">
>>>    <component name="HelloWorldServiceJavaComponent">
>>>        <implementation.java
>>> class="com.primeton.demo.helloworld.HelloWorldImpl" />
>>>     <service name="HelloWorldService">
>>>         <interface.wsdl
>>> interface="http://helloworldsdo#wsdl.interface(HelloWorld)" />
>>>         <binding.ws/>
>>>     </service>
>>>    </component>
>>>
>>> <component name="HelloWorldServiceJavaInvokeComponent">
>>>      <implementation.java
>>> class="com.primeton.demo.helloworld.HelloWorldServiceComponent"/>
>>> </component>
>>>
>>>    <reference name="HelloWorldServiceJava"
>>> promote="HelloWorldServiceJavaInvokeComponent/helloWorldService">
>>>        <interface.java
>>> interface="com.primeton.demo.helloworld.HelloWorldService" />
>>>        <binding.ws
>>> wsdlElement="http://helloworldsdo#wsdl.port(HelloWorldService/HelloWorldSoapPort)"/>
>>>    </reference>
>>> </composite>
>>>
>>> second:
>>> <composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
>>> targetNamespace="http://helloworldsdo"
>>>    name="hellojavaws">
>>>    <component name="HelloWorldServiceJavaComponent">
>>>        <implementation.java
>>> class="com.primeton.demo.helloworld.HelloWorldImpl" />
>>>     <service name="HelloWorldService">
>>>         <interface.wsdl
>>> interface="http://helloworldsdo#wsdl.interface(HelloWorld)" />
>>>         <binding.ws/>
>>>     </service>
>>>    </component>
>>>
>>> <component name="HelloWorldServiceJavaInvokeComponent">
>>>    <implementation.java
>>> class="com.primeton.demo.helloworld.HelloWorldServiceComponent"/>
>>>   <reference name="helloWorldService"
>>> target="HelloWorldServiceJavaComponent"/>
>>> </component>
>>> </composite>
>>>
>>> --------------
>>> wang feng
>>> 2008-03-04
>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: Re: Deploy a web service ,but not to target with reference

Posted by wang feng <fw...@gmail.com>.
If the component's service was deployed with web service,would the service invoker must through web service client?

Such as the example,  can I get the service through    
HelloWorldService service = scaDomain.getService(HelloWorldService.class, "HelloWorldServiceJavaComponent/HelloWorldService");

If yes,is the service invoker through web service,not directly through binding.sca.

 <component name="HelloWorldServiceJavaComponent">
        <implementation.java class="com.primeton.demo.helloworld.HelloWorldImpl" />
	    <service name="HelloWorldService">
	        <interface.wsdl interface="http://helloworldsdo#wsdl.interface(HelloWorld)" />
	        <binding.ws/>
	    </service>
    </component>

Thanks,
Wang Feng


On 2008-03-04,Raymond Feng <en...@gmail.com> wrote:

>Hi,
>
>In the 2nd case, the service is exposed using binding.ws. But the reference 
>uses the binding.sca (without an explicit binding, it's default to 
>binding.sca). The wiring should complain that the bindings are not 
>compatible.
>
>Thanks,
>Raymond
>
>--------------------------------------------------
>From: "wang feng" <fw...@gmail.com>
>Sent: Monday, March 03, 2008 10:54 PM
>To: "tuscany-dev" <tu...@ws.apache.org>
>Subject: Deploy a web service ,but not to target with reference
>
>> Hi,all.
>>    I have deployed a component service with web service, and have made a 
>> reference to it.
>>    I have two ways to reference,but only the first is ok,what wrong is the 
>> second?
>>
>> first:
>> <composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
>> targetNamespace="http://helloworldsdo"
>>    name="hellojavaws">
>>    <component name="HelloWorldServiceJavaComponent">
>>        <implementation.java 
>> class="com.primeton.demo.helloworld.HelloWorldImpl" />
>>     <service name="HelloWorldService">
>>         <interface.wsdl 
>> interface="http://helloworldsdo#wsdl.interface(HelloWorld)" />
>>         <binding.ws/>
>>     </service>
>>    </component>
>>
>> <component name="HelloWorldServiceJavaInvokeComponent">
>>      <implementation.java 
>> class="com.primeton.demo.helloworld.HelloWorldServiceComponent"/>
>> </component>
>>
>>    <reference name="HelloWorldServiceJava" 
>> promote="HelloWorldServiceJavaInvokeComponent/helloWorldService">
>>        <interface.java 
>> interface="com.primeton.demo.helloworld.HelloWorldService" />
>>        <binding.ws 
>> wsdlElement="http://helloworldsdo#wsdl.port(HelloWorldService/HelloWorldSoapPort)"/>
>>    </reference>
>> </composite>
>>
>> second:
>> <composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
>> targetNamespace="http://helloworldsdo"
>>    name="hellojavaws">
>>    <component name="HelloWorldServiceJavaComponent">
>>        <implementation.java 
>> class="com.primeton.demo.helloworld.HelloWorldImpl" />
>>     <service name="HelloWorldService">
>>         <interface.wsdl 
>> interface="http://helloworldsdo#wsdl.interface(HelloWorld)" />
>>         <binding.ws/>
>>     </service>
>>    </component>
>>
>> <component name="HelloWorldServiceJavaInvokeComponent">
>>    <implementation.java 
>> class="com.primeton.demo.helloworld.HelloWorldServiceComponent"/>
>>   <reference name="helloWorldService" 
>> target="HelloWorldServiceJavaComponent"/>
>> </component>
>> </composite>
>>
>> --------------
>> wang feng
>> 2008-03-04
>>
>>
>> ---------------------------------------------------------------------
>> 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: Deploy a web service ,but not to target with reference

Posted by Raymond Feng <en...@gmail.com>.
Hi,

In the 2nd case, the service is exposed using binding.ws. But the reference 
uses the binding.sca (without an explicit binding, it's default to 
binding.sca). The wiring should complain that the bindings are not 
compatible.

Thanks,
Raymond

--------------------------------------------------
From: "wang feng" <fw...@gmail.com>
Sent: Monday, March 03, 2008 10:54 PM
To: "tuscany-dev" <tu...@ws.apache.org>
Subject: Deploy a web service ,but not to target with reference

> Hi,all.
>    I have deployed a component service with web service, and have made a 
> reference to it.
>    I have two ways to reference,but only the first is ok,what wrong is the 
> second?
>
> first:
> <composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
> targetNamespace="http://helloworldsdo"
>    name="hellojavaws">
>    <component name="HelloWorldServiceJavaComponent">
>        <implementation.java 
> class="com.primeton.demo.helloworld.HelloWorldImpl" />
>     <service name="HelloWorldService">
>         <interface.wsdl 
> interface="http://helloworldsdo#wsdl.interface(HelloWorld)" />
>         <binding.ws/>
>     </service>
>    </component>
>
> <component name="HelloWorldServiceJavaInvokeComponent">
>      <implementation.java 
> class="com.primeton.demo.helloworld.HelloWorldServiceComponent"/>
> </component>
>
>    <reference name="HelloWorldServiceJava" 
> promote="HelloWorldServiceJavaInvokeComponent/helloWorldService">
>        <interface.java 
> interface="com.primeton.demo.helloworld.HelloWorldService" />
>        <binding.ws 
> wsdlElement="http://helloworldsdo#wsdl.port(HelloWorldService/HelloWorldSoapPort)"/>
>    </reference>
> </composite>
>
> second:
> <composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
> targetNamespace="http://helloworldsdo"
>    name="hellojavaws">
>    <component name="HelloWorldServiceJavaComponent">
>        <implementation.java 
> class="com.primeton.demo.helloworld.HelloWorldImpl" />
>     <service name="HelloWorldService">
>         <interface.wsdl 
> interface="http://helloworldsdo#wsdl.interface(HelloWorld)" />
>         <binding.ws/>
>     </service>
>    </component>
>
> <component name="HelloWorldServiceJavaInvokeComponent">
>    <implementation.java 
> class="com.primeton.demo.helloworld.HelloWorldServiceComponent"/>
>   <reference name="helloWorldService" 
> target="HelloWorldServiceJavaComponent"/>
> </component>
> </composite>
>
> --------------
> wang feng
> 2008-03-04
>
>
> ---------------------------------------------------------------------
> 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