J'ai une référence Web créée à partir du WSDL, mais je ne suis pas autorisé à appeler la fonction sauf si je transmets le nom d'utilisateur/mot de passe; le code d'origine pour la boîte à outils XML était:Authentification HTTP avec références Web
Set client = CreateObject("MSSOAP.SOAPClient30")
URL = "http://" & host & "/_common/webservices/Trend?wsdl"
client.mssoapinit (URL)
client.ConnectorProperty("WinHTTPAuthScheme") = 1
client.ConnectorProperty("AuthUser") = user
client.ConnectorProperty("AuthPassword") = passwd
On Error GoTo err
Dim result1() As String
result1 = client.getTrendData(expression, startDate, endDate,
limitFromStart, maxRecords
Comment puis-je ajouter le AuthUser/AuthPassword à mon nouveau code?
Nouveau code:
ALCServer.TrendClient tc = new WindowsFormsApplication1.ALCServer.TrendClient();
foreach(string s in tc.getTrendData(textBox2.Text, "5/25/2009", "5/28/2009", false, 500))
textBox1.Text+= s;