You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Andrew Schofield <sc...@googlemail.com> on 2007/01/22 14:45:16 UTC

Composite without an implementation?

Hi,
I've just started using Tuscany and I've been kicking around some of the
samples to see what they do. I've managed to make them work without problems
but I hit a snag when I tried to change one in particular.

I've built the webapp/helloworldws sample and deployed it on Tomcat. I've
also managed to invoke it using the standalone/helloworldwsclient sample.
But, I was surprised to find that there was a (trivial) implementation in
the composite of the client (HelloWorldServiceComponent) which just
delegates the method calls to the back-end service. I'd really expected to
write SCDL for a composite which wired a service directly to a reference
with a Web-services binding. This would give a way of connecting an SCA
client to an existing Web service without any implementation coding.

Here's the SCDL that I tried:

<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"

xmlns:system="http://tuscany.apache.org/xmlns/system/1.0-SNAPSHOT"

name="helloworldwsclient">



<dbsdo:import.sdo xmlns:dbsdo="
http://incubator.apache.org/tuscany/xmlns/databinding/sdo/1.0-incubator-M2"
location="wsdl/helloworld.wsdl"/>



<service name="HelloWorldServiceComponent">

<interface.wsdl xmlns:wsdli="http://www.w3.org/2006/01/wsdl-instance"

interface="http://helloworld#wsdl.interface(HelloWorld)"

wsdli:wsdlLocation="http://helloworld wsdl/helloworld.wsdl" />

<reference name="helloWorldService">HelloWorldService</reference>

</service>



<reference name="HelloWorldService">

<interface.wsdl xmlns:wsdli="http://www.w3.org/2006/01/wsdl-instance"

interface="http://helloworld#wsdl.interface(HelloWorld)"

wsdli:wsdlLocation="http://helloworld wsdl/helloworld.wsdl" />

<binding.ws endpoint="
http://helloworld#wsdl.endpoint(HelloWorldService/HelloWorldSoapPort)"

location="wsdl/helloworld.wsdl" />

</reference>


</composite>

And here's the exception that I got (using Tuscany Java M2):


Exception in thread "main"
org.apache.tuscany.spi.builder.BuilderConfigException: No interceptor for
operation [getGreetings]

at org.apache.tuscany.core.builder.ConnectorImpl.connect(ConnectorImpl.java
:336)

at org.apache.tuscany.core.builder.ConnectorImpl.connect(ConnectorImpl.java
:278)

at org.apache.tuscany.core.builder.ConnectorImpl.connect(ConnectorImpl.java
:389)

at org.apache.tuscany.core.builder.ConnectorImpl.connect(ConnectorImpl.java
:163)

at org.apache.tuscany.spi.extension.CompositeComponentExtension.prepare(
CompositeComponentExtension.java:460)

at org.apache.tuscany.core.deployer.DeployerImpl.deploy(DeployerImpl.java
:86)

at org.apache.tuscany.core.runtime.AbstractRuntime.deployApplicationScdl(
AbstractRuntime.java:136)

at
org.apache.tuscany.runtime.standalone.host.StandaloneRuntimeImpl.initialize(
StandaloneRuntimeImpl.java:87)

at org.apache.tuscany.launcher.MainLauncherBooter.main(
MainLauncherBooter.java:83)



Can anyone enlighten me about the cause of the problem? I think that a
composite without an implementation should be OK, so I hope that it's just
my SCDL at fault.



Thanks in advance,

Andrew Schofield

Re: Composite without an implementation?

Posted by ant elder <an...@gmail.com>.
I think this is a defect, would you raise a JIRA for it? There's a related
JIRA for if you try to go directly to a reference, see:
http://issues.apache.org/jira/browse/TUSCANY-862.

   ...ant

On 1/22/07, Andrew Schofield <sc...@googlemail.com> wrote:
>
> Hi,
> I've just started using Tuscany and I've been kicking around some of the
> samples to see what they do. I've managed to make them work without
> problems
> but I hit a snag when I tried to change one in particular.
>
> I've built the webapp/helloworldws sample and deployed it on Tomcat. I've
> also managed to invoke it using the standalone/helloworldwsclient sample.
> But, I was surprised to find that there was a (trivial) implementation in
> the composite of the client (HelloWorldServiceComponent) which just
> delegates the method calls to the back-end service. I'd really expected to
> write SCDL for a composite which wired a service directly to a reference
> with a Web-services binding. This would give a way of connecting an SCA
> client to an existing Web service without any implementation coding.
>
> Here's the SCDL that I tried:
>
> <composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
>
> xmlns:system="http://tuscany.apache.org/xmlns/system/1.0-SNAPSHOT"
>
> name="helloworldwsclient">
>
>
>
> <dbsdo:import.sdo xmlns:dbsdo="
> http://incubator.apache.org/tuscany/xmlns/databinding/sdo/1.0-incubator-M2
> "
> location="wsdl/helloworld.wsdl"/>
>
>
>
> <service name="HelloWorldServiceComponent">
>
> <interface.wsdl xmlns:wsdli="http://www.w3.org/2006/01/wsdl-instance"
>
> interface="http://helloworld#wsdl.interface(HelloWorld)"
>
> wsdli:wsdlLocation="http://helloworld wsdl/helloworld.wsdl" />
>
> <reference name="helloWorldService">HelloWorldService</reference>
>
> </service>
>
>
>
> <reference name="HelloWorldService">
>
> <interface.wsdl xmlns:wsdli="http://www.w3.org/2006/01/wsdl-instance"
>
> interface="http://helloworld#wsdl.interface(HelloWorld)"
>
> wsdli:wsdlLocation="http://helloworld wsdl/helloworld.wsdl" />
>
> <binding.ws endpoint="
> http://helloworld#wsdl.endpoint(HelloWorldService/HelloWorldSoapPort)"
>
> location="wsdl/helloworld.wsdl" />
>
> </reference>
>
>
> </composite>
>
> And here's the exception that I got (using Tuscany Java M2):
>
>
> Exception in thread "main"
> org.apache.tuscany.spi.builder.BuilderConfigException: No interceptor for
> operation [getGreetings]
>
> at org.apache.tuscany.core.builder.ConnectorImpl.connect(
> ConnectorImpl.java
> :336)
>
> at org.apache.tuscany.core.builder.ConnectorImpl.connect(
> ConnectorImpl.java
> :278)
>
> at org.apache.tuscany.core.builder.ConnectorImpl.connect(
> ConnectorImpl.java
> :389)
>
> at org.apache.tuscany.core.builder.ConnectorImpl.connect(
> ConnectorImpl.java
> :163)
>
> at org.apache.tuscany.spi.extension.CompositeComponentExtension.prepare(
> CompositeComponentExtension.java:460)
>
> at org.apache.tuscany.core.deployer.DeployerImpl.deploy(DeployerImpl.java
> :86)
>
> at org.apache.tuscany.core.runtime.AbstractRuntime.deployApplicationScdl(
> AbstractRuntime.java:136)
>
> at
>
> org.apache.tuscany.runtime.standalone.host.StandaloneRuntimeImpl.initialize
> (
> StandaloneRuntimeImpl.java:87)
>
> at org.apache.tuscany.launcher.MainLauncherBooter.main(
> MainLauncherBooter.java:83)
>
>
>
> Can anyone enlighten me about the cause of the problem? I think that a
> composite without an implementation should be OK, so I hope that it's just
> my SCDL at fault.
>
>
>
> Thanks in advance,
>
> Andrew Schofield
>
>