You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@tuscany.apache.org by Mike Edwards <mi...@gmail.com> on 2010/06/15 23:28:48 UTC

Re: [Tuscany M5] Problem with the REST binding...

Alex,

You're running the code under OSGi?

To me, this looks like the binding-rest-runtime module has not been tested running under OSGi.  It 
is clearly missing one MAINFEST.MF entry, which causes the ClassNotFound exception you're getting. 
I am concerned that there may be more similar failures due to the lack of testing under OSGi.

To fix the particular problem you have here, the following needs to be added to the Import-Package: 
section of the MANIFEST.MF for the binding-rest-runtime module:

org.apache.tuscany.sca.interfacedef.java;version=2.0.0,

However, just adding this may well not be enough.

I am not familiar with the binding-rest-runtime module, so it will take me some time to get to grips 
with it and make it work properly under OSGi - hopefully someone else from the Tuscany team can take 
a look at it more quickly.


Yours,  Mike.


Alexander Blotny wrote:
> Hi,
> 
> I have a problem to export a REST service via an OSGi bundle. Most of 
> the code is taken from the store example for binding.rest. 
> (http://tuscany.apache.org/documentation-2x/sca-java-bindingrest.html)
> 
> I got following exception:
> 
> java.lang.IllegalStateException: java.lang.NoClassDefFoundError: 
> org/apache/tuscany/sca/interfacedef/java/JavaInterface
>     at org.apache.tuscany.sca.node.impl.NodeImpl.start(NodeImpl.java:173)
>     at 
> org.apache.tuscany.sca.node.osgi.impl.NodeManager.bundleStarted(NodeManager.java:117)
>     at 
> org.apache.tuscany.sca.node.osgi.impl.NodeManager.bundleChanged(NodeManager.java:139)
>     at 
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:916)
>     at 
> org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:220)
>     at 
> org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:149)
>     at 
> org.eclipse.osgi.framework.internal.core.Framework.publishBundleEventPrivileged(Framework.java:1350)
>     at 
> org.eclipse.osgi.framework.internal.core.Framework.publishBundleEvent(Framework.java:1301)
>     at 
> org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:362)
>     at 
> org.eclipse.osgi.framework.internal.core.AbstractBundle.updateWorker(AbstractBundle.java:625)
>     at 
> org.eclipse.osgi.framework.internal.core.AbstractBundle.update(AbstractBundle.java:572)
>     at 
> org.eclipse.osgi.framework.internal.core.AbstractBundle.update(AbstractBundle.java:555)
>     at 
> org.apache.felix.shell.impl.UpdateCommandImpl.execute(UpdateCommandImpl.java:96)
>     at 
> org.apache.felix.shell.impl.Activator$ShellServiceImpl.executeCommand(Activator.java:286)
>     at 
> org.apache.felix.shell.tui.Activator$ShellTuiRunnable.run(Activator.java:184)
>     at java.lang.Thread.run(Thread.java:637)
> Caused by: java.lang.NoClassDefFoundError: 
> org/apache/tuscany/sca/interfacedef/java/JavaInterface
>     at 
> org.apache.tuscany.sca.binding.rest.provider.RESTServiceBindingProvider.registerWithJAXRS(RESTServiceBindingProvider.java:217)
>     at 
> org.apache.tuscany.sca.binding.rest.provider.RESTServiceBindingProvider.start(RESTServiceBindingProvider.java:143)
>     at 
> org.apache.tuscany.sca.core.assembly.impl.CompositeActivatorImpl$1.run(CompositeActivatorImpl.java:423)
>     at java.security.AccessController.doPrivileged(Native Method)
>     at 
> org.apache.tuscany.sca.core.assembly.impl.CompositeActivatorImpl.startEndpoint(CompositeActivatorImpl.java:421)
>     at 
> org.apache.tuscany.sca.core.assembly.impl.CompositeActivatorImpl.start(CompositeActivatorImpl.java:377)
>     at 
> org.apache.tuscany.sca.core.assembly.impl.CompositeActivatorImpl.start(CompositeActivatorImpl.java:309)
>     at org.apache.tuscany.sca.node.impl.NodeImpl.start(NodeImpl.java:147)
>     ... 15 more
> 
> 
> The bundle has the following structure:
> 
> META-INF  MANIFEST.MF META-INF/maven META-INF/maven <no contents> 
> META-INF/maven/de.fhg.fokus.ngni.xposer.see.samples 
> META-INF/maven/de.fhg.fokus.ngni.xposer.see.samples <no contents> 
> META-INF/maven/de.fhg.fokus.ngni.xposer.see.samples/helloworld-exporter 
>  pom.properties  pom.xml OSGI-INF OSGI-INF <no contents> OSGI-INF/sca 
>  bundle.componentType  bundle.composite de de <no contents> de/fhg 
> de/fhg <no contents> de/fhg/fokus de/fhg/fokus <no contents> 
> de/fhg/fokus/ngni de/fhg/fokus/ngni <no contents> 
> de/fhg/fokus/ngni/xposer de/fhg/fokus/ngni/xposer <no contents> 
> de/fhg/fokus/ngni/xposer/see de/fhg/fokus/ngni/xposer/see <no contents> 
> de/fhg/fokus/ngni/xposer/see/samples 
> de/fhg/fokus/ngni/xposer/see/samples <no contents> 
> de/fhg/fokus/ngni/xposer/see/samples/helloworld  Activator.class 
>  HelloREST.class de/fhg/fokus/ngni/xposer/see/samples/helloworld/impl 
>    HelloRESTImpl.class  
> 
> bundle.composite:
> 
> <composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912" 
>    xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1" 
>    xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
>    targetNamespace="http://calculator.dosgi"    name="HelloworldComposite">
>     <component name="HelloworldComponent"> 
>        <tuscany:implementation.osgi 
> bundleSymbolicName="helloworld-exporter" bundleVersion="0.0.1" /> 
>                      <service name="HelloworldServiceREST"> 
>            <tuscany:binding.rest uri="http://localhost:8087/Helloworld"/ 
> <http://localhost:8087/Helloworld"/>>        </service>         
>      </component>   
> 
> 
> bundle.componentType:
> 
> <componentType xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912" 
>               xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
>               xmlns:t="http://tuscany.apache.org/xmlns/sca/1.1">
>    
>    <service name="HelloworldServiceREST">        <interface.java 
> interface="de.fhg.fokus.ngni.xposer.see.samples.helloworld.HelloREST"/> 
>    </service>
> </componentType>
> 
> HelloREST.java:
> 
> @Remotable public interface HelloREST {        @GET    String getAll(); 
>        @GET    @Path("{id}")    String getItemById(@PathParam("id") 
> String itemId);        @POST    void addItem(Item item);        @PUT 
>    void updateItem(Item item);        @DELETE    @Path("{id}")    void 
> deleteItem(@PathParam("id") String itemId); }
> 
> 
> HelloRESTImpl.java:
> 
> @Scope("COMPOSITE") public class HelloRESTImpl implements HelloREST { 
>           @Init    public void init() { 
>        System.out.println("INIT");    }    public void addItem(Item 
> item) {        System.out.println("add");    }    public void 
> deleteItem(String itemId) {        System.out.println("delete");    } 
>    public String getAll() {        return "ALL";    }    public String 
> getItemById(String itemId) {        return itemId;    }    public void 
> updateItem(Item item) {        System.out.println("update");    }     }
> 
> 
> 
> Thanks
> Alex


Re: [Tuscany M5] Problem with the REST binding...

Posted by Luciano Resende <lu...@gmail.com>.
On Mon, Sep 20, 2010 at 2:32 AM, Alexander Blotny
<Al...@fokus.fraunhofer.de> wrote:
> Hi Luciano,
>
> does the hudson build work again? So that your fix is in the snapshot?
>
> Thx,
> Alex
>

Hudson is very unstable these days, I'd recommend you checkout the
latest code and build it yourself and you will have all fixes.
Instructions to download the source and build is available at [1].

[1] http://tuscany.apache.org/documentation-2x/sca-java-development-guide.html



-- 
Luciano Resende
http://people.apache.org/~lresende
http://twitter.com/lresende1975
http://lresende.blogspot.com/

Re: [Tuscany M5] Problem with the REST binding...

Posted by Alexander Blotny <Al...@fokus.fraunhofer.de>.
Hi Luciano,

does the hudson build work again? So that your fix is in the snapshot?

Thx,
Alex


Am 05.09.10 19:02 schrieb "Luciano Resende" unter <lu...@gmail.com>:

> On Sun, Sep 5, 2010 at 5:34 AM, Alexander Blotny
> <Al...@fokus.fraunhofer.de> wrote:
>> Hi Luciano,
>> 
>> I could start the Snapshot of Tuscany but starting a bundle with REST
>> binding again ends with this error:
>> 
>> java.lang.IllegalStateException: java.lang.NoClassDefFoundError:
>> org/apache/tuscany/sca/core/invocation/ProxyFactory
>> 
>> I got the Snashot from here:
>> 
>> http://hudson.zones.apache.org/hudson/job/Tuscany-2x/lastSuccessfulBuild/org
>> .apache.tuscany.sca$tuscany-distribution-all/artifact/org.apache.tuscany.sca
>> /tuscany-distribution-all/2.0-SNAPSHOT/apache-tuscany-sca-all-2.0-SNAPSHOT.t
>> ar.gz
>> 
>> Is the fix in this snapshot?
>> 
>> greetings,
>> Alex
>> 
>> 
> 
> It seems that the hudson build has been failing for a while, thus the
> snapshot you have won't have the fix. Let me try to get a snapshot
> distribution available in my apache account and I'll let you know when
> it's ready.
> 
> 


Re: [Tuscany M5] Problem with the REST binding...

Posted by Luciano Resende <lu...@gmail.com>.
On Sun, Sep 5, 2010 at 5:34 AM, Alexander Blotny
<Al...@fokus.fraunhofer.de> wrote:
> Hi Luciano,
>
> I could start the Snapshot of Tuscany but starting a bundle with REST
> binding again ends with this error:
>
> java.lang.IllegalStateException: java.lang.NoClassDefFoundError:
> org/apache/tuscany/sca/core/invocation/ProxyFactory
>
> I got the Snashot from here:
>
> http://hudson.zones.apache.org/hudson/job/Tuscany-2x/lastSuccessfulBuild/org
> .apache.tuscany.sca$tuscany-distribution-all/artifact/org.apache.tuscany.sca
> /tuscany-distribution-all/2.0-SNAPSHOT/apache-tuscany-sca-all-2.0-SNAPSHOT.t
> ar.gz
>
> Is the fix in this snapshot?
>
> greetings,
> Alex
>
>

It seems that the hudson build has been failing for a while, thus the
snapshot you have won't have the fix. Let me try to get a snapshot
distribution available in my apache account and I'll let you know when
it's ready.



-- 
Luciano Resende
http://people.apache.org/~lresende
http://twitter.com/lresende1975
http://lresende.blogspot.com/

Re: [Tuscany M5] Problem with the REST binding...

Posted by Alexander Blotny <Al...@fokus.fraunhofer.de>.
Hi Luciano,

thanks for your effort.

So the patch is in the Nightly Builds?
I just tried a nightly build of Tuscany and it started with exceptions. :-(

Maybe it is possible that I just replace some jars of the Milestone 5
release with some jars of the nightly build?

What is the name of the example you created? Do I find it in the samples
directory?

greetings,
Alex


Am 29.08.10 11:00 schrieb "Luciano Resende" unter <lu...@gmail.com>:

> On Tue, Jul 20, 2010 at 10:53 AM, Luciano Resende <lu...@gmail.com>
> wrote:
>> On Mon, Jul 19, 2010 at 11:05 AM, Alexander Blotny
>> <Al...@fokus.fraunhofer.de> wrote:
>>> Hi Luciano,
>>> 
>>> did you have a look at the JIRA issue TUSCANY-3595?
>>> I do not find a solution.
>>> 
>>> greetings,
>>> Alex
>>> 
>> 
>> I did take a look, and had it going further... I´m currently having
>> issues with class loaders which is loading different interface and
>> causing issues with the wink integration. I´m having limited access to
>> internet untill this weekend, but will try to update the progress when
>> I get back to us.
>> 
> 
> Hi Alex
> 
>    I finally got enough time to go over this and hopefully find and
> fix all of the issues with Tuscany and Wink to allow the REST binding
> to work properly in a OSGi environment. Could you please give it a try
> and let me know if you still have any issues.
> 
> Thanks


Re: [Tuscany M5] Problem with the REST binding...

Posted by Alexander Blotny <Al...@fokus.fraunhofer.de>.
Hi Luciano,

I could start the Snapshot of Tuscany but starting a bundle with REST
binding again ends with this error:

java.lang.IllegalStateException: java.lang.NoClassDefFoundError:
org/apache/tuscany/sca/core/invocation/ProxyFactory

I got the Snashot from here:

http://hudson.zones.apache.org/hudson/job/Tuscany-2x/lastSuccessfulBuild/org
.apache.tuscany.sca$tuscany-distribution-all/artifact/org.apache.tuscany.sca
/tuscany-distribution-all/2.0-SNAPSHOT/apache-tuscany-sca-all-2.0-SNAPSHOT.t
ar.gz

Is the fix in this snapshot?

greetings,
Alex


Am 29.08.10 11:00 schrieb "Luciano Resende" unter <lu...@gmail.com>:

> On Tue, Jul 20, 2010 at 10:53 AM, Luciano Resende <lu...@gmail.com>
> wrote:
>> On Mon, Jul 19, 2010 at 11:05 AM, Alexander Blotny
>> <Al...@fokus.fraunhofer.de> wrote:
>>> Hi Luciano,
>>> 
>>> did you have a look at the JIRA issue TUSCANY-3595?
>>> I do not find a solution.
>>> 
>>> greetings,
>>> Alex
>>> 
>> 
>> I did take a look, and had it going further... I´m currently having
>> issues with class loaders which is loading different interface and
>> causing issues with the wink integration. I´m having limited access to
>> internet untill this weekend, but will try to update the progress when
>> I get back to us.
>> 
> 
> Hi Alex
> 
>    I finally got enough time to go over this and hopefully find and
> fix all of the issues with Tuscany and Wink to allow the REST binding
> to work properly in a OSGi environment. Could you please give it a try
> and let me know if you still have any issues.
> 
> Thanks


Re: [Tuscany M5] Problem with the REST binding...

Posted by Luciano Resende <lu...@gmail.com>.
On Tue, Jul 20, 2010 at 10:53 AM, Luciano Resende <lu...@gmail.com> wrote:
> On Mon, Jul 19, 2010 at 11:05 AM, Alexander Blotny
> <Al...@fokus.fraunhofer.de> wrote:
>> Hi Luciano,
>>
>> did you have a look at the JIRA issue TUSCANY-3595?
>> I do not find a solution.
>>
>> greetings,
>> Alex
>>
>
> I did take a look, and had it going further... I´m currently having
> issues with class loaders which is loading different interface and
> causing issues with the wink integration. I´m having limited access to
> internet untill this weekend, but will try to update the progress when
> I get back to us.
>

Hi Alex

   I finally got enough time to go over this and hopefully find and
fix all of the issues with Tuscany and Wink to allow the REST binding
to work properly in a OSGi environment. Could you please give it a try
and let me know if you still have any issues.

Thanks

-- 
Luciano Resende
http://people.apache.org/~lresende
http://twitter.com/lresende1975
http://lresende.blogspot.com/

Re: [Tuscany M5] Problem with the REST binding...

Posted by Luciano Resende <lu...@gmail.com>.
On Mon, Jul 19, 2010 at 11:05 AM, Alexander Blotny
<Al...@fokus.fraunhofer.de> wrote:
> Hi Luciano,
>
> did you have a look at the JIRA issue TUSCANY-3595?
> I do not find a solution.
>
> greetings,
> Alex
>

I did take a look, and had it going further... I´m currently having
issues with class loaders which is loading different interface and
causing issues with the wink integration. I´m having limited access to
internet untill this weekend, but will try to update the progress when
I get back to us.



-- 
Luciano Resende
http://people.apache.org/~lresende
http://twitter.com/lresende1975
http://lresende.blogspot.com/

Re: BPEL sample Tuscany M5

Posted by Alexander Blotny <Al...@fokus.fraunhofer.de>.
Hi Mike,

I am starting Tuscany via java -jar modules/osgi-3.5.0-v20090520.jar -clean
-console -configuration features/configuration.
Then I install and start the jar with the console commands.

The location I get is the following:
file:/Users/alb/Development/XPOSER/SEE_THESIS/features/configuration/org.ecl
ipse.osgi/bundles/306/5/bundlefile

The jar structure was not complete. I forgot that maven is adding something
after compiling.
Now I unpacked the jar and this is what it really looks like:

  helloworld.bpel  helloworld.bpelex  helloworld.composite  helloworld.wsdl
log4j.properties META-INF  MANIFEST.MF  sca-contribution.xml
META-INF/maven/de.fhg.fokus.ngni.xposer.see.services/service.bpel
pom.properties  pom.xml de/fhg/fokus/ngni/xposer/see/service/bpel
Activator.class  BPELClient.class  Hello.class

So there is a service.bpel object but is a directory. Maybe there is a
confusion about the maven files inside?

greetings,
Alex

Am 26.07.10 20:52 schrieb "Mike Edwards" unter
<mi...@gmail.com>:

> Alexander Blotny wrote:
>> Hi,
>> 
>> I am trying to get the BPEL hello world sample running in Tuscany M5.
>> 
>> I start the node inside the Activator of the jar file:
>> 
>> String location =
>> ContributionLocationHelper.getContributionLocation(Activator.class);
>>             
>> node = NodeFactory.newInstance().createNode("helloworld.composite", new
>> Contribution("test", location));
>> Hello bpelService = node.getService(Hello.class, "BPELHelloWorldComponent");
>> String result = bpelService.hello("Hello"); System.out.println(result);
>> 
>> The file structure of the jar is the following:
>> 
>>   helloworld.bpel
>>   helloworld.bpelex
>>   helloworld.composite
>>   helloworld.wsdl
>>   log4j.properties
>> META-INF
>>   MANIFEST.MF
>>   sca-contribution.xml
>> de/fhg/fokus/ngni/xposer/see/service/bpel
>>   Activator.class
>>   Hello.class
>> 
>> The only things I changed in the sample is the namespace in the
>> composite and contribution from
>> xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903 to
>> xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912.
>> 
>> Now the following error occurs:
>> 
>> 26.07.2010 11:42:05
>> org.apache.tuscany.sca.implementation.bpel.xml.BPELDocumentProcessor
>> [Contribution: test, Artifact:
>> META-INF/maven/de.fhg.fokus.ngni.xposer.see.services/service.bpel]
>> (ContributionReadException)
>> SCHWERWIEGEND: ContributionReadException occured due to :
>> org.apache.tuscany.sca.contribution.processor.ContributionReadException:
>> java.lang.NullPointerException
>>     at 
>> org.apache.tuscany.sca.implementation.bpel.xml.BPELDocumentProcessor.read(BPE
>> LDocumentProcessor.java:93)
>>     at 
>> org.apache.tuscany.sca.implementation.bpel.xml.BPELDocumentProcessor.read(BPE
>> LDocumentProcessor.java:57)
>>     at 
> <snip>
>> 
>> I guess that the BPEL document cannot be found. But I did not find a way
>> to point on the file in the sample.
>> 
>> Thanks in advance for some advice.
>> 
>> greetings,
>> Alex
> Alex,
> 
> It would be interesting to know more how you are starting the JAR.
> 
> The error itself implies that Tuscany is reading your contribution and thinks
> it has found a file:
> 
> META-INF/maven/de.fhg.fokus.ngni.xposer.see.services/service.bpel
> 
> When it tries to read that file it gets an exception.
> 
> Given that you claim the JAR layout as above, that such a file should be found
> seems more than a
> little surprising.
> 
> One interesting question is just what location you get for the contribution -
> how about printing out
> what you get for "location" in the code above?
> 
> 
> Yours,  Mike.
> 


Re: BPEL sample Tuscany M5

Posted by Mike Edwards <mi...@gmail.com>.
Alexander Blotny wrote:
> Hi,
> 
> I am trying to get the BPEL hello world sample running in Tuscany M5.
> 
> I start the node inside the Activator of the jar file:
> 
> String location = 
> ContributionLocationHelper.getContributionLocation(Activator.class); 
>             
> node = NodeFactory.newInstance().createNode("helloworld.composite", new 
> Contribution("test", location));
> Hello bpelService = node.getService(Hello.class, "BPELHelloWorldComponent");
> String result = bpelService.hello("Hello"); System.out.println(result);
> 
> The file structure of the jar is the following:
> 
>   helloworld.bpel
>   helloworld.bpelex
>   helloworld.composite
>   helloworld.wsdl
>   log4j.properties
> META-INF
>   MANIFEST.MF
>   sca-contribution.xml
> de/fhg/fokus/ngni/xposer/see/service/bpel
>   Activator.class
>   Hello.class
> 
> The only things I changed in the sample is the namespace in the 
> composite and contribution from 
> xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903 to 
> xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912.
> 
> Now the following error occurs:
> 
> 26.07.2010 11:42:05 
> org.apache.tuscany.sca.implementation.bpel.xml.BPELDocumentProcessor 
> [Contribution: test, Artifact: 
> META-INF/maven/de.fhg.fokus.ngni.xposer.see.services/service.bpel] 
> (ContributionReadException)
> SCHWERWIEGEND: ContributionReadException occured due to :
> org.apache.tuscany.sca.contribution.processor.ContributionReadException: 
> java.lang.NullPointerException
>     at 
> org.apache.tuscany.sca.implementation.bpel.xml.BPELDocumentProcessor.read(BPELDocumentProcessor.java:93)
>     at 
> org.apache.tuscany.sca.implementation.bpel.xml.BPELDocumentProcessor.read(BPELDocumentProcessor.java:57)
>     at 
<snip>
> 
> I guess that the BPEL document cannot be found. But I did not find a way 
> to point on the file in the sample.
> 
> Thanks in advance for some advice.
> 
> greetings,
> Alex
Alex,

It would be interesting to know more how you are starting the JAR.

The error itself implies that Tuscany is reading your contribution and thinks it has found a file:

META-INF/maven/de.fhg.fokus.ngni.xposer.see.services/service.bpel

When it tries to read that file it gets an exception.

Given that you claim the JAR layout as above, that such a file should be found seems more than a 
little surprising.

One interesting question is just what location you get for the contribution - how about printing out 
what you get for "location" in the code above?


Yours,  Mike.


BPEL sample Tuscany M5

Posted by Alexander Blotny <Al...@fokus.fraunhofer.de>.
Hi,

I am trying to get the BPEL hello world sample running in Tuscany M5.

I start the node inside the Activator of the jar file:

String location = 
ContributionLocationHelper.getContributionLocation(Activator.class);
node = NodeFactory.newInstance().createNode("helloworld.composite", new
Contribution("test", location));
Hello bpelService = node.getService(Hello.class, "BPELHelloWorldComponent");
String result = bpelService.hello("Hello"); System.out.println(result);

The file structure of the jar is the following:

  helloworld.bpel
  helloworld.bpelex
  helloworld.composite
  helloworld.wsdl
  log4j.properties
META-INF
  MANIFEST.MF
  sca-contribution.xml
de/fhg/fokus/ngni/xposer/see/service/bpel
  Activator.class
  Hello.class

The only things I changed in the sample is the namespace in the composite
and contribution from
xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903 to
xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912.

Now the following error occurs:

26.07.2010 11:42:05
org.apache.tuscany.sca.implementation.bpel.xml.BPELDocumentProcessor
[Contribution: test, Artifact:
META-INF/maven/de.fhg.fokus.ngni.xposer.see.services/service.bpel]
(ContributionReadException)
SCHWERWIEGEND: ContributionReadException occured due to :
org.apache.tuscany.sca.contribution.processor.ContributionReadException:
java.lang.NullPointerException
    at 
org.apache.tuscany.sca.implementation.bpel.xml.BPELDocumentProcessor.read(BP
ELDocumentProcessor.java:93)
    at 
org.apache.tuscany.sca.implementation.bpel.xml.BPELDocumentProcessor.read(BP
ELDocumentProcessor.java:57)
    at 
org.apache.tuscany.sca.contribution.processor.DefaultURLArtifactProcessorExt
ensionPoint$LazyURLArtifactProcessor.read(DefaultURLArtifactProcessorExtensi
onPoint.java:288)
    at 
org.apache.tuscany.sca.contribution.processor.ExtensibleURLArtifactProcessor
.read(ExtensibleURLArtifactProcessor.java:109)
    at 
org.apache.tuscany.sca.contribution.processor.impl.ContributionContentProces
sor.read(ContributionContentProcessor.java:152)
    at 
org.apache.tuscany.sca.contribution.processor.impl.ContributionContentProces
sor.read(ContributionContentProcessor.java:64)
    at 
org.apache.tuscany.sca.contribution.processor.DefaultURLArtifactProcessorExt
ensionPoint$LazyURLArtifactProcessor.read(DefaultURLArtifactProcessorExtensi
onPoint.java:288)
    at 
org.apache.tuscany.sca.deployment.impl.DeployerImpl.loadContribution(Deploye
rImpl.java:621)
    at 
org.apache.tuscany.sca.node.impl.NodeFactoryImpl.loadContributions(NodeFacto
ryImpl.java:394)
    at org.apache.tuscany.sca.node.impl.NodeImpl.start(NodeImpl.java:125)
    at 
de.fhg.fokus.ngni.xposer.see.service.bpel.Activator.start(Activator.java:48)
    at 
org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleConte
xtImpl.java:782)
    at java.security.AccessController.doPrivileged(Native Method)
    at 
org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(Bu
ndleContextImpl.java:773)
    at 
org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleConte
xtImpl.java:754)
    at 
org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.j
ava:352)
    at 
org.eclipse.osgi.framework.internal.core.AbstractBundle.updateWorker(Abstrac
tBundle.java:625)
    at 
org.eclipse.osgi.framework.internal.core.AbstractBundle.update(AbstractBundl
e.java:572)
    at 
org.eclipse.osgi.framework.internal.core.AbstractBundle.update(AbstractBundl
e.java:555)
    at 
org.eclipse.osgi.framework.internal.core.FrameworkCommandProvider._update(Fr
ameworkCommandProvider.java:380)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
    at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at 
org.eclipse.osgi.framework.internal.core.FrameworkCommandInterpreter.execute
(FrameworkCommandInterpreter.java:155)
    at 
org.eclipse.osgi.framework.internal.core.FrameworkConsole.docommand(Framewor
kConsole.java:303)
    at 
org.eclipse.osgi.framework.internal.core.FrameworkConsole.console(FrameworkC
onsole.java:288)
    at 
org.eclipse.osgi.framework.internal.core.FrameworkConsole.run(FrameworkConso
le.java:224)
    at java.lang.Thread.run(Thread.java:637)
Caused by: java.lang.NullPointerException
    at java.io.FilterInputStream.close(FilterInputStream.java:155)
    at 
sun.net.www.protocol.jar.JarURLConnection$JarURLInputStream.close(JarURLConn
ection.java:90)
    at 
org.apache.tuscany.sca.implementation.bpel.xml.BPELDocumentProcessor.readPro
cessDefinition(BPELDocumentProcessor.java:174)
    at 
org.apache.tuscany.sca.implementation.bpel.xml.BPELDocumentProcessor.read(BP
ELDocumentProcessor.java:89)
    ... 28 more

I guess that the BPEL document cannot be found. But I did not find a way to
point on the file in the sample.

Thanks in advance for some advice.

greetings,
Alex

Re: [Tuscany M5] Problem with the REST binding...

Posted by Alexander Blotny <Al...@fokus.fraunhofer.de>.
Hi Luciano,

did you have a look at the JIRA issue TUSCANY-3595?
I do not find a solution.

greetings,
Alex


Am 22.06.10 23:03 schrieb "Luciano Resende" unter <lu...@gmail.com>:

> On Tue, Jun 22, 2010 at 10:05 AM, Alexander Blotny
> <Al...@fokus.fraunhofer.de> wrote:
>> Hi,
>> 
>> I am still trying to get REST working in Tuscany M5.
>> 
>> I changed the tuscany-binding-rest-runtime-2.0-M5.jar Manifest file as
>> attached. At first the
>> org.apache.tuscany.sca.interfacedef.java;version=2.0.0 import was missing as
>> filed in https://issues.apache.org/jira/browse/TUSCANY-3595. Secondly a
>> package was resolved from a wrong bundle resulting in:
>> 
>> java.lang.NoClassDefFoundError:
>> org/apache/tuscany/sca/core/invocation/ProxyFactory
>> 
>> The package org.apache.tuscany.sca.invocation is exported by
>> org.apache.tuscany.sca.core bundle and org.apache.tuscany.sca.core.spi
>> bundle.
>> I have added following line in manifest to use the right bundle:
>> Require-Bundle: org.apache.tuscany.sca.core
>> 
>> Not sure if this should be done in that way...
>> 
>> Nevertheless the next exception occurred and I don't know what to do for
>> solving that issue. I attached the error log.
>> 
>> Thanks in advance for some help.
>> 
>> greetings,
>> Alex
>> 
> 
> I have assigned the JIRA to myself, and I'm going to start looking at
> this today in my "night shift"  :)


Re: [Tuscany M5] Problem with the REST binding...

Posted by Luciano Resende <lu...@gmail.com>.
On Tue, Jun 22, 2010 at 10:05 AM, Alexander Blotny
<Al...@fokus.fraunhofer.de> wrote:
> Hi,
>
> I am still trying to get REST working in Tuscany M5.
>
> I changed the tuscany-binding-rest-runtime-2.0-M5.jar Manifest file as
> attached. At first the
> org.apache.tuscany.sca.interfacedef.java;version=2.0.0 import was missing as
> filed in https://issues.apache.org/jira/browse/TUSCANY-3595. Secondly a
> package was resolved from a wrong bundle resulting in:
>
> java.lang.NoClassDefFoundError:
> org/apache/tuscany/sca/core/invocation/ProxyFactory
>
> The package org.apache.tuscany.sca.invocation is exported by
> org.apache.tuscany.sca.core bundle and org.apache.tuscany.sca.core.spi
> bundle.
> I have added following line in manifest to use the right bundle:
> Require-Bundle: org.apache.tuscany.sca.core
>
> Not sure if this should be done in that way...
>
> Nevertheless the next exception occurred and I don't know what to do for
> solving that issue. I attached the error log.
>
> Thanks in advance for some help.
>
> greetings,
> Alex
>

I have assigned the JIRA to myself, and I'm going to start looking at
this today in my "night shift"  :)

-- 
Luciano Resende
http://people.apache.org/~lresende
http://twitter.com/lresende1975
http://lresende.blogspot.com/

Re: [Tuscany M5] Problem with the REST binding...

Posted by Alexander Blotny <Al...@fokus.fraunhofer.de>.
Hi,

I am still trying to get REST working in Tuscany M5.

I changed the tuscany-binding-rest-runtime-2.0-M5.jar Manifest file as
attached. At first the
org.apache.tuscany.sca.interfacedef.java;version=2.0.0 import was missing as
filed in https://issues.apache.org/jira/browse/TUSCANY-3595. Secondly a
package was resolved from a wrong bundle resulting in:

java.lang.NoClassDefFoundError:
org/apache/tuscany/sca/core/invocation/ProxyFactory

The package org.apache.tuscany.sca.invocation is exported by
org.apache.tuscany.sca.core bundle and org.apache.tuscany.sca.core.spi
bundle.
I have added following line in manifest to use the right bundle:
Require-Bundle: org.apache.tuscany.sca.core

Not sure if this should be done in that way...

Nevertheless the next exception occurred and I don't know what to do for
solving that issue. I attached the error log.

Thanks in advance for some help.

greetings,
Alex


Am 16.06.10 09:35 schrieb "Alexander Blotny" unter
<Al...@fokus.fraunhofer.de>:

> Hi Mike,
> Hi Raymond,
> 
> I tried the solution you suggested. Another error occurred...
> I filed that issue to https://issues.apache.org/jira/browse/TUSCANY-3595.
> 
> greetings,
> Alex
> 
> Am 15.06.10 23:28 schrieb "Mike Edwards" unter
> <mi...@gmail.com>:
> 
>> Alex,
>> 
>> You're running the code under OSGi?
>> 
>> To me, this looks like the binding-rest-runtime module has not been tested
>> running under OSGi.  It
>> is clearly missing one MAINFEST.MF entry, which causes the ClassNotFound
>> exception you're getting.
>> I am concerned that there may be more similar failures due to the lack of
>> testing under OSGi.
>> 
>> To fix the particular problem you have here, the following needs to be added
>> to the Import-Package:
>> section of the MANIFEST.MF for the binding-rest-runtime module:
>> 
>> org.apache.tuscany.sca.interfacedef.java;version=2.0.0,
>> 
>> However, just adding this may well not be enough.
>> 
>> I am not familiar with the binding-rest-runtime module, so it will take me
>> some time to get to grips
>> with it and make it work properly under OSGi - hopefully someone else from
>> the
>> Tuscany team can take
>> a look at it more quickly.
>> 
>> 
>> Yours,  Mike.
>> 
>> 
>> Alexander Blotny wrote:
>>> Hi,
>>> 
>>> I have a problem to export a REST service via an OSGi bundle. Most of
>>> the code is taken from the store example for binding.rest.
>>> (http://tuscany.apache.org/documentation-2x/sca-java-bindingrest.html)
>>> 
>>> I got following exception:
>>> 
>>> java.lang.IllegalStateException: java.lang.NoClassDefFoundError:
>>> org/apache/tuscany/sca/interfacedef/java/JavaInterface
>>>     at org.apache.tuscany.sca.node.impl.NodeImpl.start(NodeImpl.java:173)
>>>     at 
>>> 
org.apache.tuscany.sca.node.osgi.impl.NodeManager.bundleStarted(NodeManager.>>>
j
>>> ava:117)
>>>     at 
>>> 
org.apache.tuscany.sca.node.osgi.impl.NodeManager.bundleChanged(NodeManager.>>>
j
>>> ava:139)
>>>     at 
>>> 
org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(Bun>>>
d
>>> leContextImpl.java:916)
>>>     at 
>>> 
org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.>>>
j
>>> ava:220)
>>>     at 
>>> 
org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(L>>>
i
>>> stenerQueue.java:149)
>>>     at 
>>> 
org.eclipse.osgi.framework.internal.core.Framework.publishBundleEventPrivile>>>
g
>>> ed(Framework.java:1350)
>>>     at 
>>> 
org.eclipse.osgi.framework.internal.core.Framework.publishBundleEvent(Framew>>>
o
>>> rk.java:1301)
>>>     at 
>>> 
org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.j>>>
a
>>> va:362)
>>>     at 
>>> 
org.eclipse.osgi.framework.internal.core.AbstractBundle.updateWorker(Abstrac>>>
t
>>> Bundle.java:625)
>>>     at 
>>> 
org.eclipse.osgi.framework.internal.core.AbstractBundle.update(AbstractBundl>>>
e
>>> .java:572)
>>>     at 
>>> 
org.eclipse.osgi.framework.internal.core.AbstractBundle.update(AbstractBundl>>>
e
>>> .java:555)
>>>     at 
>>> 
org.apache.felix.shell.impl.UpdateCommandImpl.execute(UpdateCommandImpl.java>>>
:
>>> 96)
>>>     at 
>>> 
org.apache.felix.shell.impl.Activator$ShellServiceImpl.executeCommand(Activa>>>
t
>>> or.java:286)
>>>     at 
>>> 
org.apache.felix.shell.tui.Activator$ShellTuiRunnable.run(Activator.java:184>>>
)
>>>     at java.lang.Thread.run(Thread.java:637)
>>> Caused by: java.lang.NoClassDefFoundError:
>>> org/apache/tuscany/sca/interfacedef/java/JavaInterface
>>>     at 
>>> 
org.apache.tuscany.sca.binding.rest.provider.RESTServiceBindingProvider.regi>>>
s
>>> terWithJAXRS(RESTServiceBindingProvider.java:217)
>>>     at 
>>> 
org.apache.tuscany.sca.binding.rest.provider.RESTServiceBindingProvider.star>>>
t
>>> (RESTServiceBindingProvider.java:143)
>>>     at 
>>> 
org.apache.tuscany.sca.core.assembly.impl.CompositeActivatorImpl$1.run(Compo>>>
s
>>> iteActivatorImpl.java:423)
>>>     at java.security.AccessController.doPrivileged(Native Method)
>>>     at 
>>> 
org.apache.tuscany.sca.core.assembly.impl.CompositeActivatorImpl.startEndpoi>>>
n
>>> t(CompositeActivatorImpl.java:421)
>>>     at 
>>> 
org.apache.tuscany.sca.core.assembly.impl.CompositeActivatorImpl.start(Compo>>>
s
>>> iteActivatorImpl.java:377)
>>>     at 
>>> 
org.apache.tuscany.sca.core.assembly.impl.CompositeActivatorImpl.start(Compo>>>
s
>>> iteActivatorImpl.java:309)
>>>     at org.apache.tuscany.sca.node.impl.NodeImpl.start(NodeImpl.java:147)
>>>     ... 15 more
>>> 
>>> 
>>> The bundle has the following structure:
>>> 
>>> META-INF  MANIFEST.MF META-INF/maven META-INF/maven <no contents>
>>> META-INF/maven/de.fhg.fokus.ngni.xposer.see.samples
>>> META-INF/maven/de.fhg.fokus.ngni.xposer.see.samples <no contents>
>>> META-INF/maven/de.fhg.fokus.ngni.xposer.see.samples/helloworld-exporter
>>>  pom.properties  pom.xml OSGI-INF OSGI-INF <no contents> OSGI-INF/sca
>>>  bundle.componentType  bundle.composite de de <no contents> de/fhg
>>> de/fhg <no contents> de/fhg/fokus de/fhg/fokus <no contents>
>>> de/fhg/fokus/ngni de/fhg/fokus/ngni <no contents>
>>> de/fhg/fokus/ngni/xposer de/fhg/fokus/ngni/xposer <no contents>
>>> de/fhg/fokus/ngni/xposer/see de/fhg/fokus/ngni/xposer/see <no contents>
>>> de/fhg/fokus/ngni/xposer/see/samples
>>> de/fhg/fokus/ngni/xposer/see/samples <no contents>
>>> de/fhg/fokus/ngni/xposer/see/samples/helloworld  Activator.class
>>>  HelloREST.class de/fhg/fokus/ngni/xposer/see/samples/helloworld/impl
>>>    HelloRESTImpl.class
>>> 
>>> bundle.composite:
>>> 
>>> <composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
>>>    xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
>>>    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>>>    targetNamespace="http://calculator.dosgi"    name="HelloworldComposite">
>>>     <component name="HelloworldComponent">
>>>        <tuscany:implementation.osgi
>>> bundleSymbolicName="helloworld-exporter" bundleVersion="0.0.1" />
>>>                      <service name="HelloworldServiceREST">
>>>            <tuscany:binding.rest uri="http://localhost:8087/Helloworld"/
>>> <http://localhost:8087/Helloworld"/>>        </service>
>>>      </component>
>>> 
>>> 
>>> bundle.componentType:
>>> 
>>> <componentType xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
>>>               xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>>>               xmlns:t="http://tuscany.apache.org/xmlns/sca/1.1">
>>>    
>>>    <service name="HelloworldServiceREST">        <interface.java
>>> interface="de.fhg.fokus.ngni.xposer.see.samples.helloworld.HelloREST"/>
>>>    </service>
>>> </componentType>
>>> 
>>> HelloREST.java:
>>> 
>>> @Remotable public interface HelloREST {        @GET    String getAll();
>>>        @GET    @Path("{id}")    String getItemById(@PathParam("id")
>>> String itemId);        @POST    void addItem(Item item);        @PUT
>>>    void updateItem(Item item);        @DELETE    @Path("{id}")    void
>>> deleteItem(@PathParam("id") String itemId); }
>>> 
>>> 
>>> HelloRESTImpl.java:
>>> 
>>> @Scope("COMPOSITE") public class HelloRESTImpl implements HelloREST {
>>>           @Init    public void init() {
>>>        System.out.println("INIT");    }    public void addItem(Item
>>> item) {        System.out.println("add");    }    public void
>>> deleteItem(String itemId) {        System.out.println("delete");    }
>>>    public String getAll() {        return "ALL";    }    public String
>>> getItemById(String itemId) {        return itemId;    }    public void
>>> updateItem(Item item) {        System.out.println("update");    }     }
>>> 
>>> 
>>> 
>>> Thanks
>>> Alex
>> 
> 


Re: [Tuscany M5] Problem with the REST binding...

Posted by Alexander Blotny <Al...@fokus.fraunhofer.de>.
Hi Mike,
Hi Raymond,

I tried the solution you suggested. Another error occurred...
I filed that issue to https://issues.apache.org/jira/browse/TUSCANY-3595.

greetings,
Alex

Am 15.06.10 23:28 schrieb "Mike Edwards" unter
<mi...@gmail.com>:

> Alex,
> 
> You're running the code under OSGi?
> 
> To me, this looks like the binding-rest-runtime module has not been tested
> running under OSGi.  It
> is clearly missing one MAINFEST.MF entry, which causes the ClassNotFound
> exception you're getting.
> I am concerned that there may be more similar failures due to the lack of
> testing under OSGi.
> 
> To fix the particular problem you have here, the following needs to be added
> to the Import-Package:
> section of the MANIFEST.MF for the binding-rest-runtime module:
> 
> org.apache.tuscany.sca.interfacedef.java;version=2.0.0,
> 
> However, just adding this may well not be enough.
> 
> I am not familiar with the binding-rest-runtime module, so it will take me
> some time to get to grips
> with it and make it work properly under OSGi - hopefully someone else from the
> Tuscany team can take
> a look at it more quickly.
> 
> 
> Yours,  Mike.
> 
> 
> Alexander Blotny wrote:
>> Hi,
>> 
>> I have a problem to export a REST service via an OSGi bundle. Most of
>> the code is taken from the store example for binding.rest.
>> (http://tuscany.apache.org/documentation-2x/sca-java-bindingrest.html)
>> 
>> I got following exception:
>> 
>> java.lang.IllegalStateException: java.lang.NoClassDefFoundError:
>> org/apache/tuscany/sca/interfacedef/java/JavaInterface
>>     at org.apache.tuscany.sca.node.impl.NodeImpl.start(NodeImpl.java:173)
>>     at 
>> org.apache.tuscany.sca.node.osgi.impl.NodeManager.bundleStarted(NodeManager.j
>> ava:117)
>>     at 
>> org.apache.tuscany.sca.node.osgi.impl.NodeManager.bundleChanged(NodeManager.j
>> ava:139)
>>     at 
>> org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(Bund
>> leContextImpl.java:916)
>>     at 
>> org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.j
>> ava:220)
>>     at 
>> org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(Li
>> stenerQueue.java:149)
>>     at 
>> org.eclipse.osgi.framework.internal.core.Framework.publishBundleEventPrivileg
>> ed(Framework.java:1350)
>>     at 
>> org.eclipse.osgi.framework.internal.core.Framework.publishBundleEvent(Framewo
>> rk.java:1301)
>>     at 
>> org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.ja
>> va:362)
>>     at 
>> org.eclipse.osgi.framework.internal.core.AbstractBundle.updateWorker(Abstract
>> Bundle.java:625)
>>     at 
>> org.eclipse.osgi.framework.internal.core.AbstractBundle.update(AbstractBundle
>> .java:572)
>>     at 
>> org.eclipse.osgi.framework.internal.core.AbstractBundle.update(AbstractBundle
>> .java:555)
>>     at 
>> org.apache.felix.shell.impl.UpdateCommandImpl.execute(UpdateCommandImpl.java:
>> 96)
>>     at 
>> org.apache.felix.shell.impl.Activator$ShellServiceImpl.executeCommand(Activat
>> or.java:286)
>>     at 
>> org.apache.felix.shell.tui.Activator$ShellTuiRunnable.run(Activator.java:184)
>>     at java.lang.Thread.run(Thread.java:637)
>> Caused by: java.lang.NoClassDefFoundError:
>> org/apache/tuscany/sca/interfacedef/java/JavaInterface
>>     at 
>> org.apache.tuscany.sca.binding.rest.provider.RESTServiceBindingProvider.regis
>> terWithJAXRS(RESTServiceBindingProvider.java:217)
>>     at 
>> org.apache.tuscany.sca.binding.rest.provider.RESTServiceBindingProvider.start
>> (RESTServiceBindingProvider.java:143)
>>     at 
>> org.apache.tuscany.sca.core.assembly.impl.CompositeActivatorImpl$1.run(Compos
>> iteActivatorImpl.java:423)
>>     at java.security.AccessController.doPrivileged(Native Method)
>>     at 
>> org.apache.tuscany.sca.core.assembly.impl.CompositeActivatorImpl.startEndpoin
>> t(CompositeActivatorImpl.java:421)
>>     at 
>> org.apache.tuscany.sca.core.assembly.impl.CompositeActivatorImpl.start(Compos
>> iteActivatorImpl.java:377)
>>     at 
>> org.apache.tuscany.sca.core.assembly.impl.CompositeActivatorImpl.start(Compos
>> iteActivatorImpl.java:309)
>>     at org.apache.tuscany.sca.node.impl.NodeImpl.start(NodeImpl.java:147)
>>     ... 15 more
>> 
>> 
>> The bundle has the following structure:
>> 
>> META-INF  MANIFEST.MF META-INF/maven META-INF/maven <no contents>
>> META-INF/maven/de.fhg.fokus.ngni.xposer.see.samples
>> META-INF/maven/de.fhg.fokus.ngni.xposer.see.samples <no contents>
>> META-INF/maven/de.fhg.fokus.ngni.xposer.see.samples/helloworld-exporter
>>  pom.properties  pom.xml OSGI-INF OSGI-INF <no contents> OSGI-INF/sca
>>  bundle.componentType  bundle.composite de de <no contents> de/fhg
>> de/fhg <no contents> de/fhg/fokus de/fhg/fokus <no contents>
>> de/fhg/fokus/ngni de/fhg/fokus/ngni <no contents>
>> de/fhg/fokus/ngni/xposer de/fhg/fokus/ngni/xposer <no contents>
>> de/fhg/fokus/ngni/xposer/see de/fhg/fokus/ngni/xposer/see <no contents>
>> de/fhg/fokus/ngni/xposer/see/samples
>> de/fhg/fokus/ngni/xposer/see/samples <no contents>
>> de/fhg/fokus/ngni/xposer/see/samples/helloworld  Activator.class
>>  HelloREST.class de/fhg/fokus/ngni/xposer/see/samples/helloworld/impl
>>    HelloRESTImpl.class
>> 
>> bundle.composite:
>> 
>> <composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
>>    xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
>>    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>>    targetNamespace="http://calculator.dosgi"    name="HelloworldComposite">
>>     <component name="HelloworldComponent">
>>        <tuscany:implementation.osgi
>> bundleSymbolicName="helloworld-exporter" bundleVersion="0.0.1" />
>>                      <service name="HelloworldServiceREST">
>>            <tuscany:binding.rest uri="http://localhost:8087/Helloworld"/
>> <http://localhost:8087/Helloworld"/>>        </service>
>>      </component>
>> 
>> 
>> bundle.componentType:
>> 
>> <componentType xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
>>               xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>>               xmlns:t="http://tuscany.apache.org/xmlns/sca/1.1">
>>    
>>    <service name="HelloworldServiceREST">        <interface.java
>> interface="de.fhg.fokus.ngni.xposer.see.samples.helloworld.HelloREST"/>
>>    </service>
>> </componentType>
>> 
>> HelloREST.java:
>> 
>> @Remotable public interface HelloREST {        @GET    String getAll();
>>        @GET    @Path("{id}")    String getItemById(@PathParam("id")
>> String itemId);        @POST    void addItem(Item item);        @PUT
>>    void updateItem(Item item);        @DELETE    @Path("{id}")    void
>> deleteItem(@PathParam("id") String itemId); }
>> 
>> 
>> HelloRESTImpl.java:
>> 
>> @Scope("COMPOSITE") public class HelloRESTImpl implements HelloREST {
>>           @Init    public void init() {
>>        System.out.println("INIT");    }    public void addItem(Item
>> item) {        System.out.println("add");    }    public void
>> deleteItem(String itemId) {        System.out.println("delete");    }
>>    public String getAll() {        return "ALL";    }    public String
>> getItemById(String itemId) {        return itemId;    }    public void
>> updateItem(Item item) {        System.out.println("update");    }     }
>> 
>> 
>> 
>> Thanks
>> Alex
>