posted 12 years ago
Ideally your idea is correct. You have to perform more of trial and error approach to figure out what is being passed as part of request header.
If you have generated your stubs using Axis, try to do the following instead of the approach that you are following -
Sample1InterfaceService service = new Sample1InterfaceServiceLocator();
Sample1Interface stub = service.getSample1();
(Sample1SoapBindingStub)stub)._setProperty(javax.xml.rpc.Stub.USERNAME_PROPERTY, domain + "\\" + username);
((Sample1SoapBindingStub)stub)._setProperty(javax.xml.rpc.Stub.PASSWORD_PROPERTY, password);
stub.getGreeting(someinput);
Although I do not find any fault in your code, just experiment a different approach and check for result.