Connect to the Core Service as a different user if you do not want to log on as the currently logged on user.
Procedure
- Add the following import statement to your proxy client class:
- Connect to the server and initialize the Core Service by writing the following code:
CoreService service = new CoreService();
ICoreService endpoint = service.getBasicHttp();
BindingProvider provider = (BindingProvider)client;
provider.getRequestContext().put(BindingProvider.USERNAME_PROPERTY, "domain\\user");
provider.getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, "password");
where domain is the domain that contains the user you want to connect to the Core Service, user is the name of that user, and password is that user's password.