开发者

How to change endpoints on web service

I am working on calling web service client. Currently, I am connecting to the test environment. In order to connect to production environment I have to connect to production environment. My process in terms of connecting to the test environment is as follows.

  1. Copy WSDL to local directory
  2. Run wsdl2java to generate domain objects and other annotated classes. There is one with @WebServiceClient and a couple with @WebService
  3. From there I am just using the generated objects to call these classes.

What I don't get is where I would change the endpoints for the service call once we go to produc开发者_C百科tion environment.


I believe wsdl2Java generate a Proxy class with setEndpointAddress() where you could change the target URL. This method should be located in the generated ServiceLocator.


Also, if you check the Service constructor, on the generated code I have, one of the constructors take in a URL as it's arguments.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜