开发者

Invoke webservice using jaxws when the wsdl has more than one service

开发者 https://www.devze.com 2022-12-20 04:37 出处:网络
I\'m trying to get hold of the FindService on this wsdl using jaxws. I generated the classes just fine using wsimport.

I'm trying to get hold of the FindService on this wsdl using jaxws. I generated the classes just fine using wsimport.

But when i do:

FindService findService = new FindService();

i get the exception:

Exception in thread "main" javax.xml.ws.WebServiceException: {http://s.mappoint.net/mappoint-30/}FindService is not a valid service. Valid services are: {http://s.mappoint.net/mappoint-30/}CommonService

So, it seems tha开发者_StackOverflow中文版t jaxws is only finding CommonService in the wsdl which is the first one declared in it. Any idea how i can use the FindService ?

Thanks.


This appears to be a JAX-WS bug.

You can make a local copy of the WSDL, modify it so that FindService is the first service definition declared, and run wsimport against it. That worked for me.

0

精彩评论

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