Hi all.

One of my mappings is abstract and contains one collection.
Some sub mappings extend that abstract mapping.
The purpose behind is to resemble a tree-like structure.

The binding is used for a jibxsoap-based webservice.

The java objects are setup correctly, with dozens of children nodes upto a depth of 5. But, when being marshalled, I got only the top two hierarchy levels, which looked like so, unfortunately:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/";>
<SOAP:Body>
  <site>
    <base id="1" name="London-II">
      <comment>Turbine-Gen</comment>
      <child>
        <site>
          <base id="2" name="PLANT pumps">
            <comment></comment>
          </base>
        </site>
        <site>
          <base id="554" name="PLANT fans">
            <comment></comment>
          </base>
        </site>
      </child>
    </omt>
  </site>
</SOAP:Body>
</SOAP:Envelope>

When I really would have expected something like this:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/";>
<SOAP:Body>
  <site>
    <base id="1" name="London-II">
      <comment>Turbine-Gen</comment>
      <child>
        <site>
          <base id="2" name="PLANT pumps">
            <comment></comment>
          <child>
            <machine>
              <base id="6" name="pump a">
                <comment></comment>
              </base>
              <power>110.0</power>
              <speed>358.0</speed>
            </machine>
            <machine>
              <base id="9" name="pump b">
                <comment></comment>
              </base>
              <power>114.0</power>
              <speed>351.0</speed>
            </machine>
            <machine>
              <base id="17" name="pump c">
                <comment></comment>
              </base>
            </machine>
              <power>104.0</power>
              <speed>381.0</speed>
          </child>
          </base>
        </site>
        <site>
          <base id="554" name="PLANT fans">
            <comment></comment>
          </base>
        </site>
      </child>
    </base>
  </site>
</SOAP:Body>
</SOAP:Envelope>

This is my simplified mapping:

<?xml version="1.0" encoding="UTF-8"?>
<binding>
<mapping name="omt" class="nik.data.tree.Node" abstract="true">
<value style="attribute" name="id" field="nodeId" />
<value style="attribute" name="name" field="nodeName" />
<value name="comment" field="treeComment" />
<collection name="child" field="Children" usage="optional" />
</mapping>
<mapping name="site" class="nik.data.tree.LocationNode" extends="nik.data.tree.Node" >
<structure map-as="nik.data.tree.Node" />
</mapping>
<mapping name="machine" class="nik.data.tree.MachineNode" extends="nik.data.tree.Node">
<structure map-as="nik.data.tree.Node" />
<value name="power" field="power" />
<value name="speed" field="speed" />
</mapping>
</binding>


Thanks for any help.
Regards,
Joerg



-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
jibx-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to