开发者

Apache CXF 2.0.12 to 2.2.7 upgrade issue

开发者 https://www.devze.com 2022-12-24 06:06 出处:网络
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.

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 upgr开发者_运维问答ade).

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?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号