I use the SpringBusFactory to create bus with a spring config about
"http:conduit"
The code works fine!
The code is :
public void invokeWithConfigClient(){
QName SERVICE_NAME = new QName("http://server.hw.demo/",
"HelloWorld");
URL wsdlURL = HelloWorld.WSDL_LOCATION;
*SpringBusFactory bf = new SpringBusFactory();
Bus bus = bf.createBus(".\\client.xml");
BusFactory.setDefaultBus(bus);*
HelloWorld ss = new HelloWorld(wsdlURL, SERVICE_NAME);
HelloWorldPortType port = ss.getHelloWorldPort();
{
System.out.println("Invoking sleep...");
long _sleep_arg0 = 60;//60*1000+200;
java.lang.String _sleep__return = port.sleep(_sleep_arg0);
System.out.println("sleep.result=" + _sleep__return);
}
}
and the client.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:sec="http://cxf.apache.org/configuration/security"
xmlns:http="http://cxf.apache.org/transports/http/configuration"
xsi:schemaLocation="
http://cxf.apache.org/configuration/security
http://cxf.apache.org/schemas/configuration/security.xsd
http://cxf.apache.org/transports/http/configuration
http://cxf.apache.org/schemas/configuration/http-conf.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd">
<http:conduit name="*.http-conduit">
<http:client ReceiveTimeout="3000"/>
</http:conduit>
</beans>
--
View this message in context:
http://cxf.547215.n5.nabble.com/ClientProxy-throws-NullPointerException-when-invoking-its-invoke-tp5723532p5723573.html
Sent from the cxf-user mailing list archive at Nabble.com.