Hi

please see comments below

On Wed, Jul 6, 2011 at 12:01 AM, dponos <[email protected]> wrote:
>
> Sergey Beryozkin-5 wrote:
>>
>>
>>>
>>> FYI, I am not on version 2.4.0 yet, so I am not using the Transform
>>> feature.
>>> I am still using inTransformElements on the provider.  Not sure if that
>>> makes a difference for being able to use wildcards or not.
>>
>> Wildcards should be supported starting from CXF 2.2.7, even when
>> configuring providers directly, instead of
>> applying a feature, so please report a bug if you work with CXF 2.2.7+
>>
>> Thanks, Sergey
>>
>>
>
> I just verified that wildcards are working in version 2.2.7
>
> The project I am working on is using 2.2.6.
>
> To summarize, here is what I needed to do in order to successfully use
> generated classes from an XSD  as parameters in REST service methods :
>
> 1.  The Element should be defined something like :
>
> <xs:element name="fooType">
>    <xs:complextType>
>            .
>            .
>    </xs:complextType>
> </xs:element>
>
> as apposed to :
>
> <xs:complexType name="FooType">
>    .
>    .
> </xs:complexType>
> <xs:element name="foo" type="tns:FooType"/>
>
>
> This will result in the @XmlRootElement getting generated, which is needed
> for the Class to exist
> as a paramter in the REST API method signature.
>
>
> 2. Add the following to the inTransformElements property for the provider
> (Spring example).....
>
> <entry key="*" value="{http://somevalue}*"; />
>
> 3.  Make sure I am using version 2.2.7+ of the cxf-bundle.
>
>
Configuring JAXB or JSON providers to work with types such as Foo
without @XmlRootElement (jaxbElementMap property or 'widlcard'
marshalAsJaxbElement/unmarshalAsJaxbElement properties) and applying
Transform feature should work starting from 2.4.0/2.3.5. I'm pretty
sure I fixed the issue to do with Transform feature not working with
JAXBElements.
If using anonymous complex types is possible then things are OK,
otherwise a bit more help from the runtime may be needed...

thanks, Sergey

Reply via email to