Here's a WSDL-first example I created: http://www.jroller.com/gmazza/date/20071019
For just a pure client, of an already existing web service: http://www.jroller.com/gmazza/date/20070929 HTH, Glen Am Dienstag, den 19.02.2008, 16:24 -0800 schrieb Daniel Lipofsky: > I am trying to learn CXF, I have installed the java_first_jaxws > sample on Tomcat 5.5 and can see the wsdl at > http://localhost:8080/helloworld/services/hello_world?wsdl > > But what I don't understand is how I can run webservices > against that server. Does anyone have client code that will > allow me to test? I tried modifying Client.java like this: > > private static final QName SERVICE_NAME > = new QName("http://server.hw.demo/", "HelloWorld"); > private static final QName PORT_NAME > = new QName("http://server.hw.demo/", "HelloWorldPort"); > > public static void main(String args[]) throws Exception { > Service service = Service.create(SERVICE_NAME); > String endpointAddress = > "http://localhost:8080/helloworld/services/hello_world?wsdl"; > service.addPort(PORT_NAME, SOAPBinding.SOAP11HTTP_BINDING, > endpointAddress); > HelloWorld hw = service.getPort(HelloWorld.class); > System.out.println(hw.sayHi("World")); > } > > but all I got was > > org.apache.cxf.binding.soap.SoapFault: > "http://schemas.xmlsoap.org/wsdl/", > the namespace on the "definitions" element, is not a valid SOAP version. > > I tried a bunch of variations too with no success. > How does one make this work? (I'd also appreciate > an example for wsdl_first_soap12 or any of the others) > > Thanks, > Dan