Hi, I have already used "wsdl2java -client" to generate client code to access a CXF service. The WSDL that I provided does include service endpoint information. I see that, now at runtime the client code tries to retrieve the WSDL again (see the stacktrace below), why? Does it only do it to extract the service location information? Why didn't the generated code cache location information? Is there anyway to avoid it?
Exception in thread "main" javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException: Failed to create service. at org.apache.cxf.jaxws.ServiceImpl.<init>(ServiceImpl.java:132) at org.apache.cxf.jaxws.spi.ProviderImpl.createServiceDelegate(ProviderImpl .java:65) at javax.xml.ws.Service.<init>(Service.java:56) at msjava.examples.calculator.client.CalculatorService.<init>(CalculatorSer vice.java:41) at msjava.examples.calculator.client.Calculator_CalculatorJettyHTTPPort_Cli ent.main(Calculator_CalculatorJettyHTTPPort_Client.java:53) Caused by: org.apache.cxf.service.factory.ServiceConstructionException: Failed to create service. at org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java: 83) at org.apache.cxf.jaxws.ServiceImpl.initializePorts(ServiceImpl.java:138) at org.apache.cxf.jaxws.ServiceImpl.<init>(ServiceImpl.java:130) ... 4 more Caused by: javax.wsdl.WSDLException: WSDLException: faultCode=PARSER_ERROR: Problem parsing 'http://pa912c1n5:8091/Calculator/Calculator'.: java.net.ConnectException: Connection refused: connect at com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(Unknown Source) at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source) at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source) at org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.jav a:199) at org.apache.cxf.wsdl11.WSDLManagerImpl.getDefinition(WSDLManagerImpl.java :163) at org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java: 81) Thanx -yogen -------------------------------------------------------- NOTICE: If received in error, please destroy and notify sender. Sender does not intend to waive confidentiality or privilege. Use of this email is prohibited when received in error.