You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Henk Flipman <hf...@gmail.com> on 2010/03/19 19:48:24 UTC

How to deal with an updated WSDL

Hi,

a customer of mine has updated their WSDL by adding an attribute to an existing data type. But they do not want to build a new client (yet). And so now they get:

[javax.xml.bind.UnmarshalException: unexpected element (uri:"", local:"totalCONVServices"). Expected elements are <{}roundTrip>,<{}totalServices>,<{}totalHSDServices>,<{}totalVIDEOServices>,<{}returnString>,<{}totalISPTokens>,<{}serviceList>,<{}securityKeys>,<{}totalCommercialServices>,<{}returnCode>,<{}totalResidentialServices>]
        at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.handleStreamException(UnmarshallerImpl.java:425)
        at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:362)
        at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:339)
        at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:749)
        at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:623)
        at org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:128)

Can I disable this type of validation?

Thanks.

Henk

Re: How to deal with an updated WSDL

Posted by Henk Flipman <hf...@gmail.com>.
Great! Thanks.

Henk

On Mar 19, 2010, at 8:38 PM, Daniel Kulp wrote:

> On Friday 19 March 2010 11:25:50 pm Henk Flipman wrote:
>> Thanks, Dan. I'm using 2.2.5. So am I out of luck then?
> 
> Looks like the property is in 2.2.5 as well:
> 
> 
> http://svn.apache.org/repos/asf/cxf/tags/cxf-2.2.5/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/DataReaderImpl.java
> 
> Dan
> 
> 
>> 
>> Thanks.
>> 
>> Henk
>> 
>> On Mar 19, 2010, at 8:10 PM, Daniel Kulp wrote:
>>> With 2.2.7 (voting on now), you can add a property of:
>>> 
>>> set-jaxb-validation-event-handler  "false"
>>> 
>>> to the endpoint definition or the clients request context to turn off
>>> adding the validation event handler that catches this.   That MAY work
>>> with 2.2.6 as well, I don't really remember.   With 2.2.6, it may need
>>> to be the Boolean FALSE object, not the string "false".
>>> 
>>> Dan
>>> 
>>> On Friday 19 March 2010 2:48:24 pm Henk Flipman wrote:
>>>> Hi,
>>>> 
>>>> a customer of mine has updated their WSDL by adding an attribute to an
>>>> existing data type. But they do not want to build a new client (yet).
>>>> And so now they get:
>>>> 
>>>> [javax.xml.bind.UnmarshalException: unexpected element (uri:"",
>>>> local:"totalCONVServices"). Expected elements are
>>>> <{}roundTrip>,<{}totalServices>,<{}totalHSDServices>,<{}totalVIDEOServic
>>>> es
>>>> 
>>>>> ,<{}returnString>,<{}totalISPTokens>,<{}serviceList>,<{}securityKeys>,<
>>>>> {}t
>>>> 
>>>> otalCommercialServices>,<{}returnCode>,<{}totalResidentialServices>] at
>>>> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.handleStreamEx
>>>> ce ption(UnmarshallerImpl.java:425) at
>>>> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(Unm
>>>> ar shallerImpl.java:362) at
>>>> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(Unma
>>>> rs hallerImpl.java:339) at
>>>> org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.jav
>>>> a: 749) at
>>>> org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.jav
>>>> a: 623) at
>>>> org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:128)
>>>> 
>>>> Can I disable this type of validation?
>>>> 
>>>> Thanks.
>>>> 
>>>> Henk
> 
> -- 
> Daniel Kulp
> dkulp@apache.org
> http://dankulp.com/blog


Re: How to deal with an updated WSDL

Posted by Daniel Kulp <dk...@apache.org>.
On Friday 19 March 2010 11:25:50 pm Henk Flipman wrote:
> Thanks, Dan. I'm using 2.2.5. So am I out of luck then?

Looks like the property is in 2.2.5 as well:


http://svn.apache.org/repos/asf/cxf/tags/cxf-2.2.5/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/DataReaderImpl.java

Dan


> 
> Thanks.
> 
> Henk
> 
> On Mar 19, 2010, at 8:10 PM, Daniel Kulp wrote:
> > With 2.2.7 (voting on now), you can add a property of:
> > 
> > set-jaxb-validation-event-handler  "false"
> > 
> > to the endpoint definition or the clients request context to turn off
> > adding the validation event handler that catches this.   That MAY work
> > with 2.2.6 as well, I don't really remember.   With 2.2.6, it may need
> > to be the Boolean FALSE object, not the string "false".
> > 
> > Dan
> > 
> > On Friday 19 March 2010 2:48:24 pm Henk Flipman wrote:
> >> Hi,
> >> 
> >> a customer of mine has updated their WSDL by adding an attribute to an
> >> existing data type. But they do not want to build a new client (yet).
> >> And so now they get:
> >> 
> >> [javax.xml.bind.UnmarshalException: unexpected element (uri:"",
> >> local:"totalCONVServices"). Expected elements are
> >> <{}roundTrip>,<{}totalServices>,<{}totalHSDServices>,<{}totalVIDEOServic
> >> es
> >> 
> >>> ,<{}returnString>,<{}totalISPTokens>,<{}serviceList>,<{}securityKeys>,<
> >>> {}t
> >> 
> >> otalCommercialServices>,<{}returnCode>,<{}totalResidentialServices>] at
> >> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.handleStreamEx
> >> ce ption(UnmarshallerImpl.java:425) at
> >> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(Unm
> >> ar shallerImpl.java:362) at
> >> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(Unma
> >> rs hallerImpl.java:339) at
> >> org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.jav
> >> a: 749) at
> >> org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.jav
> >> a: 623) at
> >> org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:128)
> >> 
> >> Can I disable this type of validation?
> >> 
> >> Thanks.
> >> 
> >> Henk

-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog

Re: How to deal with an updated WSDL

Posted by Henk Flipman <hf...@gmail.com>.
Thanks, Dan. I'm using 2.2.5. So am I out of luck then?

Thanks.

Henk

On Mar 19, 2010, at 8:10 PM, Daniel Kulp wrote:

> 
> With 2.2.7 (voting on now), you can add a property of:
> 
> set-jaxb-validation-event-handler  "false"
> 
> to the endpoint definition or the clients request context to turn off adding 
> the validation event handler that catches this.   That MAY work with 2.2.6 as 
> well, I don't really remember.   With 2.2.6, it may need to be the Boolean 
> FALSE object, not the string "false".
> 
> Dan
> 
> 
> On Friday 19 March 2010 2:48:24 pm Henk Flipman wrote:
>> Hi,
>> 
>> a customer of mine has updated their WSDL by adding an attribute to an
>> existing data type. But they do not want to build a new client (yet). And
>> so now they get:
>> 
>> [javax.xml.bind.UnmarshalException: unexpected element (uri:"",
>> local:"totalCONVServices"). Expected elements are
>> <{}roundTrip>,<{}totalServices>,<{}totalHSDServices>,<{}totalVIDEOServices
>>> ,<{}returnString>,<{}totalISPTokens>,<{}serviceList>,<{}securityKeys>,<{}t
>> otalCommercialServices>,<{}returnCode>,<{}totalResidentialServices>] at
>> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.handleStreamExce
>> ption(UnmarshallerImpl.java:425) at
>> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(Unmar
>> shallerImpl.java:362) at
>> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(Unmars
>> hallerImpl.java:339) at
>> org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:
>> 749) at
>> org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:
>> 623) at org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:128)
>> 
>> Can I disable this type of validation?
>> 
>> Thanks.
>> 
>> Henk
> 
> -- 
> Daniel Kulp
> dkulp@apache.org
> http://dankulp.com/blog


Re: How to deal with an updated WSDL

Posted by Daniel Kulp <dk...@apache.org>.
With 2.2.7 (voting on now), you can add a property of:

set-jaxb-validation-event-handler  "false"

to the endpoint definition or the clients request context to turn off adding 
the validation event handler that catches this.   That MAY work with 2.2.6 as 
well, I don't really remember.   With 2.2.6, it may need to be the Boolean 
FALSE object, not the string "false".

Dan


On Friday 19 March 2010 2:48:24 pm Henk Flipman wrote:
> Hi,
> 
> a customer of mine has updated their WSDL by adding an attribute to an
> existing data type. But they do not want to build a new client (yet). And
> so now they get:
> 
> [javax.xml.bind.UnmarshalException: unexpected element (uri:"",
> local:"totalCONVServices"). Expected elements are
> <{}roundTrip>,<{}totalServices>,<{}totalHSDServices>,<{}totalVIDEOServices
> >,<{}returnString>,<{}totalISPTokens>,<{}serviceList>,<{}securityKeys>,<{}t
> otalCommercialServices>,<{}returnCode>,<{}totalResidentialServices>] at
> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.handleStreamExce
> ption(UnmarshallerImpl.java:425) at
> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(Unmar
> shallerImpl.java:362) at
> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(Unmars
> hallerImpl.java:339) at
> org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:
> 749) at
> org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:
> 623) at org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:128)
> 
> Can I disable this type of validation?
> 
> Thanks.
> 
> Henk

-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog