views:

59

answers:

1

I have upgraded a CXF web service implementation from Apache CXF 2.0.12 to 2.2.7 and now I can't connect from a remote computer.

http://localhost:9000/Data?wsdl

works on the installed computer.

http://computername:9000/Data?wsdl

from a remote computer does not work anymore (worked before upgrade).

The service is configured in code (no configuration files) with the following code:

DataServiceImpl dataImplementor = new DataServiceImpl();
JaxWsServerFactoryBean svrFactory = new JaxWsServerFactoryBean();
svrFactory.setServiceClass(DataServiceImpl.class);
svrFactory.setAddress("http://localhost:9000/Data");
svrFactory.setServiceBean(dataImplementor);
if(intercept) {
  svrFactory.getInInterceptors().add(new LoggingInInterceptor());
  svrFactory.getOutInterceptors().add(new LoggingOutInterceptor());
}
svrFactory.create();

Is there anything in the configuration which defines "Allowed clients" or something like that?

+1  A: 

The problem was that I was binding Jetty to localhost instead of 0.0.0.0 which resulted in not being able to access the web service from a remote computer (since only the loopback adapter was bound).

This is probably a change in the Jetty version used by CXF.

FkYkko