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.
- Copy WSDL to local directory
- Run
wsdl2java
to generate domain objects and other annotated classes. There is one with@WebServiceClient
and a couple with@WebService
- 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.
精彩评论