Jump to content

Calling a web-service from asp?

- - - - -

  • Please log in to reply
1 reply to this topic

#1
alkos

alkos

    Newbie

  • Members
  • Pip
  • 1 posts
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

<body>

<%

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

%>

<FORM method=POST name="form1" ID="Form1"> 

Enter the Values to perform Operation<BR>

          AId: <INPUT type="text" name="AId" ID="Text1" value="-1">

<BR>  AUserId: <INPUT type="text" name="AUserId" ID="Text2" value="1258">

<BR>ASecureId: <INPUT type="text" name="ASecureId" ID="Text3" value="SecureId-String">

<BR><BR>

<INPUT type="submit" value="GO!" name="submit1">

</form>

</body>


I get an iis error 401.2 (authentification error)
The only solution that i found in internet is


xmlhttp.Open "POST",postUrl,false, strLogin, strPasswort

but it doesn't work :-(

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

#2
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,822 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others
Do you have the correct login/password?
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users