如何更改JAX-WS Web服务的地址位置 [英] How to change address location of JAX-WS webservice

查看:405
本文介绍了如何更改JAX-WS Web服务的地址位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们目前已公开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

http://pic.dhe.ibm.com/infocenter/wasinfo/v6r1/index.jsp ?topic =%2Fcom.ibm.websphere.wsfep.multiplatform.doc%2Finfo%2Fae%2Fae%2Ftwbs_customwebxml.html

这篇关于如何更改JAX-WS Web服务的地址位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆