On Fri, Nov 12, 2010 at 7:12 PM, Michael <[email protected]> wrote: > But the URL did end in ?wsdl. See the stack trace I included, not the URL > from my last post.
OK, then, can you read a WSDL from the browser? What do the CXF log messages on the server side say about where the server is launched? > > So are you saying that the WSDL was not found because the CXF libraries were > not in my classpath for the client? From the error messages that does not > appear to be the cause. I'm not getting ClassNotFound exceptions on CXF > library classes. > > Is there something I'm missing here? > > ----- Original Message ----- From: "Benson Margulies" > <[email protected]> > To: <[email protected]> > Sent: Friday, November 12, 2010 6:58 PM > Subject: Re: Client Side Error Accessing CXF Web Service > > > Because a wsdl URL always ends with ?wsdl? > > Meanwhile, the job of the CXF wsdl2java is to generate code _for CXF_. > Not for the built-in reference implementation. If you generate the > client with the CXF tool, you need to put CXF into the classpath. If > you want to use the generic implementation, you should use the > corresponding tools. > > > On Fri, Nov 12, 2010 at 6:48 PM, Michael <[email protected]> wrote: >> >> 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 >>> >> >> > >
