如何更改JAX-WS Web服务的地址位置 [英] How to change address location of JAX-WS webservice
问题描述
我们目前已公开JAX-RPC网络服务及以下网址
We have currently exposed JAX-RPC webservice with following URL
http://xx.xx.xx.xx/myservice/MYGatewaySoapHttpPort?wsdl
我们将webservice迁移到JAX- WS通过从WSDL上面生成WebService
We migrated webservice to JAX-WS by generating WebService from above WSDL
但可以从以下URL访问新的Web服务
But new webservice is accessible from following URL
http://xx.xx.xx.xx/myservice/MYGateway?wsdl
如何使我的JAX-WS Web服务可以通过首先提到的相同URL访问?所以我们的客户没有任何问题。
How i can make my JAX-WS webservice to be accessible by same URL mentioned first? so that our customer dont have any problem.
更新:
我创建的WSDL服务元素是按照预期
Service Element of WSDL from which i created is as per expectation
<WL5G3N0:service name="MyGateway">
<WL5G3N0:port binding="WL5G3N2:MyGatewaySoapHttp" name="MyGatewaySoapHttpPort">
<WL5G3N3:address location="http://xx.xx.xx/myservice/MyGatewaySoapHttpPort"/>
</WL5G3N0:port>
</WL5G3N0:service>
但是JAX-WS的WSDL不相同,而且这个WSDL是自动生成的。
But WSDL of JAX-WS is not same and this WSDL is auto generated.
<WL5G3N0:service name="MyGateway">
- <WL5G3N0:port binding="WL5G3N2:MyGatewaySoapHttp" name="MyGatewaySoapHttpPort">
<WL5G3N3:address location="http://xx.xx.xx/myservice/MyGateway" />
</WL5G3N0:port>
</WL5G3N0:service
我使用Oracle Eclipse Indigo创建了webservice。
I created webservice with Oracle Eclipse Indigo.
我能用任何注释改变吗?
Can i change with any annotaion?
问候,
推荐答案
我们错过了非常基本的观点,web.xml中的servlet映射确实很有效。有关详细信息,请在下面找到链接
We missed very basic point, servlet mapping in web.xml did all trick. for details please find below link
这篇关于如何更改JAX-WS Web服务的地址位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!