Ver Mensaje Individual
  #1 (permalink)  
Antiguo 27/01/2011, 11:54
alexvb
 
Fecha de Ingreso: mayo-2009
Ubicación: Arequipa
Mensajes: 51
Antigüedad: 15 años
Puntos: 1
consumir soap envelope

hola
estoy tratando de consumir una respuesta de webservice, el cual es el siguiente:
Código PHP:
Dim SOAPResponse, oXmlDOC, ErrorDesc, objXMLDoc, ErrorPayment                
    SOAPResponse = "<?xml version=""1.0"" encoding=""utf-8""?>"
    SOAPResponse = SOAPResponse & "<soap:Envelope>"
    SOAPResponse = SOAPResponse & "    <soap:Body>"
    SOAPResponse = SOAPResponse & "        <ValidatePhoneAccountResult>"
    SOAPResponse = SOAPResponse & "            <MessageID>1</MessageID>"
    SOAPResponse = SOAPResponse & "            <ValidatePhoneAccountStatus>"
    SOAPResponse = SOAPResponse & "                <StatusID>1</StatusID>"
    SOAPResponse = SOAPResponse & "                <StatusDescription>Success</StatusDescription>"
    SOAPResponse = SOAPResponse & "            </ValidatePhoneAccountStatus>"
    SOAPResponse = SOAPResponse & "        </ValidatePhoneAccountResult>"
    SOAPResponse = SOAPResponse & "    </soap:Body>"
    SOAPResponse = SOAPResponse & "</soap:Envelope>" 
    response.Write(SOAPResponse)
    Set objXMLDoc = CreateObject("Microsoft.XMLDOM") 
    'objXMLDoc.async = False
    objXMLDoc.loadXML(SOAPResponse)
    Set NodeList = objXMLDoc.documentElement.childNodes(0).childNodes(0).selectNodes("ValidatePhoneAccountResult")   'linea 20

    ErrorDesc = ""
    For Each Node In NodeList 
        'If Node.childNodes(0).text = "error" Then
        response.Write("<br>")
        ErrorDesc = "<strong>Error: </strong>" & Node.childNodes(1).text
        ErrorPayment = true
        'End If
    Next
    Set objXMLDoc = Nothing
y al poder ejecutarlo me sale un error,

Microsoft VBScript runtime error '800a01a8'

Object required: '[object]'

/testxml.asp, line 20

no se exactamente como acceder a los nodos del xml de respuesta, bueno a menos q el mismo xml este mal lo cual he revisado y todo parece estar en orden

muchas gracias
__________________
WinDOwS fOReVer!!!

Última edición por alexvb; 27/01/2011 a las 12:00