[jboss-user] [JBossWS] - Problem retrieving service in developing a client
websfasciomaster
do-not-reply at jboss.com
Thu Mar 6 12:59:45 EST 2008
My client code is:
System.out.println("Starting Test Client");
| URL url = new URL("http://localhost:8080/EspertoWS/ServiceBean?wsdl");
| QName qname = new QName("http://ws.server.espertoEnel.nergal.it/","ServiceBean");
| System.out.println("Creating a service Using: \n\t"
| + url + " \n\tand " + qname);
| ServiceFactoryImpl factory = (ServiceFactoryImpl) ServiceFactoryImpl.newInstance();
| System.out.println("Passa! Qname: "+qname.getNamespaceURI());
|
| Service remote = factory.createService(url,qname);
| System.out.println("Obtaining reference to a proxy object. Remote: wsdl location "+remote.getWSDLDocumentLocation()+" Service name:"+remote.getServiceName());
| ServiceLocale proxy = (ServiceLocale) remote.getPort(qname,ServiceLocale.class);
|
and when i run this i obtain this excepition:
Exception in thread "main" org.jboss.ws.metadata.wsdl.WSDLException: javax.wsdl.WSDLException: WSDLException (at /definitions/message[1]/part): faultCode=UNBOUND_PREFIX: Unable to determine namespace of 'tns:getCurvaAllarmiPicchiResponse'.
at org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory.parse(WSDLDefinitionsFactory.java:154)
at org.jboss.ws.metadata.umdm.ServiceMetaData.getWsdlDefinitions(ServiceMetaData.java:321)
at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCClientMetaDataBuilder.buildMetaData(JAXRPCClientMetaDataBuilder.java:115)
at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCClientMetaDataBuilder.buildMetaData(JAXRPCClientMetaDataBuilder.java:86)
at org.jboss.ws.core.jaxrpc.client.ServiceImpl.(ServiceImpl.java:111)
at org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:157)
at org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:128)
at it.nergal.espertoEnel.server.hibernate.test.TestWS.main(TestWS.java:31)
Caused by: javax.wsdl.WSDLException: WSDLException (at /definitions/message[1]/part): faultCode=UNBOUND_PREFIX: Unable to determine namespace of 'tns:getCurvaAllarmiPicchiResponse'.
at com.ibm.wsdl.util.xml.DOMUtils.getQName(DOMUtils.java:309)
at com.ibm.wsdl.util.xml.DOMUtils.getQualifiedAttributeValue(DOMUtils.java:367)
at org.jboss.ws.tools.wsdl.JBossWSDLReaderImpl.getQualifiedAttributeValue(JBossWSDLReaderImpl.java:2046)
at org.jboss.ws.tools.wsdl.JBossWSDLReaderImpl.parsePart(JBossWSDLReaderImpl.java:1305)
at org.jboss.ws.tools.wsdl.JBossWSDLReaderImpl.parseMessage(JBossWSDLReaderImpl.java:1284)
at org.jboss.ws.tools.wsdl.JBossWSDLReaderImpl.parseDefinitions(JBossWSDLReaderImpl.java:336)
at org.jboss.ws.tools.wsdl.JBossWSDLReaderImpl.readWSDL(JBossWSDLReaderImpl.java:2293)
at org.jboss.ws.tools.wsdl.JBossWSDLReaderImpl.readWSDL(JBossWSDLReaderImpl.java:2257)
at org.jboss.ws.tools.wsdl.JBossWSDLReaderImpl.readWSDL(JBossWSDLReaderImpl.java:2310)
at org.jboss.ws.tools.wsdl.JBossWSDLReaderImpl.readWSDL(JBossWSDLReaderImpl.java:2331)
at org.jboss.ws.tools.wsdl.JBossWSDLReaderImpl.readWSDL(JBossWSDLReaderImpl.java:2363)
at org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory.parse(WSDLDefinitionsFactory.java:127)
... 7 more
My web service class is:
@Stateless
| //@WebService(serviceName="sdsws",portName="sdswsport")
| @WebService(endpointInterface="it.nergal.espertoEnel.server.ws.ServiceLocale",
| serviceName="EspertoWS",portName="ServiceBeanPort",
| targetNamespace="http://localhost:8080/EspertoWS/ServiceBean")
| public class ServiceBean implements ServiceLocale{
| .......
| }
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4134636#4134636
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4134636
More information about the jboss-user
mailing list