We help IT Professionals succeed at work.
Get Started

Problem with reading an XMLDOMNodeList

LJG
LJG asked
on
549 Views
Last Modified: 2013-11-19
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

Comment
Watch Question
Commented:
This problem has been solved!
Unlock 1 Answer and 1 Comment.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE