Hi guys,
I am new to JibX but it seems quite an easy tool to use. Nevertheless I am
stuck with the following problem:
I am trying to parse this XML file:
<?xml version="1.0" encoding="UTF-8"?>
<FpML version="4-9" xsi:type="fpml:TradeConfirmed"
xsi:schemaLocation="http://www.fpml.org/2010/FpML-4-9 ../fpml-main-4-9.xsd
http://www.w3.org/2000/09/xmldsig# ../xmldsig-core-schema.xsd"
xmlns:fpml="http://www.fpml.org/2010/FpML-4-9"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<header>
....
</FpML>
Into the generate Java code deployed by the libraries.
The schema is the following:
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://www.fpml.org/2010/FpML-4-9"
xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"
xmlns:fpml="http://www.fpml.org/2010/FpML-4-9"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" ecore:nsPrefix="fpml"
ecore:package="org.fpml" ecore:documentRoot="FpML"
targetNamespace="http://www.fpml.org/2010/FpML-4-9" version="$Revision: 7265 $"
attributeFormDefault="unqualified" elementFormDefault="qualified">
... several includes ...
<xsd:element name="FpML" type="Document">
<xsd:annotation>
<xsd:documentation xml:lang="en">The FpML element forms the root for any
conforming FpML instance document. The actual structure of the document is
determined by setting the 'type' attribute to an appropriate derived subtype of
the complex type Document.</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:schema>
The resulted deployed code for this element is an empty class:
package org.fpml.fpml49;
public class FpML extends Document
{
}
and the generated binding file contains:
<binding xmlns:ns1="http://www.fpml.org/2010/FpML-4-9" trim-whitespace="true">
<namespace uri="http://www.fpml.org/2010/FpML-4-9" default="elements"/>
<mapping class="org.fpml.fpml49.FpML" name="FpML">
<structure map-as="ns1:Document"/>
</mapping>
... lots of other mappings ...
</binding>
The problem is when I try to unmarshal the input file it returns me the
following error:
"org.jibx.runtime.JiBXException: No unmarshaller for element "FpML" (line 4,
col 106)"
The schemas are original and cannot be touched.
Can anyone point me to the right direction please?
Enrico Musuruana | Software Developer
C24 .biz
M: +44 7761 195912
E: enrico.musuru...@c24.biz
W: www.C24.biz
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users