Is it even possible? The documentation does not make it clear. I've tried all sorts of different mechanisms to get authentication working, but I continually get a "401: Unauthorized" error. Here is where I am at:
stub = new EngineStub();
HttpClient client = new HttpClient();
client.getParams().setAuthenticationPreemptive(true);
stub._getServiceClient().getServiceContext().getConfigurationContext().setProperty(HTTPConstants.CACHED_HTTP_CLIENT, client);
HttpTransportProperties.Authenticator auth = new HttpTransportProperties.Authenticator();
List<String> authpref = new ArrayList<String>();
authpref.add(AuthPolicy.BASIC);
auth.setAuthSchemes(authpref);
auth.setUsername(username);
auth.setPassword(password);
auth.setPreemptiveAuthentication(true);
stub._getServiceClient().getOptions().setProperty(HTTPConstants.AUTHENTICATE, auth);