Link to home
Start Free TrialLog in
Avatar of LJG
LJG

asked on

Problem with reading an XMLDOMNodeList

I have a web service that I am sending a request to, and I don't get back a particular error node.  I set a variable (MSXML2.IXMLDOMNodeList)  to the service and move through the list and get all nodes with the exception of the error node.  The owner of the service assures me the service is sending the error node back (they watched as I sent a request).  Is there something that I am missing in reading the XML?
Is there something I can do to get the node?

I am not getting the node at the bottom of the code below.
.... Please provide a valid Pickup Date. ....

(see the last 4 lines of  -- XML doc I should be getting -- below)

Thanks in advance for any help.
LJG
---------------- Here is my basic code ----------------
 
	Dim ElemList  As MSXML2.IXMLDOMNodeList
	Set ElemList = SoapClient.submitPickup(strCredentials, strXML)
	
	Dim SoapClient As MSSOAPLib30.SoapClient30
	Set SoapClient = New MSSOAPLib30.SoapClient30        
    SoapClient.MSSoapInit "http://xxxx/MY.wsdl"
	
	Set ElemList = SoapClient.submitPickup(strCredentials, strXML)	
    For intI = 0 To ElemList.Length - 1
        Debug.Print ElemList.Item(intI).xml        
    Next intI
 
---------------- This is The XML I get ----------------
(note I took out the xsi info below)
<ns2:abcPickupResponse id="ID1" xsi:type="ns2:abcPickupResponse">
    <statusCode>E</statusCode>
    .... an number of nodes  ....
    <confirmationItemDetails/>
</ns2:abcPickupResponse>
 
---------------- This is the XML they assure me they are sending ----------------
<env:Body>
      <ns0:submitPickupResponse>
         <submitPickupResponse href="#ID1"/>
      </ns0:submitPickupResponse>
      <ns2:YRCPickupResponse id="ID1" xsi:type="ns2:YRCPickupResponse">
         <statusCode xsi:type="xsd:string">E</statusCode>         
         .... an number of nodes  ....   
         <confirmationItemDetails xsi:type="ns2:ConfirmationItemDetails" enc:arrayType="ns2:ConfirmationItemDetail[0]" xsi:nil="1"/>
      </ns2:YRCPickupResponse>
      <ns2:StatusMessages id="ID2" xsi:type="enc:Array" enc:arrayType="xsd:string[1]">
         <item xsi:type="xsd:string">Please provide a valid Pickup Date.  Date format: MM/dd/yyyy.</item>
      </ns2:StatusMessages>
</env:Body>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of LJG
LJG

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial