I don't understand your comment.
Let me explain. I used CXF in Eclipse to generate a WSDL from my very
simple Java code. Then I used CXF in Eclipse once again to generate a
client application. I took the generated code, copied it to an Eclipse Java
project, created a simple class with just a main method and tried to
instantiate the service from main.
When you say this isn't CXF, I would not expect to see anything CXF related
here. Creating Java code from a WSDL for a client (even though I used CXF
in Eclipse) should not generate code that is dependent on CXF. What if the
client isn't or doesn't want to use CXF? In fact, the stack trace shows
exactly that, the calls from my code to the JAX-WS library (javax.xml.ws),
no CXF.
But my question is why can't the WSDL be found at
http://localhost:8080/SimpleCXFWebServiceForTomcat/services/SimplePort
Any ideas?
Thanks,
Mike
----- Original Message -----
From: "Benson Margulies" <[email protected]>
To: <[email protected]>
Sent: Thursday, November 11, 2010 5:56 PM
Subject: Re: Client Side Error Accessing CXF Web Service
this isn't CXF. It looks like you're just using the 1.6 JDK builtin stuff.
On Thu, Nov 11, 2010 at 5:42 PM, Michael <[email protected]> wrote:
Although I been working with web services for quite some time this is my
first attempt to create web services using CXF. I'm starting with a very
simple service (Java first) and using a simple standalone Jave console app
as the client.
My development environment is JDK 1.6, Java EE 6, Eclipse Helios (With
WTP) and Tomcat 6.
When I run my client from Eclipse I get the following error:
Exception in thread "main" javax.xml.ws.WebServiceException: Failed to
access the WSDL at:
http://localhost:8080/SimpleCXFWebServiceForTomcat/services/SimplePort?wsdl.
It failed with:
http://localhost:8080/SimpleCXFWebServiceForTomcat/services/SimplePort?wsdl.
at
com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.tryWithMex(Unknown
Source)
at com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.parse(Unknown
Source)
at com.sun.xml.internal.ws.client.WSServiceDelegate.parseWSDL(Unknown
Source)
at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown Source)
at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown Source)
at com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown
Source)
at javax.xml.ws.Service.<init>(Unknown Source)
at org.simple.ws.SimpleService.<init>(SimpleService.java:52)
at org.simple.ws.SimpleClient.main(SimpleClient.java:8)
Caused by: java.io.FileNotFoundException:
http://localhost:8080/SimpleCXFWebServiceForTomcat/services/SimplePort?wsdl
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown
Source)
at java.net.URL.openStream(Unknown Source)
at
com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.createReader(Unknown
Source)
at
com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.resolveWSDL(Unknown
Source)
... 8 more
Can someone please explain?
Please let me know if you need source code sent to assist.
Thanks,
Mike