http://localhost:50001/shyjl/interface/factory
为啥上面的地址只能 使用localhost来访问
换成本机ip不行
不行是指 404错 还是500错?有具体的错误信息吗?
把你的error截图发上来
http://localhost:50001/shyjl/interface/factory?wsdl可以
http://localhost192.168.1.123:50001/shyjl/interface/factory?wsdl不行
如果把http://localhost:50001/shyjl/interface/factory换成http://192.168.1.123:50001/shyjl/interface/factory进行发布webservice
则可以通过http://192.168.1.123:50001/shyjl/interface/factory?wsdl访问
而http://localhost:50001/shyjl/interface/factory?wsdl无法访问
不报错误
@Override
public void init() throws ServletException {
Endpoint.publish("http://192.168.1.123:50001/shyjl/interface/factory", new InterfaceFactory());
System.out.println("webservice 启动了!!:"+WSConfig.URL.getValue()+"?wsdl");
super.init();
}