users@jaxb.java.net

Re: Additional attr/element after xjc generation

From: Iaroslav Savytskyi <iaroslav.savytskyi_at_oracle.com>
Date: Thu, 08 Aug 2013 14:24:43 +0200

Hi, /kso,

1. From JAXB point of view if you add attribute to schema you will not
have an error. But sure you will not be able to access this attribute
until you run XJC again.

2. I expect you can regen your service on demand. For more JAX-WS
specific details I'll forward your email to JAX-WS mailing list.

--
Best regards.
Iaroslav
On 06/08/13 19:28, koberoi_at_mac.com wrote:
> I'm new to JAXB, so feel free to point me to documentation / other
> resources. I'm trying to understand if JAXB apis allow us to handle the
> following usecase:
>
> A. SOAP (WSDL/XSD) service exists
> B. Generate Java classes via xjc
> C. XSD in SOAP Service (#A above) gets a new attribute
>
> Couple questions:
>
> 1. Would this through an error since the schema had changed?  Or does
> this depend on disabling validation during unmarshalling?
>
> 2. Is there a way to access the new attribute in Java w/o
> regen/redeploy?  e.g. customize generated java classes to have a map
> attribute and have a custom unmarshaller / marshaller for any new
> attributes that may come in after step B (above).
>
> Thanks!
>
> /kso
>