Hi Dan,

You set the wrong endpointAddress.

"http://localhost:8080/helloworld/services/hello_world?wsdl"; is the service wsdl url. you need to set the endpointAddress to be "http://localhost:8080/helloworld/services/hello_world";

Willem

Daniel Lipofsky wrote:
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


Reply via email to