I am connecting using webservices from a Java client on Windows to a Sharepoint 2007 server in the same domain. The communication is using https.
So far, I checked that by running the client from my account my credentials were used and did not worry more, but now I want to set independent credentials so changes in the items are not logged as "mine", so I put the data in the requestContext:
Lists listas =
new Lists(
new URL(
urlBase
+ UtilsSp.LISTS_WSDL_PATH),
new QName(
"http://schemas.microsoft.com/sharepoint/soap/",
"Lists"));
ListsSoap listasSoap = listas.getListsSoap();
BindingProvider bp = (BindingProvider) listasSoap;
bp.
getRequestContext().
put(
BindingProvider.USERNAME_PROPERTY,
"MyUser";
bp.
getRequestContext().
put(
BindingProvider.PASSWORD_PROPERTY,
"MyPassword");
bp.
getRequestContext().
put(
BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
"https://mySharepoint.mydomain.com/mySite");
But, anyway, I have no errors connecting to the site but the site keeps reporting that I am connecting using my domain username, not the one I pass it through the requestContext. What I am missing?