Sounds like a run-of-the-mill parse error, but impossible to tell without
seeing your binding.xml.

Does your binding allow the individualName tag (in the correct namespace -
easy mistake to make) to nest inside responsibleParty?

-Archie

On Tue, Aug 16, 2011 at 8:50 PM, Nathan Wilhelmi <wilhe...@ucar.edu> wrote:

> Hello,
>
> We are trying to see if we can use JIBX to simply our XML parsing and
> running into a few problems. JIBX fails to process our xsd so we are
> trying to write the mapping files by hand.
>
> I am running into the following exception when trying to unmarshall the
> XML:
>
> org.jibx.runtime.JiBXException: Expected
> "{http://www.purl.org/org/esmetadata/cim/1.5/schemas}responsibleParty";
> end tag, found "{http://www.isotc211.org/2005/gmd}individualName"; start
> tag (line 13672, col 27)
>        at
>
> org.jibx.runtime.impl.UnmarshallingContext.parsePastCurrentEndTag(UnmarshallingContext.java:731)
>        at
>
> sgf.cim.repository.impl.jibx.model.SimulationRun.JiBX_cim_new_unmarshal_1_1(SimulationRun.java)
>        at
>
> Any suggestions if this is possible and what I need to change in the
> mapping file?
>
> Thank you for your time!
>
> -Nate
>
>
> XML
>
> <CIMDocumentSet xmlns:gml="http://www.opengis.net/gml/3.2";
>        xmlns:xlink="http://www.w3.org/1999/xlink";
>        xmlns:gco="http://www.isotc211.org/2005/gco";
>        xmlns:gmd="http://www.isotc211.org/2005/gmd";
>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>        xmlns="http://www.purl.org/org/esmetadata/cim/1.5/schemas";
>        xsi:schemaLocation="
> http://www.purl.org/org/esmetadata/cim/1.5/schemas/cim.xsd";>
>
>   <simulationRun>
>     <responsibleParty>
>       <gmd:individualName>
>         <gco:CharacterString>Someones name</gco:CharacterString>
>       </gmd:individualName>
>
>     </responsibleParty>
>     <shortName>shortName</shortName>
>     <longName>Really long name</longName>
>     <description>A nice description of the simulation</description>
>   </simulationRun>
> </CIMDocumentSet>
>
> Java Class Structure
>
> public class SimulationRun {
>
>        public String shortName;
>        public String longName;
>
>        public ArrayList<ResponsibleParty> resposibleParties;
> }
>
> public class ResponsibleParty {
>
>        public String indName;
> }
> JIBX mapping file
>
> <binding trim-whitespace="true">
>
>        <namespace uri="http://www.purl.org/org/esmetadata/cim/1.5/schemas";
> default="all" prefix="" />
>        <namespace uri="http://www.isotc211.org/2005/gmd"; prefix="gmd" />
>        <namespace uri="http://www.isotc211.org/2005/gco"; prefix="gco" />
>
>   <mapping name="CIMDocumentSet"
> class="sgf.cim.repository.impl.jibx.model.DocumentSet" ordered="false"
> flexible="true" >
>
>                <structure name="simulationRun"
> class="sgf.cim.repository.impl.jibx.model.SimulationRun"
> field="simulationRun" ordered="false" flexible="true" >
>                        <value name="shortName" field="shortName" />
>                        <value name="longName" field="longName" />
>
>                        <collection name="responsibleParty"
> field="resposibleParties" >
>                      <structure name="responsibleParty"
> type="sgf.cim.repository.impl.jibx.model.ResponsibleParty"
> ordered="false" flexible="true" >
>                        <structure name="gmd:individualName" ordered="false"
> flexible="true" >
>                                        <value name="gco:CharacterString"
> field="indName"  />
>                        </structure>
>                     </structure>
>                    </collection>
>
>                </structure>
>
>   </mapping>
> </binding>
>
>
>
>
>
> ------------------------------------------------------------------------------
> Get a FREE DOWNLOAD! and learn more about uberSVN rich system,
> user administration capabilities and model configuration. Take
> the hassle out of deploying and managing Subversion and the
> tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
> _______________________________________________
> jibx-users mailing list
> jibx-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jibx-users
>



-- 
Archie L. Cobbs
------------------------------------------------------------------------------
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to