Calling a Web-service from ASP? - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Calling a Web-service from ASP?

Hi!

A have a big BIG Problem that i cannot solve for some hours already.
I must call a web-service from an asp-script. Having the following code
[code]

<%
If Request.ServerVariables("REQUEST_METHOD") = "POST" Then
Dim xmlhttp
Dim DataToSend



DataToSend="Val1="&Request.Form("AId")&"&Val2="&Request.Form("AUserId")&"&Val3="&Request.Form("ASecureId")
'DataToSend="AId="&"-1"&"&AUserId="&"1258"&"&ASecureId="&"bla-bla"
Dim postUrl
postUrl = "https://de-chs-dev.ww005.siemens.net/New/restricted/ProcessWebServ/ProcessWebService.asmx/IPMCreateNewCall"

Set xmlhttp = server.Createobject("MSXML2.ServerXMLHTTP.3.0")
xmlhttp.Open "POST",postUrl,false, "", ""
xmlhttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
xmlhttp.send DataToSend
Response.Write(xmlhttp.responseText)

End If
%>

Enter the Values to perform Operation


AId:

AUserId:

ASecureId:






[/code]
I get an IIS error 401.2 (authentification error)
The only solution that i found in internet is
[code]
xmlhttp.Open "POST",postUrl,false, strLogin, strPasswort
[/code]
but it doesn't work :-(

Can anyone, please, help me to solve this problem? I'm nearly in panic..
Thank you!


Sign In or Register to comment.