Hi,

This error means can't open wsdl from http://localhost:8088/Sana/services/SommePort?wsdl , Could you try to open this wsdl from a browser so that you can ensure the wsdl is there?
Freeman

On 2012-5-2, at 上午12:17, san88 wrote:

Hi,
I'm trying te create a web service with cxf 2.3.10 ad tomcat 7.0.
i have a simple function "a sum of two integers" and i created a client but when i execute the "SommeEI_SommePort_Client.java", i have these errors:
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:150)
        at
org .apache .cxf.jaxws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java: 90)
        at javax.xml.ws.Service.<init>(Service.java:56)
        at com.SommeService.<init>(SommeService.java:43)
at com.SommeEI_SommePort_Client.main(SommeEI_SommePort_Client.java: 49) Caused by: org.apache.cxf.service.factory.ServiceConstructionException:
Failed to create service.
        at
org .apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java: 94) at org.apache.cxf.jaxws.ServiceImpl.initializePorts(ServiceImpl.java:204)
        at org.apache.cxf.jaxws.ServiceImpl.<init>(ServiceImpl.java:148)
        ... 4 more
Caused by: javax.wsdl.WSDLException: WSDLException: faultCode=PARSER_ERROR:
Problem parsing 'http://localhost:8088/Sana/services/SommePort?wsdl'.:
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.java:239)
        at
org .apache .cxf.wsdl11.WSDLManagerImpl.getDefinition(WSDLManagerImpl.java:186)
        at
org .apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java: 92)
        ... 6 more
Caused by: java.net.ConnectException: Connection refused: connect
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java: 213)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
        at java.net.Socket.connect(Socket.java:529)
        at java.net.Socket.connect(Socket.java:478)
        at sun.net.NetworkClient.doConnect(NetworkClient.java:163)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:395)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:530)
        at sun.net.www.http.HttpClient.<init>(HttpClient.java:234)
        at sun.net.www.http.HttpClient.New(HttpClient.java:307)
        at sun.net.www.http.HttpClient.New(HttpClient.java:324)
        at
sun .net .www .protocol .http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:970)
        at
sun .net .www .protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java: 911)
        at
sun .net .www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java: 836)
        at
sun .net .www .protocol .http.HttpURLConnection.getInputStream(HttpURLConnection.java:1172)
        at
com .sun .org .apache .xerces .internal .impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:677)
        at
com .sun .org .apache .xerces .internal .impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java: 186)
        at
com .sun .org .apache .xerces .internal.parsers.XML11Configuration.parse(XML11Configuration.java: 772)
        at
com .sun .org .apache .xerces .internal.parsers.XML11Configuration.parse(XML11Configuration.java: 737)
        at
com .sun .org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java: 119)
        at
com .sun .org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java: 235)
        at
com .sun .org .apache .xerces .internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:284)
        ... 12 more
Can you help me please?


--
View this message in context: 
http://cxf.547215.n5.nabble.com/javax-xml-ws-WebServiceException-org-apache-cxf-service-factory-ServiceConstructionException-Failed--tp5678385.html
Sent from the cxf-user mailing list archive at Nabble.com.

---------------------------------------------
Freeman Fang

FuseSource
Email:[email protected]
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
http://blog.sina.com.cn/u/1473905042
weibo: http://weibo.com/u/1473905042










Reply via email to