could you pls post the init code of the client? I'm having the same issue,
I'm using CXF 2.1.2 (which should contain the fix) but I'm not sure how to
write the client code so it can properly use the cxf.xml.

My cxf xml is:

<?xml version="1.0" encoding="UTF-8"?> 
<beans xmlns="http://www.springframework.org/schema/beans"; 
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
        xmlns:jaxws="http://cxf.apache.org/jaxws"; 
        xmlns:soap="http://cxf.apache.org/bindings/soap"; 
        xsi:schemaLocation=" 
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://cxf.apache.org/bindings/soap
http://cxf.apache.org/schemas/configuration/soap.xsd
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd";> 

        <jaxws:client id="client1" 
                serviceClass="cxf.client.Hello" 
                address="http://mann2:8080/param-tester-ws/HelloService";
                username="tester1" password="test"/> 

</beans> 

Note that I use the PORT class (Hello) as the serviceClass above. I'm not
sure if this is correct, but if I try to use the HelloService generated
class, I get an exception "HelloService is not an interface".

My client code is:

        SpringBusFactory bf = new SpringBusFactory();
        URL busFile = null;
        if ("secure".equals(args[1])) {
            busFile =
Hello_HelloImplPort_Client.class.getResource("/JaxwsSecureClient.xml");
        } else if ("insecure".equals(args[1])) {
            busFile =
Hello_HelloImplPort_Client.class.getResource("/InsecureClient.xml");
        } else {
            System.out.println("arg1 needs to be either secure or
insecure");
            System.exit(1);
        }
        Bus bus = bf.createBus(busFile.toString());
        bf.setDefaultBus(bus);

        cxf.client.HelloService ss = new HelloService(wsdlURL,
SERVICE_NAME);
        cxf.client.Hello port = ss.getHelloPort();
        // invokations start here...

thanks...
-- 
View this message in context: 
http://www.nabble.com/Basic-authentication-with-Spring-configured-client-tp17500802p19888502.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to