On Wed, Oct 21, 2009 at 2:28 AM, [email protected] <[email protected]> wrote: > Now i have this kind of problem give me by tuscany: > > GRAVE: Reference not found for component reference: Component = > ProvaWSService Reference = ProvaWSService > 21-ott-2009 11.15.35 > org.apache.tuscany.sca.assembly.builder.impl.CompositeBindingURIBuilderImpl > GRAVE: Reference not found for component reference: Component = > ProvaWSService Reference = ProvaWSService > 21-ott-2009 11.15.35 > org.apache.tuscany.sca.assembly.builder.impl.ComponentReferenceWireBuilderImpl > AVVERTENZA: No targets for reference: Composite = {http://sample}Calculator > Reference = ProvaWS > 21-ott-2009 11.15.35 > org.apache.tuscany.sca.assembly.builder.impl.ComponentReferenceEndpointReferenceBuilderImpl > AVVERTENZA: No targets for reference: Composite = {http://sample}Calculator > Reference = ProvaWS > 21-ott-2009 11.15.35 > org.apache.tuscany.sca.binding.ws.wsdlgen.BindingWSDLGenerator > AVVERTENZA: Unable to generate WSDL for ProvaWSService/ProvaWSService > 21-ott-2009 11.15.35 > org.apache.tuscany.sca.binding.ws.wsdlgen.BindingWSDLGenerator > GRAVE: No interface contract for ProvaWSService/ProvaWSService > Exception in thread "main" java.lang.reflect.InvocationTargetException > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > ... > > What's wrong > > i semplified my project.. I have an exteernal webservice running in tomcat > with class ProvaWs that contain a webmethod. Interface generated by wsimport > is ProvaWs and the Service is ProvaWsservice > > this mean that i have a client with jax-ws, i get service instance x and > x.getProvaWsPort() give me the stub class (remote class ProvaWs) whose > interface is ProvaWs. Calling then remote method add(@WebMethod definition). > > I add this: A ProvaWsImpl class that implements ProvaWs interface (linke in > Wehater ws example: > https://svn.apache.org/repos/asf/tuscany/branches/sca-java-1.x/samples/zipcode-jaxws/). > This is my composite: > > <composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" > targetNamespace="http://sample" > xmlns:sample="http://sample" > xmlns:wsdli="http://www.w3.org/2004/08/wsdl-instance" > name="Calculator"> > > > <!-- external web service JAX-WS --> > <component name="ProvaWSService"> > <implementation.java > class="it.netbureau.prova.ProvaWSImpl"/> > <reference name="ProvaWSService"> > <binding.ws > wsdlElement="http://prova.netbureau.it > /#wsdl.port(provaWSService/provaWSPort)" > wsdli:wsdlLocation="http://localhost:8080 > /ProvaWS/provaWS?wsdl"/> > </reference> > </component> > > </composite> > > I pass my reference in : > > @Service(ProvaWS.class) > public class ProvaWSImpl implements ProvaWS{ > > �...@reference > public ProvaWS ProvaWS; > > public Integer addws(int num1, int num2) { > return ProvaWS.addws(num1, num2); > } > > What's wrong? I should implement an interface also for ProvaWsService??? :| :( > > thank you! > Roby > >
You reference name <reference name="ProvaWSService"> Should match you reference variable @Reference public ProvaWS ProvaWS; so it should be @Reference public ProvaWS ProvaWSService; -- Luciano Resende http://people.apache.org/~lresende http://lresende.blogspot.com/
