This option is used when the client has all the information necessary to communicate with the remote service at compile time and does not have to rely on the accounts to provide any information. It does not provide support for User name and LTPA Token for SOAP messages. It should be used when no security is required.
No specific steps are needed before obtaining a stub instance using this mechanism. If the stub is packaged in a different plug-in than the client, the plug-in is required to export the package so the client can access it.
EchoServiceService service = new EchoServiceServiceLocator();
URL endpoint = new URL("http://localhost/EchoService/services/EchoService");
//get a stub which implements the SDI
EchoService stub = service.getEchoService(endpoint);
// invoke the remote method
stub.echoString("echo: Hello from EchoService");
This approach is recommended when full control of the configurations is required. This also removes the dependency of the JNDI, Apache Axis Proxy and the accounts.
Parent topic: Creating Axis Web Services Clients: XPD622