ASP passing credential to WCF services [modified]
-
Hi, I have an asp page that I want to connect with WCF Service Can someone guide me how can I connect and call the service? <% Dim soapServer soapServer = "https://XXXXXX.YYYYYY.com/ZZZZZZZZ/20100201/ABC.svc" Set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP") xmlhttp.open "POST", soapServer, False,"USERNAME","PASSWORD" xmlhttp.setRequestHeader "SOAPAction", POST & " " & soapServer & " HTTP/1.1" xmlhttp.setRequestHeader "Content-Type", "text/xml; charset=utf-8" Response.Write "About to call WCF Web Service from Classic ASP..." xmlhttp.send() Response.Write "<br>Finished calling Web Service." Response.Write "<br>Status = " & "<font color='red'>" & xmlhttp.statusText & "</font>" Response.Write "<br>ResponseText = " & xmlhttp.responseText %> I got Status = Bad Request Result when I ran the asp page . I don't have idea whether my creadetial get pass or fail or do I properly connect with WCF service or not ? Can any one help me in this matter?
modified on Monday, April 26, 2010 3:20 PM
-
Hi, I have an asp page that I want to connect with WCF Service Can someone guide me how can I connect and call the service? <% Dim soapServer soapServer = "https://XXXXXX.YYYYYY.com/ZZZZZZZZ/20100201/ABC.svc" Set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP") xmlhttp.open "POST", soapServer, False,"USERNAME","PASSWORD" xmlhttp.setRequestHeader "SOAPAction", POST & " " & soapServer & " HTTP/1.1" xmlhttp.setRequestHeader "Content-Type", "text/xml; charset=utf-8" Response.Write "About to call WCF Web Service from Classic ASP..." xmlhttp.send() Response.Write "<br>Finished calling Web Service." Response.Write "<br>Status = " & "<font color='red'>" & xmlhttp.statusText & "</font>" Response.Write "<br>ResponseText = " & xmlhttp.responseText %> I got Status = Bad Request Result when I ran the asp page . I don't have idea whether my creadetial get pass or fail or do I properly connect with WCF service or not ? Can any one help me in this matter?
modified on Monday, April 26, 2010 3:20 PM
-
I have found 2 more sample code for basicHTTP binding http://www.sourcecodesworld.com/source/show.asp?ScriptID=249[^] but. still my answer is peding... how can I get the proper response status whether i am connected or not ???