In my SL5 Application I am parsing ArcGIS Server using wsdl mechanism. I use GetServiceDescriptions passing root of ArcGIS Server as endpoint address. I m getting in results all services which are public. I want to know how to pass token to request GetServiceDescriptions to get services which are available to logged in user. I tried something like this:
var u = new UriBuilder(rootUri);
var cred = ESRI.ArcGIS.Client.IdentityManager.Current.FindCredential(rootUri);
System.ServiceModel.Channels.AddressHeader token ;
if (cred != null)
token = System.ServiceModel.Channels.AddressHeader.CreateAddressHeader("token",string.Empty, cred.Token);
else
token = null;
if (token != null)
{
folderCli.Endpoint.Address = new System.ServiceModel.EndpointAddress(u.Uri, token);
}
else
folderCli.Endpoint.Address = new System.ServiceModel.EndpointAddress(rootUri);
But it doesnt work. I tried to google something but all result speaks about rest and jsons. I dont want to change wsdl to something else - it's to big change (almost whole modelview to exchange) Thx in advance for any advice.