When I change in binding.xml from:
  <mapping abstract="true" type-name="propertyListEntryType"
class="com.bind.giata.PropertyListEntryType">
    <value style="attribute" name="giataId" get-method="getGiataId"
set-method="setGiataId"/>
    <value style="attribute" name="lastUpdate"
get-method="getLastUpdate" set-method="setLastUpdate"
usage="optional"/>
    <value style="attribute" name="movedTo" get-method="getMovedTo"
set-method="setMovedTo" usage="optional"/>
    <value style="attribute" name="movedOn" get-method="getMovedOn"
set-method="setMovedOn" usage="optional"/>
    <value style="attribute" name="deletedOn"
get-method="getDeletedOn" set-method="setDeletedOn" usage="optional"/>
    <value style="attribute" name="xlink:href"
get-method="getXlinkhref" set-method="setXlinkhref"/>
  </mapping>
to:
  <mapping abstract="true" type-name="propertyListEntryType"
class="com.bind.giata.PropertyListEntryType">
   <namespace uri="http://www.w3.org/1999/xlink"; prefix="xlink" default="none"/>
    <value style="attribute" name="giataId" get-method="getGiataId"
set-method="setGiataId"/>
    <value style="attribute" name="lastUpdate"
get-method="getLastUpdate" set-method="setLastUpdate"
usage="optional"/>
    <value style="attribute" name="movedTo" get-method="getMovedTo"
set-method="setMovedTo" usage="optional"/>
    <value style="attribute" name="movedOn" get-method="getMovedOn"
set-method="setMovedOn" usage="optional"/>
    <value style="attribute" name="deletedOn"
get-method="getDeletedOn" set-method="setDeletedOn" usage="optional"/>
    <value style="attribute" name="href"
ns="http://www.w3.org/1999/xlink"; get-method="getXlinkhref"
set-method="setXlinkhref"/>
  </mapping>
the unmarshalling now works, but in my project I cannot modify
binding.xml (because it's generated each build, people add new classes
for bind, management don't want changes there etc.), so my question
again can I make this change in other place e.g. in customization.xml,
or in CodeGen plugin?

Adr

2009/9/16 Java Programmer <jprogrami...@gmail.com>:
> Hello,
> I got exception:
> org.jibx.runtime.JiBXException: Missing required attribute
> "xlink:href" (line 2, col 211)
>        at 
> org.jibx.runtime.impl.UnmarshallingContext.attributeText(UnmarshallingContext.java:980)
> when I try to unmarshall data XML - provided schemas looks like:
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";
> xmlns:xlink="http://www.w3.org/1999/xlink";>
>        <xs:import namespace="http://www.w3.org/1999/xlink";     
> schemaLocation="../xlink.xsd"
> />
>        <xs:complexType name="propertyListEntryType">
>                <xs:attribute name="giataId" type="xs:int" use="required" />
>                <xs:attribute name="lastUpdate" type="xs:dateTime" />
>                <xs:attribute name="movedTo" type="xs:int" />
>                <xs:attribute name="movedOn" type="xs:dateTime" />
>                <xs:attribute name="deletedOn" type="xs:dateTime" />
>                <xs:attribute name="xlink:href" form="qualified" 
> type="xs:anyURI"
> use="required" />
>        </xs:complexType>
> </xs:schema>
>
> xlink.xsd:
> <?xml version="1.0" encoding="UTF-8"?>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";
>        elementFormDefault="qualified"
>        targetNamespace="http://www.w3.org/1999/xlink";
>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>        xmlns:xlink="http://www.w3.org/1999/xlink";>
>        <xs:attribute name="href" type="xs:anyURI" />
> </xs:schema>
>
> Generated field in Java class looks like:
> private String xlinkhref;
>
> I think it could be some trivial error considering namespaces, but I
> don't know how to solve it ?
>
> Best regards,
> Adr
>

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to