Revision: 8486
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at September 25, 2008 08:08 by sulfurito
Initial Code
Function llamadaServicioWEB(xmlSOAP)
Dim oSOAPprov
Dim strURL, SoapServer, SoapPath
strURL = "https://www.proveedor.com/carpetaServ/axis/ElServicio?wsdl"
SoapServer = "www.proveedor.com"
SoapPath = "/carpetaServ/axis/ElServicio?wsdl"
Set oSOAPprov = Server.CreateObject("MSXML2.ServerXMLHTTP")
oSOAPprov.Open "POST", strURL, False
oSOAPprov.setRequestHeader "Man", "POST " & SoapPath & " HTTP/1.1"
oSOAPprov.setRequestHeader "Host", SoapServer
oSOAPprov.setRequestHeader "Content-Type", "text/xml; charset=utf-8"
oSOAPprov.setRequestHeader "SOAPAction", "https://www.proveedor.com/carpetaServ/axis/ElServicio"
oSOAPprov.Send(xmlSOAP)
Set xmlSOAP = nothing
Dim xmlRespuesta, strRespuesta
If oSOAPprov.status = 200 Then '200 = STATUS OK
Set xmlRespuesta = Server.CreateObject("Microsoft.XMLDOM")
xmlRespuesta.loadXML(oSOAPprov.ResponseText)
' ==== ANALIZAR RESPUESTA SEGUN CADA CASO ====
Set xmlRespuesta = nothing
Else
'Si status <> 200 no puede analizar la respuesta
strRespuesta = "Error " & oSOAPprov.status & ": " & errServerXMLHTTP(oSOAPprov.status)
End If
Set oSOAPprov = nothing
llamadaServicioWEB = strRespuesta
End Function
Initial URL
Initial Description
Llamada a un servicio web desde ASP clásico. <u>xmlSOAP</u> es el SOAP Envelope construido
Initial Title
Llamar a servicio web WSDL
Initial Tags
web, service
Initial Language
ASP