parsing xml to list of object issue


1. Created a class(test) and added a classmethod(checkdata).

2. Assigned a object with xml.

3. Created a new class for response and initialized in classmethod(checkdata). 

4. Created a new class for request parsing with list of object parameter.

5. While parsing xml in request for list of object,  the  result count is "0". But the xml has value for "2" object list.

6. XML has follow:

        <to name=""mohan"" address1=""India""  />
        <to  name=""sujay"" address1=""USA"  />
  • 0
  • 0
  • 480
  • 2
  • 1


Without your code we cannot guess what can cause the error. If you send us example of your code, we can check what is not working as expected.

Anyway, this is en example which works. According to your request/response I think you are talking about web service, therefore I created simple Caché WebService classes:

Class Extends  
(%RegisteredObject, %XML.Adaptor)
Property  to As  list Of XMLPROJECTION =  "ELEMENTREF");

Class Extends  (%RegisteredObject , %XML.Adaptor )
Property name As %String(XMLPROJECTION = "ATTRIBUTE");
Property address1 As %String(XMLPROJECTION = "ATTRIBUTE");

Class tv.PartyService Extends %SOAP.WebService [ ProcedureBlock ]
Parameter SERVICENAME = "PartyService";
Parameter NAMESPACE = "";
Method CheckData(party As As %Integer [ WebMethod ]


Then I created SOAP web client using SoapUI and sent following request with 3 'to' items:

<soapenv:Envelope xmlns:soapenv="" xmlns:s="">
            <s:to name="mohan" address1="India"/>
            <s:to name="sujay" address1="USA"/>
            <s:to name="tomas" address1="Europe"/>


And I received the correct response:

<SOAP-ENV:Envelope xmlns:SOAP-ENV="" xmlns:xsi="" xmlns:s="">
      <CheckDataResponse xmlns="">


Are you using correlate? or how are you parsing it to the object? would you put some more details of your approach, as there are many ways to do so.