i have asp ( classic ) application
what i need to do is..
i have to develop web service ( asmx ) to perform some functionality using Asp.net (4.0 or 3.5 )
can i call this web service in Asp( classic ) application ?
if yes then how ?
Appreciate your valuable response..
what i need to do is..
i have to develop web service ( asmx ) to perform some functionality using Asp.net (4.0 or 3.5 )
can i call this web service in Asp( classic ) application ?
if yes then how ?
Appreciate your valuable response..
Former memberPosted Mar 24, 2014, 1:22 AM EDT
The following solution was the answer to your problem.
'set up xmlhttp to checkout server Dim oRequest Set oRequest = Server.CreateObject("MSXML2.ServerXMLHTTP") 'setting this option will allow ServerXMLHTTP to ignore the certificate errors it encounters. oRequest.setOption(2) = SXH_SERVER_CERT_IGNORE_ALL_SERVER_ERRORS ' resolve, connect, send, receive - in milliseconds oRequest.setTimeouts 10000, 10000, 10000, 10000 'set the URL msURL = "[Service Url]" msSOAP = "<?xml version=""1.0"" encoding=""utf-8"" ?>" msSOAP = msSOAP & "<s:Envelope xmlns:s=""http://schemas.xmlsoap.org/soap/envelope/"">" msSOAP = msSOAP & "<s:Body>" msSOAP = msSOAP & "<[MethodName] xmlns=""[Some Namespace]"">" msSOAP = msSOAP & "<methodParam1>[Some value]</methodParam1>" msSOAP = msSOAP & "<methodParam2>[Some value]</methodParam2>" msSOAP = msSOAP & "<methodParam3>[Some value]</methodParam3>" msSOAP = msSOAP & "</MethodName>" msSOAP = msSOAP & "</s:Body>" msSOAP = msSOAP & "</s:Envelope>" oRequest.Open "POST", msURL, False oRequest.setRequestHeader "Content-Type", "text/xml" oRequest.setRequestHeader "SOAPAction", "[Some Url]" oRequest.send msSOAP
took the "?wsdl" off of the url and changed the envelope a bit and it works now. I also removed the setting of the SoapMethodName header.
kindly accept as answer if this helpful to you