sorry the name of the service means: 1) the name of tag components in composite file? or 2) the name of tag service in a composite file? or 3)the name of Service class generated with wsimport that give me the port to ws?
i'm confused.. my code used the 3 Node node = Node.getInstance... provaws = ((Client)node).getService(ProvaWS.class, "ProvaWSService"); ProvaWS is the interface of jax-ws web service (generated by ws monitor) and ProvaWSService is right? above the error give me by tuscany: it's a reflection error.. > ok > > i try as you suggest me (see the above response, here) > but now i give me an error of service unavailable. The service is alive and > the wsdl url is correct. > The error is " java.lang.reflect.InvocationTargetException Caused by: > org.oasisopen.sca.ServiceUnavailableException: The service ProvaWSService has > not been contributed to the domain" as you can see above. but i can't > understand what mean..the web service try to call is an external web service > running in tomcat.. > anny suggest please? > > thank you > > 22-ott-2009 10.01.43 org.apache.tuscany.sca.node.impl.NodeImpl start > INFO: Starting node: http://tuscany.apache.org/sca/1.1/nodes/default > 22-ott-2009 10.01.44 org.apache.tuscany.sca.node.impl.NodeFactoryImpl > configureNode > INFO: Loading contribution: > file:/C:/Documents%20and%20Settings/portoni.NETBUREAU/Documenti/NetBeansProjects/SCAExternalWS2/ANT_TUSCANY_RUNNER/sample-invoking-Provaws.jar > 22-ott-2009 10.01.46 > org.apache.tuscany.sca.endpoint.impl.EndpointRegistryImpl addEndpoint > INFO: EndpointRegistry: Add endpoint - Endpoint: URI = > ProvaWSExtService#service-binding(ProvaWS/ProvaWS) > 22-ott-2009 10.01.46 > org.apache.tuscany.sca.endpoint.impl.EndpointRegistryImpl addEndpointReference > INFO: EndpointRegistry: Add endpoint reference - Endpoint Reference: URI = > ProvaWSExtService#reference-binding(ProvaWSService/ProvaWSService) Target = > Endpoint: > Exception in thread "main" java.lang.reflect.InvocationTargetException > 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.apache.tuscany.sca.launcher.LauncherMain.invokeMainMethod(LauncherMain.java:114) > at > org.apache.tuscany.sca.launcher.LauncherMain.main(LauncherMain.java:55) > Caused by: org.oasisopen.sca.ServiceUnavailableException: The service > ProvaWSService has not been contributed to the domain > at > org.apache.tuscany.sca.node.impl.NodeImpl.getServiceReference(NodeImpl.java:172) > at > org.apache.tuscany.sca.node.impl.NodeImpl.getService(NodeImpl.java:138) > at TuscanyClient.Tuscanyclient.main(Tuscanyclient.java:41) > ... 6 more > > > > ---------- Initial Header ----------- > > From : "Luciano Resende" [email protected] > To : [email protected] > Cc : > Date : Wed, 21 Oct 2009 08:07:30 -0700 > Subject : Re: reference to jax-ws external web service (calling it) > > > > > > > > > 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/ > > > >
