Active Server Pages

Moderators: None (Apply to moderate this forum)
Number of threads: 1763
Number of posts: 4498

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Calling a Web-service from ASP? Posted by alkos on 30 Sept 2009 at 6:34 AM
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!





 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.