The web service I need to connect to has the above requirement. I can use this web service in VS 2008, but I can not use it because I do not know how to authenticate. I need to specify credentails, but there is no header method. I tried something like the following:
UltraDNSWebReference.UltraWebServiceService clientProxy =
new UltraDNSWebReference.UltraWebServiceService();
clientProxy.Credentials = new System.Net.NetworkCredential(
"MyUserName", "MYPassword");
but i am still getting authentication error. I CAN connect successfully using the SOAPUI testing platform, so I know that these are incorrect credentials or a blocked IP.
This WebService API indicates:
The Neustar Ultra Services API authenticates the user and requests the WSSE UserName token in the SOAP header.
- Visual Studio???
. WSDL , , . , :
//Create client object
ServiceReference1.UltraDNSClient client = new ServiceReference1.UltraDNSClient();
client.ClientCredentials.UserName.UserName = "myUserName";
client.ClientCredentials.UserName.Password = "myPassword";
, -, API. - , . API - "header()". , -, ( , Add Web Reference, ):
StockLogoWebService.Header headerObject = new StockLogoWebService.Header();
headerObject.Username = "janedoe@yahoo.com";
xLogogsTest.HeaderValue = headerObject;
xLogosTest.anyMethod()
header() . WSDL , SOAP, Visual Studio?
WSDL :
http://ultra-api.ultradns.com:8008/UltraDNS_WS?wsdl