Martin,

Why don't you start by using one of our examples.

There is a basic example in our repo at:
https://github.com/jibx/maven-plugin/tree/master/test-suite/base-binding-test

that shows how to share a schema binding with your other modules.

I hope this helps.

Don

On Mon, Mar 23, 2015 at 4:22 PM, <jibx-users-requ...@lists.sourceforge.net>
wrote:

> Send jibx-users mailing list submissions to
>         jibx-users@lists.sourceforge.net
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         https://lists.sourceforge.net/lists/listinfo/jibx-users
> or, via email, send a message with subject or body 'help' to
>         jibx-users-requ...@lists.sourceforge.net
>
> You can reach the person managing the list at
>         jibx-users-ow...@lists.sourceforge.net
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of jibx-users digest..."
>
>
> Today's Topics:
>
>    1. Re: XSD Catalog or similar (Martin Hermosilla)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Mon, 23 Mar 2015 19:21:56 -0400
> From: Martin Hermosilla <mar...@martinh.cl>
> Subject: Re: [jibx-users] XSD Catalog or similar
> To: jibx-users@lists.sourceforge.net
> Message-ID: <2fae9449-1e94-4cbd-950b-5df6963ab...@martinh.cl>
> Content-Type: text/plain; charset="utf-8"
>
> 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
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
>
> ------------------------------
>
>
> ------------------------------------------------------------------------------
> 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
>
>
> End of jibx-users Digest, Vol 93, Issue 3
> *****************************************
>



-- 
Don Corley
626-664-8491 (Cell)
626-358-2903 (Home)
------------------------------------------------------------------------------
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