On Sep 2, 2014, at 9:48 AM, Sunil Bapat <[email protected]> wrote:

> No. We are using document/literal style. Will this fix change
> document/literal  behavior as well?

No.  This was just for RPC/Lit due to some vagueness in the spec and various 
implementations doing different things.


I’m not sure how this would have ever worked with 2.6.8 either.   In both 
cases, JAXB should have been completely rejecting the form that doesn’t match 
the schema (likely the one with namespaces).   More specifically, by default, 
it should throw an exception.   If you have a jaxb ValidationEventHandler setup 
(or turned off), it shouldn’t throw an exception, but it could then ignore the 
unknown elements and leave them as null.    It sounds like that’s what it’s 
doing now for you.

If you need this to work, I would suggest looking in the TransformationFeature:
http://cxf.apache.org/docs/transformationfeature.html

to manipulate the namespaces and such on the elements to match what JAXB is 
expecting.   That said, if clients are not generating requests that match the 
Schema, those clients should get fixed.


Dan




>> 2014-08-29 16:02 GMT+02:00 Sunil Bapat <[email protected]>:
>>> We upgraded from CXF 2.6.8 to 2.7.11, and are running into issues where
>> the
>>> web service parameters are coming in as null in 2.7.11, where they used
>> to
>>> work in 2.6.8.
>>> 
>>> In the WSDL (code first), the schema is defined with
>>> elementFormDefault="unqualified" and attributeFormDefault="unqualified".
>>> There is no namespace defined for @WebParam.
>>> 
>>> In 2.6.8, we could send in SOAP requests with namespaces in the params or
>>> without.
>>> e.g. Here's are the corresponding request snippets for the webparam
>>> elements.
>>> <xyz:getData> without namespaces in params
>>> <getData xmlns="http://test.com";> with namespaces in params
>>> 
>>> We have multiple clients to these web services, which sent either of
>> these
>>> types of request, and both worked in 2.6.8. In 2.7.11, only the requests
>>> without param namespaces works. The requests with param namespaces result
>>> in null parameters in the web service.
>>> 
>>> Looking at the discussions below , it appears that it is not supposed to
>>> work both ways. Is that correct?
>>> 
>> http://cxf.547215.n5.nabble.com/Figuring-out-why-params-turn-to-null-td562045.html
>>> 
>> http://cxf.547215.n5.nabble.com/UnmarshallingExceptions-after-upgrading-to-cxf-2-7-10-td5742636.html
>>> 
>>> Has the behavior changed between these versions? Is it a bug that it
>> worked
>>> with or without param namespaces, or was that the expected behavior in
>>> 2.6.8? Is there any way we can configure 2.7.11, such that both requests
>>> will continue to work as before?
>>> 
>>> We tried adding namespaces to the @WebParam, then it worked for a request
>>> with namespaces in the param, but not without.
>>> 
>>> We tried a simple HelloWorld service, and that works both ways in 2.7.11.
>>> However none of our real services work in 2.7.11. Any ideas or
>> suggestions
>>> as to what we can debug or configure?
>>> 
>>> Thanks
>> 

-- 
Daniel Kulp
[email protected] - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com

Reply via email to