I am at my wits end and was hoping for some help if possible.
I have been asked to retrieve some data from a SOAP/XML webservice. No problem I thought, done that loads of times.
I was even given a working PHP example that returns the data I need - even easier I thought!
BUT, in my c# code I cannot get past authorisation!
This is the example PHP script that works perfectly...
$soap_url = "http://108-168-196-91.mycitrixdemo.net/zdm/services/EveryWanDevice?wsdl";
$client = new SoapClient(null, array(
'location' => $soap_url,
'uri' => "http://zdemo2.zenprise.com",
'login' => "Administrator",
printf ("name: %s, value: %s\n" , $properties[$i]->name, $properties[$i]->value);
catch (Exception $e)
I tried passing the username and password as I have done before like this:
ClassLibrary1.trev.DeviceServiceService test = new trev.DeviceServiceService();
test.Credentials = new System.Net.NetworkCredential("Administrator", "xxxx", "citrix");
And I get "Failed to Authenticate
Reading the documents it says...
2nd generation SOAP services provide WS-Security (<https: www.oasis-open.org="" committees="" wss="">)
support using WSS4J (<http: ws.apache.org="" wss4j="">). By default, the services require WSS
Username+Password authentication of a valid user with the required rights. Support for other WSS
features might be added in future releases.
NOTE: these services DO NOT use HTTP authentication, as the previous Device Manager web services
So, I then tried:
EveryWan.DeviceServiceService service = new EveryWan.DeviceServiceService();
UsernameToken userToken = new UsernameToken("Administrator", "xxxx", PasswordOption.SendPlainText);
And still I get "Failed to Authenticate"
I just don't understand what I need to do to talk to this API?
The PHP works fine! but I cannot replicate it in c#.
Can anyone see what I am doing wrong please?
Any help would be much appreciated!
General News Suggestion Question Bug Answer Joke Praise Rant Admin
Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.