Update: 

Finally I was able to generate the java source code with the desired references 
to module-package using JiBX customizations and maven copy files. 

The only problem that now I am facing is that both modules model-project and 
message-project are generating the person object. 

Let's say that 
model-project generates com.example.model.Person 

and 
message-project generates 
com.example.message.GetPersonRequest 
com.example.message.GetPersonResponse 

classes are generated. 

Now message-project is also generating 
com.example.model.Person 
(after fixing with JiBX customization before was com.example.message.Person) 
the thing is, I don't want that class and package to be generated under 
message-project. 

So let's see if anyone can help on that. 

Thanks, 


-Martin

> On Mar 23, 2015, at 3:04 PM, Martin Hermosilla <mar...@martinh.cl> wrote:
> 
> Hi,
> 
> It’s been frustrating trying to use JiBX on my project. I have the following 
> configuration:
> 
> Maven mutimodule project:
> 
> parent-project
>  +——model-project        This project will have the common domain objects 
> defined on XSD files
>  +——message-project   This project will contain the Webservice 
> Request/Response definitions on XSD and logic
>  +—— backend-project    
>  +—— frontend-project
> 
> the thing is:
> 
> on model-project I have let’s say: person.xsd is
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema 
> <http://www.w3.org/2001/XMLSchema>" 
>               elementFormDefault="qualified"
>               attributeFormDefault="qualified" 
>               targetNamespace="http://www.myexample.com/schemas/app/person 
> <http://www.myexample.com/schemas/app/person>" 
>               xmlns:tns=“http://www.myexample.com/schemas/app/person 
> <http://www.myexample.com/schemas/app/person>">
> 
>       <xsd:complexType name=“person">
>               <xsd:annotation>
>                       <xsd:documentation>
>                       </xsd:documentation>
>               </xsd:annotation>
>               <xsd:sequence>
>                       <xsd:element name=“id"        type="xsd:long"     
> minOccurs="0" />
>                       <xsd:element name=“firstName" type=“xsd:string"   
> minOccurs="0" />
>                       <xsd:element name=“lastName"  type="xsd:string"   
> minOccurs="0" />
>                       <xsd:element name=“dob"       type="xsd:dateTime" 
> minOccurs="0" />
>                       <xsd:element name=“age"       type="xsd:dateTime" 
> minOccurs="0" />
>               </xsd:sequence>
>       </xsd:complexType>
> </xsd:schema>
> 
> and under message-project I have let’s say: personService.xsd:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema 
> <http://www.w3.org/2001/XMLSchema>" 
>               elementFormDefault="qualified"
>               attributeFormDefault="qualified” 
>               xmlns:per=“http://www.myexample.com/schemas/app/personService 
> <http://www.myexample.com/schemas/app/personService>"
>               
> targetNamespace="http://www.myexample.com/schemas/app/personService 
> <http://www.myexample.com/schemas/app/personService>">
> 
>         <xs:import 
> namespace="http://www.myexample.com/schemas/app/personService 
> <http://www.myexample.com/schemas/app/personService>" />
> 
>       <xsd:complexType name=“getPersonRequest">
>               <xsd:annotation>
>                       <xsd:documentation>
>                       </xsd:documentation>
>               </xsd:annotation>
>               <xsd:sequence>
>                       <xsd:element name=“id" type="xsd:long" minOccurs="0" />
>               </xsd:sequence>
>       </xsd:complexType>
> 
>       <xsd:complexType name=“getPersonResponse">
>               <xsd:annotation>
>                       <xsd:documentation>
>                       </xsd:documentation>
>               </xsd:annotation>
>               <xsd:sequence>
>                       <xsd:element name=“person” type=“per:person” 
> minOccurs="0" />
>               </xsd:sequence>
>       </xsd:complexType>
> </xsd:schema>
> 
> If I were using JAXB I would be able to use catalogs to reference the 
> external xsd: from message-project to the stored under model-project
> but I have not been able to find something equivalent for JiBX. I need to do 
> it using maven generation lifecycle under command line, eclipse, 
> IntelijIdea etc.
> 
> Does anybody has been able to make this thing, not counting with schemas 
> published online, only local copies on their respective projects and
> generated jar files.
> 
> Hope you can help me,
> 
> Best,
> 
> -Martin

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to