hi,

i just tried to generate code and binding from schema using the new 
codegen-tool from jibx1.2-beta1.

is it possible to use precompiled bindings in combination with codegen-tool?

PROJECT1:
---------------------------------------------------------------
schema1.xsd:
---------------------------------------------------------------
    <xsd:complexType name="Something">
        <xsd:sequence>
            <xsd:element name="id" type="xsd:string" />
            <xsd:element name="name" type="xsd:string" />
        </xsd:sequence>
    </xsd:complexType>
---------------------------------------------------------------
binding1.xml:
---------------------------------------------------------------
    <mapping class="Something" name="something" abstract="true">
        <value style="element" name="id" get-method="getId" 
set-method="setId"/>
        <value style="element" name="name" get-method="getName" 
set-method="setName"/>
    </mapping>
---------------------------------------------------------------
Something.java:
---------------------------------------------------------------
public class Something
{
    private String id;
    private String name;
    
    ...
}
---------------------------------------------------------------

***************************************************************

PROJECT2 depends on PROJECT1:
---------------------------------------------------------------
schema2.xsd:
---------------------------------------------------------------
    <xsd:element name="Request">
        <xsd:complexType>
            <xsd:sequence>
                <xsd:element name="id" type="xsd:string" />
                <structure map-as="tns:Something" 
get-method="getSomething" set-method="setSomething" name="something"/>
            </xsd:sequence>
        </xsd:complexType>
    </xsd:element>
---------------------------------------------------------------

---------------------------------------------------------------
Request.java should result in:
---------------------------------------------------------------
public class Request
{
    private String id;
    private Something something; //reference to class in PROJECT1
    
    ...
}
---------------------------------------------------------------

ma

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to