You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Alexander Grivnin <ag...@mercury.com> on 2007/01/23 03:31:56 UTC

[Axis2] JiBX Mapping

Dennis,

 In one of your responses in the JiBX forum you've mentioned that if
class packages overlap, their mapping definitions should be defined in a
single mapping file. Otherwise, if binding reside in multiple files,
generated classes gets overridden in subsequent compilations. 

 We tried to put everything in a single mapping file, but that requires
that mapping file will not have the following construct:

<namespace uri="MyNameSpace" default="elements"/>

Without that construct, we saw situations when namespace was not added
to some arbitrary xml elements in the SOAP message, which in turn
resulted in a communication failure. 

Do you know of any other options we can try?

Thanks,
Alex

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: [Axis2] JiBX Mapping

Posted by Dennis Sosnoski <dm...@sosnoski.com>.
Hi Alex,

JiBX now supports <include>s of binding definitions, which allow you to 
easily work with namespaces. Look at the Axis2-JiBX example at 
http://www.sosnoski.com/jibx-wiki/space/axis2-jibx/example to see an 
example of this - it uses one root binding that just includes a pair of 
other bindings, one for the data objects with their own schema and 
namespace, and one for the Fault data. I just added the jibx-library.zip 
back on this page, BTW. Somehow it had gotten lost in some wiki 
rearranging I did over the weekend.

That's assuming that what you want is a single binding that spans 
multiple namespaces. If you want multiple bindings to the same Java 
objects (potentially with different namespaces) the same principle 
applies to each individual top-level binding. You then just need to make 
sure you compile all these top-level bindings at one time.

  - Dennis

Alexander Grivnin wrote:
> Dennis,
>
>  In one of your responses in the JiBX forum you've mentioned that if
> class packages overlap, their mapping definitions should be defined in a
> single mapping file. Otherwise, if binding reside in multiple files,
> generated classes gets overridden in subsequent compilations. 
>
>  We tried to put everything in a single mapping file, but that requires
> that mapping file will not have the following construct:
>
> <namespace uri="MyNameSpace" default="elements"/>
>
> Without that construct, we saw situations when namespace was not added
> to some arbitrary xml elements in the SOAP message, which in turn
> resulted in a communication failure. 
>
> Do you know of any other options we can try?
>
> Thanks,
> Alex
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org