我有一个在WAS中设置的Web服务,我可以使用我在web.xml中定义的URL访问它。例如:
<servlet-mapping>
<servlet-name>com.ejb.impl.UserProfileAdminImpl</servlet-name>
<url-pattern>services/UserProfileAdminSoapPort</url-pattern>
</servlet-mapping>
因此,我想在浏览器中浏览的网址将是
http:192.168.1.2:8080/services/UserProfileAdminSoapPort?wsdl
所以如果将web.xml更改为
<servlet-mapping>
<servlet-name>com.ejb.impl.UserProfileAdminImpl</servlet-name>
<url-pattern>services/UserProfileAdminSoapPortV2</url-pattern>
</servlet-mapping>
然后我的网址将成为
http:192.168.1.2:8080/services/OtpUserProfileAdminSoapPortV2?wsdl
现在我将此Web服务移至Jboss,我成功启动它,但我无法通过我正在思考的URL访问它。我只能通过另一个URL访问它,我从日志文件中看到它。
http://192.168.238.161:8080/com.ejb.impl/Service/UserProfileAdminImpl?wsdl
日志如下:
2018-06-13 16:49:32,936 DEBUG [org.jboss.ws.cxf.endpointAddressRewrite] (MSC service thread 1-2) JBWS024034: WSDL service endpoint address rewrite required because of server configuration: http://localhost:9080/services/UserProfileAdminSoapPort
2018-06-13 16:49:32,937 DEBUG [org.jboss.ws.cxf.endpointAddressRewrite] (MSC service thread 1-2) JBWS024037: Rewritten new candidate WSDL service endpoint address 'http://localhost:9080/services/UserProfileAdminSoapPort' to 'http://192.168.238.161:8080/com.ejb.impl/Service/UserProfileAdminImpl'
我可以知道为什么会重写我的网址吗?我也可以在哪里配置我的网址。
请告知。