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 Josh <ge...@gmail.com> on 2007/04/13 20:49:57 UTC

Data binding frameworks that allow backwards compatible schema changes?

All,

I am looking to determine which client side data binding choices (castor,
jibx, jaxb etc) allow backwards compatible schema changes (eg addition of a
new field) without throwing an exception.  I am hoping to recommend some
solutions to my clients that would allow me to make backward compatible
schema changes without causing a ripple effect.  Has anyone come across this
information?

Regards,

Joshua

Re: Data binding frameworks that allow backwards compatible schema changes?

Posted by Davanum Srinivas <da...@gmail.com>.
xmlbeans may be an option. i've been told that you can feed multiple
schema versions and generate code.

thanks,
dims

On 4/18/07, Josh <ge...@gmail.com> wrote:
> Dennis/Amila,
>
> The point was to allow for some "backwards compatible" growth of the schema
> without requiring the clients to make changes.  Not necessarily to avoid
> validation entirely.  If I understand correctly, JAXB 2 is limited to Java
> 5.  Unfortunately, I am working in a Java 1.4 environment.  Is this a
> feasible approach or do most people create new versions of the wsdl and
> schema?
>
> -Joshua
>
>
> On 4/17/07, Dennis Sosnoski <dm...@sosnoski.com> wrote:
> > Hi Amila,
> >
> > When I try running the 1.2RC2 WSDL2Java with -d jaxbri I get:
> >
> >     [java] Exception in thread "main"
> > org.apache.axis2.wsdl.codegen.CodeGenerationException:
> > java.lang.RuntimeException:
> java.lang.reflect.InvocationTargetException
> >     [java]     at
> >
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java
> :255)
> >     [java]     at
> org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32)
> >     [java]     at
> org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21)
> > ...
> >     [java] Caused by: java.lang.NullPointerException
> >     [java]     at
> >
> org.apache.axis2.jaxbri.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:105)
> >     [java]     ... 8 more
> >
> > This is the same error I got when I tried with RC1, as reported in Jira:
> > https://issues.apache.org/jira/browse/AXIS2-2431 The same
> WSDL (and
> > schema) works fine with ADB and JiBX data bindings.
> >
> > - Dennis
> >
> > Dennis M. Sosnoski
> > SOA and Web Services in Java
> > Training and Consulting
> > http://www.sosnoski.com - http://www.sosnoski.co.nz
> > Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117
> >
> >
> >
> > Amila Suriarachchi wrote:
> > >
> > >
> > > On 4/17/07, *Dennis Sosnoski* <dms@sosnoski.com
> > > <mailto:dms@sosnoski.com >> wrote:
> > >
> > >     JAXB 2.0 should do this, though I was unable to get JAXB to work
> with
> > >     the Axis2 1.2RC1 WSDL2Java. Has anyone been successful in using JAXB
> > >     with Axis2?
> > >
> > >
> > > Can you test with RC2? Are you refering the bug which does not include
> > > jaxb- runtime jars and jaxb template to
> > > axis2-jaxb.jar?
> > >
> > >     JiBX will also handle this. Unlike JAXB 2.0 , with JiBX it's not the
> > >     default behavior. In the JiBX binding you need to set
> > >     flexible="true" on
> > >     any <mapping> or <structure> element where you want to allow unknown
> > >     elements.
> > >
> > >     In general it's not a good approach to do this kind of schema
> > >     extension
> > >     (especially for web services, where the schema definition should
> > >     be part
> > >     of the service contract). If you want to allow for extensions, use
> an
> > >     xs:any element as a wildcard that allows for other elements to be
> > >     added
> > >     in the future. Otherwise you're not actually following the schema,
> > >     which
> > >     defeats the whole purpose of having one in the first place.
> > >
> > >       - Dennis
> > >
> > >     Dennis M. Sosnoski
> > >     SOA and Web Services in Java
> > >     Training and Consulting
> > >     http://www.sosnoski.com - http://www.sosnoski.co.nz
> > >     Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117
> > >
> > >
> > >
> > >     Amila Suriarachchi wrote:
> > >     > As I understood you are looking for an databinding framwork
> > >     which does
> > >     > not do any validation. try jaxb.
> > >     >
> > >     > On 4/16/07, *Josh* < gemini929@gmail.com
> > >     <ma...@gmail.com> <mailto: gemini929@gmail.com
> > >     <ma...@gmail.com>>>
> > >     > wrote:
> > >     >
> > >     >     Amila,
> > >     >
> > >     >     If I configure a databinding approach to work with the
> > >     following XML:
> > >     >
> > >     >     <person>
> > >     >         <firstName>John</firstName>
> > >     >         <lastName>Doe</lastName>
> > >     >     </person>
> > >     >
> > >     >     Which databinding approaches will not break if I pass in the
> > >     >     following XML:
> > >     >
> > >     >     <person>
> > >     >         <firstName>John</firstName>
> > >     >         <lastName>Doe</lastName>
> > >     >         <age>25</age>
> > >     >         <sex>M</sex>
> > >     >     </person>
> > >     >
> > >     >     While most client applications may not want to interpret the
> new
> > >     >     information, I want to make sure that I can recommend a
> binding
> > >     >     approach that does not cause a ripple effect when new items
> are
> > >     >     added to the schema.  Does this clarify what I am looking for?
> > >     >
> > >     >     -Joshua
> > >     >
> > >     >
> > >     >     On 4/16/07, *Amila Suriarachchi*
> > >     <amilasuriarachchi@gmail.com <ma...@gmail.com>
> > >     >     <mailto: amilasuriarachchi@gmail.com
> > >     <ma...@gmail.com>>> wrote:
> > >     >
> > >     >
> > >     >
> > >     >         On 4/14/07, *Josh* < gemini929@gmail.com
> > >     <ma...@gmail.com>
> > >     >         <mailto: gemini929@gmail.com
> > >     <ma...@gmail.com>>> wrote:
> > >     >
> > >     >             All,
> > >     >
> > >     >             I am looking to determine which client side data
> > >     binding
> > >     >             choices (castor, jibx, jaxb etc) allow backwards
> > >     >             compatible schema changes (eg addition of a new field)
> > >     >             without throwing an exception.
> > >     >
> > >     >
> > >     >         What you exactly mean by backword compatible schema?
> > >     >         e g.  if you add a new element to a complex type with
> > >     >         minOccurs 0 then this should work properly with  the
> > >     requests
> > >     >         you got earlier as well. But in this case it the way you
> > >     write
> > >     >         schema and it has nothing to do with the databinding frame
> > >     >         work as far as it correctly interpret the schema.
> > >     >
> > >     >
> > >     >             I am hoping to recommend some solutions to my
> > >     clients that
> > >     >             would allow me to make backward compatible schema
> > >     changes
> > >     >             without causing a ripple effect.  Has anyone come
> across
> > >     >             this information?
> > >     >
> > >     >             Regards,
> > >     >
> > >     >             Joshua
> > >     >
> > >     >
> > >     >
> > >     >
> > >     >         --
> > >     >         Amila Suriarachchi,
> > >     >         WSO2 Inc.
> > >     >
> > >     >
> > >     >
> > >     >
> > >     >
> > >     > --
> > >     > Amila Suriarachchi,
> > >     > WSO2 Inc.
> > >
> > >
> ---------------------------------------------------------------------
> > >     To unsubscribe, e-mail:
> axis-user-unsubscribe@ws.apache.org
> > >     <ma...@ws.apache.org>
> > >     For additional commands, e-mail: axis-user-help@ws.apache.org
> > >     <ma...@ws.apache.org>
> > >
> > >
> > >
> > >
> > > --
> > > Amila Suriarachchi,
> > > WSO2 Inc.
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
>
>


-- 
Davanum Srinivas :: http://wso2.org/ :: Oxygen for Web Services Developers

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


Re: Data binding frameworks that allow backwards compatible schema changes?

Posted by Josh <ge...@gmail.com>.
Dennis/Amila,

The point was to allow for some "backwards compatible" growth of the schema
without requiring the clients to make changes.  Not necessarily to avoid
validation entirely.  If I understand correctly, JAXB 2 is limited to Java
5.  Unfortunately, I am working in a Java 1.4 environment.  Is this a
feasible approach or do most people create new versions of the wsdl and
schema?

-Joshua


On 4/17/07, Dennis Sosnoski <dm...@sosnoski.com> wrote:
>
> Hi Amila,
>
> When I try running the 1.2RC2 WSDL2Java with -d jaxbri I get:
>
>     [java] Exception in thread "main"
> org.apache.axis2.wsdl.codegen.CodeGenerationException:
> java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
>     [java]     at
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(
> CodeGenerationEngine.java:255)
>     [java]     at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32)
>     [java]     at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21)
> ...
>     [java] Caused by: java.lang.NullPointerException
>     [java]     at
> org.apache.axis2.jaxbri.CodeGenerationUtility.processSchemas(
> CodeGenerationUtility.java:105)
>     [java]     ... 8 more
>
> This is the same error I got when I tried with RC1, as reported in Jira:
> https://issues.apache.org/jira/browse/AXIS2-2431 The same WSDL (and
> schema) works fine with ADB and JiBX data bindings.
>
> - Dennis
>
> Dennis M. Sosnoski
> SOA and Web Services in Java
> Training and Consulting
> http://www.sosnoski.com - http://www.sosnoski.co.nz
> Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117
>
>
>
> Amila Suriarachchi wrote:
> >
> >
> > On 4/17/07, *Dennis Sosnoski* <dms@sosnoski.com
> > <ma...@sosnoski.com>> wrote:
> >
> >     JAXB 2.0 should do this, though I was unable to get JAXB to work
> with
> >     the Axis2 1.2RC1 WSDL2Java. Has anyone been successful in using JAXB
> >     with Axis2?
> >
> >
> > Can you test with RC2? Are you refering the bug which does not include
> > jaxb- runtime jars and jaxb template to
> > axis2-jaxb.jar?
> >
> >     JiBX will also handle this. Unlike JAXB 2.0, with JiBX it's not the
> >     default behavior. In the JiBX binding you need to set
> >     flexible="true" on
> >     any <mapping> or <structure> element where you want to allow unknown
> >     elements.
> >
> >     In general it's not a good approach to do this kind of schema
> >     extension
> >     (especially for web services, where the schema definition should
> >     be part
> >     of the service contract). If you want to allow for extensions, use
> an
> >     xs:any element as a wildcard that allows for other elements to be
> >     added
> >     in the future. Otherwise you're not actually following the schema,
> >     which
> >     defeats the whole purpose of having one in the first place.
> >
> >       - Dennis
> >
> >     Dennis M. Sosnoski
> >     SOA and Web Services in Java
> >     Training and Consulting
> >     http://www.sosnoski.com - http://www.sosnoski.co.nz
> >     Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117
> >
> >
> >
> >     Amila Suriarachchi wrote:
> >     > As I understood you are looking for an databinding framwork
> >     which does
> >     > not do any validation. try jaxb.
> >     >
> >     > On 4/16/07, *Josh* < gemini929@gmail.com
> >     <ma...@gmail.com> <mailto:gemini929@gmail.com
> >     <ma...@gmail.com>>>
> >     > wrote:
> >     >
> >     >     Amila,
> >     >
> >     >     If I configure a databinding approach to work with the
> >     following XML:
> >     >
> >     >     <person>
> >     >         <firstName>John</firstName>
> >     >         <lastName>Doe</lastName>
> >     >     </person>
> >     >
> >     >     Which databinding approaches will not break if I pass in the
> >     >     following XML:
> >     >
> >     >     <person>
> >     >         <firstName>John</firstName>
> >     >         <lastName>Doe</lastName>
> >     >         <age>25</age>
> >     >         <sex>M</sex>
> >     >     </person>
> >     >
> >     >     While most client applications may not want to interpret the
> new
> >     >     information, I want to make sure that I can recommend a
> binding
> >     >     approach that does not cause a ripple effect when new items
> are
> >     >     added to the schema.  Does this clarify what I am looking for?
> >     >
> >     >     -Joshua
> >     >
> >     >
> >     >     On 4/16/07, *Amila Suriarachchi*
> >     <amilasuriarachchi@gmail.com <ma...@gmail.com>
> >     >     <mailto:amilasuriarachchi@gmail.com
> >     <ma...@gmail.com>>> wrote:
> >     >
> >     >
> >     >
> >     >         On 4/14/07, *Josh* <gemini929@gmail.com
> >     <ma...@gmail.com>
> >     >         <mailto:gemini929@gmail.com
> >     <ma...@gmail.com>>> wrote:
> >     >
> >     >             All,
> >     >
> >     >             I am looking to determine which client side data
> >     binding
> >     >             choices (castor, jibx, jaxb etc) allow backwards
> >     >             compatible schema changes (eg addition of a new field)
> >     >             without throwing an exception.
> >     >
> >     >
> >     >         What you exactly mean by backword compatible schema?
> >     >         e g.  if you add a new element to a complex type with
> >     >         minOccurs 0 then this should work properly with  the
> >     requests
> >     >         you got earlier as well. But in this case it the way you
> >     write
> >     >         schema and it has nothing to do with the databinding frame
> >     >         work as far as it correctly interpret the schema.
> >     >
> >     >
> >     >             I am hoping to recommend some solutions to my
> >     clients that
> >     >             would allow me to make backward compatible schema
> >     changes
> >     >             without causing a ripple effect.  Has anyone come
> across
> >     >             this information?
> >     >
> >     >             Regards,
> >     >
> >     >             Joshua
> >     >
> >     >
> >     >
> >     >
> >     >         --
> >     >         Amila Suriarachchi,
> >     >         WSO2 Inc.
> >     >
> >     >
> >     >
> >     >
> >     >
> >     > --
> >     > Amila Suriarachchi,
> >     > WSO2 Inc.
> >
> >
> ---------------------------------------------------------------------
> >     To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> >     <ma...@ws.apache.org>
> >     For additional commands, e-mail: axis-user-help@ws.apache.org
> >     <ma...@ws.apache.org>
> >
> >
> >
> >
> > --
> > Amila Suriarachchi,
> > WSO2 Inc.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>

Re: Data binding frameworks that allow backwards compatible schema changes?

Posted by Amila Suriarachchi <am...@gmail.com>.
On 4/18/07, Dennis Sosnoski <dm...@sosnoski.com> wrote:
>
> Hi Amila,
>
> When I try running the 1.2RC2 WSDL2Java with -d jaxbri I get:
>
>      [java] Exception in thread "main"
> org.apache.axis2.wsdl.codegen.CodeGenerationException:
> java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
>      [java]     at
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(
> CodeGenerationEngine.java:255)
>      [java]     at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32)
>      [java]     at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21)
> ...
>      [java] Caused by: java.lang.NullPointerException
>      [java]     at
> org.apache.axis2.jaxbri.CodeGenerationUtility.processSchemas(
> CodeGenerationUtility.java:105)
>      [java]     ... 8 more
>
>
may be a problem with the wsdl file. please see my comment on this issue
https://issues.apache.org/jira/browse/AXIS2-2431




-- 
Amila Suriarachchi,
WSO2 Inc.

Re: Data binding frameworks that allow backwards compatible schema changes?

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

When I try running the 1.2RC2 WSDL2Java with -d jaxbri I get:

     [java] Exception in thread "main" 
org.apache.axis2.wsdl.codegen.CodeGenerationException: 
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
     [java]     at 
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:255)
     [java]     at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32)
     [java]     at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21)
...
     [java] Caused by: java.lang.NullPointerException
     [java]     at 
org.apache.axis2.jaxbri.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:105)
     [java]     ... 8 more

This is the same error I got when I tried with RC1, as reported in Jira: 
https://issues.apache.org/jira/browse/AXIS2-2431 The same WSDL (and 
schema) works fine with ADB and JiBX data bindings.

  - Dennis

Dennis M. Sosnoski
SOA and Web Services in Java
Training and Consulting
http://www.sosnoski.com - http://www.sosnoski.co.nz
Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117



Amila Suriarachchi wrote:
>
>
> On 4/17/07, *Dennis Sosnoski* <dms@sosnoski.com 
> <ma...@sosnoski.com>> wrote:
>
>     JAXB 2.0 should do this, though I was unable to get JAXB to work with
>     the Axis2 1.2RC1 WSDL2Java. Has anyone been successful in using JAXB
>     with Axis2?
>
>
> Can you test with RC2? Are you refering the bug which does not include 
> jaxb- runtime jars and jaxb template to
> axis2-jaxb.jar?
>
>     JiBX will also handle this. Unlike JAXB 2.0, with JiBX it's not the
>     default behavior. In the JiBX binding you need to set
>     flexible="true" on
>     any <mapping> or <structure> element where you want to allow unknown
>     elements.
>
>     In general it's not a good approach to do this kind of schema
>     extension
>     (especially for web services, where the schema definition should
>     be part
>     of the service contract). If you want to allow for extensions, use an
>     xs:any element as a wildcard that allows for other elements to be
>     added
>     in the future. Otherwise you're not actually following the schema,
>     which
>     defeats the whole purpose of having one in the first place.
>
>       - Dennis
>
>     Dennis M. Sosnoski
>     SOA and Web Services in Java
>     Training and Consulting
>     http://www.sosnoski.com - http://www.sosnoski.co.nz
>     Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117
>
>
>
>     Amila Suriarachchi wrote:
>     > As I understood you are looking for an databinding framwork
>     which does
>     > not do any validation. try jaxb.
>     >
>     > On 4/16/07, *Josh* < gemini929@gmail.com
>     <ma...@gmail.com> <mailto:gemini929@gmail.com
>     <ma...@gmail.com>>>
>     > wrote:
>     >
>     >     Amila,
>     >
>     >     If I configure a databinding approach to work with the
>     following XML:
>     >
>     >     <person>
>     >         <firstName>John</firstName>
>     >         <lastName>Doe</lastName>
>     >     </person>
>     >
>     >     Which databinding approaches will not break if I pass in the
>     >     following XML:
>     >
>     >     <person>
>     >         <firstName>John</firstName>
>     >         <lastName>Doe</lastName>
>     >         <age>25</age>
>     >         <sex>M</sex>
>     >     </person>
>     >
>     >     While most client applications may not want to interpret the new
>     >     information, I want to make sure that I can recommend a binding
>     >     approach that does not cause a ripple effect when new items are
>     >     added to the schema.  Does this clarify what I am looking for?
>     >
>     >     -Joshua
>     >
>     >
>     >     On 4/16/07, *Amila Suriarachchi*
>     <amilasuriarachchi@gmail.com <ma...@gmail.com>
>     >     <mailto:amilasuriarachchi@gmail.com
>     <ma...@gmail.com>>> wrote:
>     >
>     >
>     >
>     >         On 4/14/07, *Josh* <gemini929@gmail.com
>     <ma...@gmail.com>
>     >         <mailto:gemini929@gmail.com
>     <ma...@gmail.com>>> wrote:
>     >
>     >             All,
>     >
>     >             I am looking to determine which client side data
>     binding
>     >             choices (castor, jibx, jaxb etc) allow backwards
>     >             compatible schema changes (eg addition of a new field)
>     >             without throwing an exception.
>     >
>     >
>     >         What you exactly mean by backword compatible schema?
>     >         e g.  if you add a new element to a complex type with
>     >         minOccurs 0 then this should work properly with  the
>     requests
>     >         you got earlier as well. But in this case it the way you
>     write
>     >         schema and it has nothing to do with the databinding frame
>     >         work as far as it correctly interpret the schema.
>     >
>     >
>     >             I am hoping to recommend some solutions to my
>     clients that
>     >             would allow me to make backward compatible schema
>     changes
>     >             without causing a ripple effect.  Has anyone come across
>     >             this information?
>     >
>     >             Regards,
>     >
>     >             Joshua
>     >
>     >
>     >
>     >
>     >         --
>     >         Amila Suriarachchi,
>     >         WSO2 Inc.
>     >
>     >
>     >
>     >
>     >
>     > --
>     > Amila Suriarachchi,
>     > WSO2 Inc.
>
>     ---------------------------------------------------------------------
>     To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>     <ma...@ws.apache.org>
>     For additional commands, e-mail: axis-user-help@ws.apache.org
>     <ma...@ws.apache.org>
>
>
>
>
> -- 
> Amila Suriarachchi,
> WSO2 Inc. 

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


Re: Data binding frameworks that allow backwards compatible schema changes?

Posted by Amila Suriarachchi <am...@gmail.com>.
On 4/17/07, Dennis Sosnoski <dm...@sosnoski.com> wrote:
>
> JAXB 2.0 should do this, though I was unable to get JAXB to work with
> the Axis2 1.2RC1 WSDL2Java. Has anyone been successful in using JAXB
> with Axis2?


Can you test with RC2? Are you refering the bug which does not include jaxb-
runtime jars and jaxb template to
axis2-jaxb.jar?

JiBX will also handle this. Unlike JAXB 2.0, with JiBX it's not the
> default behavior. In the JiBX binding you need to set flexible="true" on
> any <mapping> or <structure> element where you want to allow unknown
> elements.
>
> In general it's not a good approach to do this kind of schema extension
> (especially for web services, where the schema definition should be part
> of the service contract). If you want to allow for extensions, use an
> xs:any element as a wildcard that allows for other elements to be added
> in the future. Otherwise you're not actually following the schema, which
> defeats the whole purpose of having one in the first place.
>
>   - Dennis
>
> Dennis M. Sosnoski
> SOA and Web Services in Java
> Training and Consulting
> http://www.sosnoski.com - http://www.sosnoski.co.nz
> Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117
>
>
>
> Amila Suriarachchi wrote:
> > As I understood you are looking for an databinding framwork which does
> > not do any validation. try jaxb.
> >
> > On 4/16/07, *Josh* < gemini929@gmail.com <ma...@gmail.com>>
> > wrote:
> >
> >     Amila,
> >
> >     If I configure a databinding approach to work with the following
> XML:
> >
> >     <person>
> >         <firstName>John</firstName>
> >         <lastName>Doe</lastName>
> >     </person>
> >
> >     Which databinding approaches will not break if I pass in the
> >     following XML:
> >
> >     <person>
> >         <firstName>John</firstName>
> >         <lastName>Doe</lastName>
> >         <age>25</age>
> >         <sex>M</sex>
> >     </person>
> >
> >     While most client applications may not want to interpret the new
> >     information, I want to make sure that I can recommend a binding
> >     approach that does not cause a ripple effect when new items are
> >     added to the schema.  Does this clarify what I am looking for?
> >
> >     -Joshua
> >
> >
> >     On 4/16/07, *Amila Suriarachchi* <amilasuriarachchi@gmail.com
> >     <ma...@gmail.com>> wrote:
> >
> >
> >
> >         On 4/14/07, *Josh* <gemini929@gmail.com
> >         <ma...@gmail.com>> wrote:
> >
> >             All,
> >
> >             I am looking to determine which client side data binding
> >             choices (castor, jibx, jaxb etc) allow backwards
> >             compatible schema changes (eg addition of a new field)
> >             without throwing an exception.
> >
> >
> >         What you exactly mean by backword compatible schema?
> >         e g.  if you add a new element to a complex type with
> >         minOccurs 0 then this should work properly with  the requests
> >         you got earlier as well. But in this case it the way you write
> >         schema and it has nothing to do with the databinding frame
> >         work as far as it correctly interpret the schema.
> >
> >
> >             I am hoping to recommend some solutions to my clients that
> >             would allow me to make backward compatible schema changes
> >             without causing a ripple effect.  Has anyone come across
> >             this information?
> >
> >             Regards,
> >
> >             Joshua
> >
> >
> >
> >
> >         --
> >         Amila Suriarachchi,
> >         WSO2 Inc.
> >
> >
> >
> >
> >
> > --
> > Amila Suriarachchi,
> > WSO2 Inc.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
Amila Suriarachchi,
WSO2 Inc.

Re: Data binding frameworks that allow backwards compatible schema changes?

Posted by Dennis Sosnoski <dm...@sosnoski.com>.
JAXB 2.0 should do this, though I was unable to get JAXB to work with 
the Axis2 1.2RC1 WSDL2Java. Has anyone been successful in using JAXB 
with Axis2?

JiBX will also handle this. Unlike JAXB 2.0, with JiBX it's not the 
default behavior. In the JiBX binding you need to set flexible="true" on 
any <mapping> or <structure> element where you want to allow unknown 
elements.

In general it's not a good approach to do this kind of schema extension 
(especially for web services, where the schema definition should be part 
of the service contract). If you want to allow for extensions, use an 
xs:any element as a wildcard that allows for other elements to be added 
in the future. Otherwise you're not actually following the schema, which 
defeats the whole purpose of having one in the first place.

  - Dennis

Dennis M. Sosnoski
SOA and Web Services in Java
Training and Consulting
http://www.sosnoski.com - http://www.sosnoski.co.nz
Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117



Amila Suriarachchi wrote:
> As I understood you are looking for an databinding framwork which does 
> not do any validation. try jaxb.
>
> On 4/16/07, *Josh* < gemini929@gmail.com <ma...@gmail.com>> 
> wrote:
>
>     Amila,
>      
>     If I configure a databinding approach to work with the following XML:
>      
>     <person>
>         <firstName>John</firstName>
>         <lastName>Doe</lastName>
>     </person>
>      
>     Which databinding approaches will not break if I pass in the
>     following XML:
>      
>     <person>
>         <firstName>John</firstName>
>         <lastName>Doe</lastName>
>         <age>25</age>
>         <sex>M</sex>
>     </person>
>      
>     While most client applications may not want to interpret the new
>     information, I want to make sure that I can recommend a binding
>     approach that does not cause a ripple effect when new items are
>     added to the schema.  Does this clarify what I am looking for?
>      
>     -Joshua
>
>      
>     On 4/16/07, *Amila Suriarachchi* <amilasuriarachchi@gmail.com
>     <ma...@gmail.com>> wrote:
>
>
>
>         On 4/14/07, *Josh* <gemini929@gmail.com
>         <ma...@gmail.com>> wrote:
>
>             All,
>
>             I am looking to determine which client side data binding
>             choices (castor, jibx, jaxb etc) allow backwards
>             compatible schema changes (eg addition of a new field)
>             without throwing an exception. 
>
>
>         What you exactly mean by backword compatible schema?
>         e g.  if you add a new element to a complex type with
>         minOccurs 0 then this should work properly with  the requests
>         you got earlier as well. But in this case it the way you write
>         schema and it has nothing to do with the databinding frame
>         work as far as it correctly interpret the schema.
>          
>
>             I am hoping to recommend some solutions to my clients that
>             would allow me to make backward compatible schema changes
>             without causing a ripple effect.  Has anyone come across
>             this information?
>
>             Regards,
>
>             Joshua
>
>
>
>
>         -- 
>         Amila Suriarachchi,
>         WSO2 Inc. 
>
>
>
>
>
> -- 
> Amila Suriarachchi,
> WSO2 Inc. 

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


Re: Data binding frameworks that allow backwards compatible schema changes?

Posted by Amila Suriarachchi <am...@gmail.com>.
As I understood you are looking for an databinding framwork which does not
do any validation. try jaxb.

On 4/16/07, Josh <ge...@gmail.com> wrote:
>
> Amila,
>
> If I configure a databinding approach to work with the following XML:
>
> <person>
>     <firstName>John</firstName>
>     <lastName>Doe</lastName>
> </person>
>
> Which databinding approaches will not break if I pass in the following
> XML:
>
>  <person>
>     <firstName>John</firstName>
>     <lastName>Doe</lastName>
>     <age>25</age>
>     <sex>M</sex>
> </person>
>
> While most client applications may not want to interpret the new
> information, I want to make sure that I can recommend a binding approach
> that does not cause a ripple effect when new items are added to the schema.
> Does this clarify what I am looking for?
>
> -Joshua
>
>
> On 4/16/07, Amila Suriarachchi <am...@gmail.com> wrote:
> >
> >
> >
> > On 4/14/07, Josh <gemini929@gmail.com > wrote:
> > >
> > > All,
> > >
> > > I am looking to determine which client side data binding choices
> > > (castor, jibx, jaxb etc) allow backwards compatible schema changes (eg
> > > addition of a new field) without throwing an exception.
> > >
> >
> > What you exactly mean by backword compatible schema?
> > e g.  if you add a new element to a complex type with minOccurs 0 then
> > this should work properly with  the requests you got earlier as well. But in
> > this case it the way you write schema and it has nothing to do with the
> > databinding frame work as far as it correctly interpret the schema.
> >
> >
> >  I am hoping to recommend some solutions to my clients that would allow
> > > me to make backward compatible schema changes without causing a ripple
> > > effect.  Has anyone come across this information?
> > >
> > > Regards,
> > >
> > > Joshua
> > >
> >
> >
> >
> > --
> > Amila Suriarachchi,
> > WSO2 Inc.
>
>
>


-- 
Amila Suriarachchi,
WSO2 Inc.

Re: Data binding frameworks that allow backwards compatible schema changes?

Posted by Josh <ge...@gmail.com>.
Amila,

If I configure a databinding approach to work with the following XML:

<person>
    <firstName>John</firstName>
    <lastName>Doe</lastName>
</person>

Which databinding approaches will not break if I pass in the following XML:

 <person>
    <firstName>John</firstName>
    <lastName>Doe</lastName>
    <age>25</age>
    <sex>M</sex>
</person>

While most client applications may not want to interpret the new
information, I want to make sure that I can recommend a binding approach
that does not cause a ripple effect when new items are added to the schema.
Does this clarify what I am looking for?

-Joshua


On 4/16/07, Amila Suriarachchi <am...@gmail.com> wrote:
>
>
>
> On 4/14/07, Josh <ge...@gmail.com> wrote:
> >
> > All,
> >
> > I am looking to determine which client side data binding choices
> > (castor, jibx, jaxb etc) allow backwards compatible schema changes (eg
> > addition of a new field) without throwing an exception.
> >
>
> What you exactly mean by backword compatible schema?
> e g.  if you add a new element to a complex type with minOccurs 0 then
> this should work properly with  the requests you got earlier as well. But in
> this case it the way you write schema and it has nothing to do with the
> databinding frame work as far as it correctly interpret the schema.
>
>
>  I am hoping to recommend some solutions to my clients that would allow me
> > to make backward compatible schema changes without causing a ripple effect.
> > Has anyone come across this information?
> >
> > Regards,
> >
> > Joshua
> >
>
>
>
> --
> Amila Suriarachchi,
> WSO2 Inc.

Re: Data binding frameworks that allow backwards compatible schema changes?

Posted by Amila Suriarachchi <am...@gmail.com>.
On 4/14/07, Josh <ge...@gmail.com> wrote:
>
> All,
>
> I am looking to determine which client side data binding choices (castor,
> jibx, jaxb etc) allow backwards compatible schema changes (eg addition of a
> new field) without throwing an exception.
>

What you exactly mean by backword compatible schema?
e g.  if you add a new element to a complex type with minOccurs 0 then this
should work properly with  the requests you got earlier as well. But in this
case it the way you write schema and it has nothing to do with the
databinding frame work as far as it correctly interpret the schema.

I am hoping to recommend some solutions to my clients that would allow me to
> make backward compatible schema changes without causing a ripple effect.
> Has anyone come across this information?
>
> Regards,
>
> Joshua
>



-- 
Amila Suriarachchi,
WSO2 Inc.