Java Reference
In-Depth Information
int result = port.add(i, j);
At the point in the code where you get the proxy from the service instance, the address is set
to call whatever is specified within the SEI. The request context is not a wrapper, but a simple
map that is used to specify key/value pairs. In this example, the client is a servlet whose @We-
bServiceRef.wsdLocation property indicates a WSDL on port 8080; use the BindingPro-
vider.ENDPOINT_ADDRESS_PROPERTY to specify a WSDL on a different port. At runtime, the
SEI will use the WSDL at 4933.
There are many uses for such code. Because the WSDL location value is specified by a string,
you can dynamically override the location that is set in the @WebServiceRef annotation. This
might be useful, for example, if you want to point certain clients to a different version of the
WSDL that specifies different policies.
This only works, of course, if the service and ports represented at the target endpoint location
match those on the WSDL from which the client was originally created. Otherwise, you'll get
an error.
Search WWH ::




Custom Search