Hi all,

I am using piriti framework in my GWT app for xml mapping. I have an
xml structure like this;

<packageDetailResponse>
  <package>
    <id>6480007</id>
    <name>Test Package for Download Wizard</name>
    <contents>
      <document>
        <id>481291027</id>
        <name>dead-fly-art-01</name>
        <size>124146</size>
      </document>
      <document>
        <id>481293027</id>
        <name>dead-fly-art-03</name>
        <size>99221</size>
      </document>
    </contents>
  </package>
</packageDetailResponse>


I am mapping the above xml to my pojo like this:

public class CourierPackage {

        public interface CourierPackageReader extends
XmlReader<CourierPackage> {}
        public static final CourierPackageReader XML =
GWT.create(CourierPackageReader.class);

        @XmlField long id;
        @XmlField String name;
        @XmlField("contents/document") List<PackageContent> packageContents;

}


I tried to read it like this in onResponseReceived:

List<CourierPackage> pkgs = CourierPackage.XML.readList(responseDoc,
"package");
CourierPackage pkg = pkgs.get(0);


Now what it is doing that it is reading the CourierPackage fields like
id, name correctly but it is not reading the contents in
packageContents List.

Any ideas what is wrong here.


Thanks,
Fahim



-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to