You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by Sergey Beryozkin <sb...@progress.com> on 2009/06/17 14:19:44 UTC

JAXRS : issues with AegisProvider

Hi,

I'm seeing problems with the JAXRS AegisElementProvider producing/consuming complex types like Maps.
I'm nearly done with making a basic end to end JAX-RS demo working n DOSGi, the immediate problem is that
a client proxy fails to consume the following somewhat complicated Aegis-produced response (Map<String, String>) :

<ns1:anyType2anyTypeMap xmlns:ns1="urn:org.apache.cxf.aegis.types"><ns1:entry><ns1:key xmlns:ns2="http://rest.greeter.samples.dosgi.cxf.apache.org" xmlns:ns3="http://www.w3.org/2001/XMLSchema-instance" ns3:type="ns2:GreetingPhrase"><ns2:phrase>Bonjour</ns2:phrase></ns1:key><ns1:value xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns2="http://www.w3.org/2001/XMLSchema-instance" ns2:type="xsd:string">Fred</ns1:value></ns1:entry><ns1:entry><ns1:key xmlns:ns2="http://rest.greeter.samples.dosgi.cxf.apache.org" xmlns:ns3="http://www.w3.org/2001/XMLSchema-instance" ns3:type="ns2:GreetingPhrase"><ns2:phrase>Hoi</ns2:phrase></ns1:key><ns1:value xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns2="http://www.w3.org/2001/XMLSchema-instance" ns2:type="xsd:string">Fred</ns1:value></ns1:entry><ns1:entry><ns1:key xmlns:ns2="http://rest.greeter.samples.dosgi.cxf.apache.org" xmlns:ns3="http://www.w3.org/2001/XMLSchema-instance" ns3:type="ns2:GreetingPhrase"><ns2:phrase>Hola</ns2:phrase></ns1:key><ns1:value xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns2="http://www.w3.org/2001/XMLSchema-instance" ns2:type="xsd:string">Fred</ns1:value></ns1:entry><ns1:entry><ns1:key xmlns:ns2="http://rest.greeter.samples.dosgi.cxf.apache.org" xmlns:ns3="http://www.w3.org/2001/XMLSchema-instance" ns3:type="ns2:GreetingPhrase"><ns2:phrase>Hello</ns2:phrase></ns1:key><ns1:value xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns2="http://www.w3.org/2001/XMLSchema-instance" ns2:type="xsd:string">Fred</ns1:value></ns1:entry></ns1:anyType2anyTypeMap>

it complains no type mapping is found

I've run a simple frontend based demo and the same Map is serialized as

<ns1:greetMeResponse xmlns:ns1="http://greeter.samples.dosgi.cxf.apache.org/"><ns1:return><ns1:entry><ns1:key><ns2:phrase xmlns:ns2="http://greeter.samples.dosgi.cxf.apache.org">Bonjour</ns2:phrase></ns1:key><ns1:value>Fred</ns1:value></ns1:entry><ns1:entry><ns1:key><ns2:phrase xmlns:ns2="http://greeter.samples.dosgi.cxf.apache.org">Hoi</ns2:phrase></ns1:key><ns1:value>Fred</ns1:value></ns1:entry><ns1:entry><ns1:key><ns2:phrase xmlns:ns2="http://greeter.samples.dosgi.cxf.apache.org">Hola</ns2:phrase></ns1:key><ns1:value>Fred</ns1:value></ns1:entry><ns1:entry><ns1:key><ns2:phrase xmlns:ns2="http://greeter.samples.dosgi.cxf.apache.org">Hello</ns2:phrase></ns1:key><ns1:value>Fred</ns1:value></ns1:entry></ns1:return></ns1:greetMeResponse>

So is it possible to simplify the serialization somehow when Aegis is used by JAXRS ? If not then how can I make the above map being deserialized on the client side ? Benson, do you reckon it is even possible for Map ?

thanks, Sergey

Re: JAXRS : issues with AegisProvider

Posted by Benson Margulies <bi...@gmail.com>.
The 'any' in the map means that somehow Aegis is not finding type
information for the map element type. If you set up some sort of test case
and check it in with @Ignore, and make a JIRA, and assign it to me :-) I can
probably fix it.

On Wed, Jun 17, 2009 at 8:19 AM, Sergey Beryozkin <sb...@progress.com>wrote:

> Hi,
>
> I'm seeing problems with the JAXRS AegisElementProvider producing/consuming
> complex types like Maps.
> I'm nearly done with making a basic end to end JAX-RS demo working n DOSGi,
> the immediate problem is that
> a client proxy fails to consume the following somewhat complicated
> Aegis-produced response (Map<String, String>) :
>
> <ns1:anyType2anyTypeMap
> xmlns:ns1="urn:org.apache.cxf.aegis.types"><ns1:entry><ns1:key xmlns:ns2="
> http://rest.greeter.samples.dosgi.cxf.apache.org" xmlns:ns3="
> http://www.w3.org/2001/XMLSchema-instance"
> ns3:type="ns2:GreetingPhrase"><ns2:phrase>Bonjour</ns2:phrase></ns1:key><ns1:value
> xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns2="
> http://www.w3.org/2001/XMLSchema-instance"
> ns2:type="xsd:string">Fred</ns1:value></ns1:entry><ns1:entry><ns1:key
> xmlns:ns2="http://rest.greeter.samples.dosgi.cxf.apache.org" xmlns:ns3="
> http://www.w3.org/2001/XMLSchema-instance"
> ns3:type="ns2:GreetingPhrase"><ns2:phrase>Hoi</ns2:phrase></ns1:key><ns1:value
> xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns2="
> http://www.w3.org/2001/XMLSchema-instance"
> ns2:type="xsd:string">Fred</ns1:value></ns1:entry><ns1:entry><ns1:key
> xmlns:ns2="http://rest.greeter.samples.dosgi.cxf.apache.org" xmlns:ns3="
> http://www.w3.org/2001/XMLSchema-instance"
> ns3:type="ns2:GreetingPhrase"><ns2:phrase>Hola</ns2:phrase></ns1:key><ns1:value
> xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns2="
> http://www.w3.org/2001/XMLSchema-instance"
> ns2:type="xsd:string">Fred</ns1:value></ns1:entry><ns1:entry><ns1:key
> xmlns:ns2="http://rest.greeter.samples.dosgi.cxf.apache.org" xmlns:ns3="
> http://www.w3.org/2001/XMLSchema-instance"
> ns3:type="ns2:GreetingPhrase"><ns2:phrase>Hello</ns2:phrase></ns1:key><ns1:value
> xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns2="
> http://www.w3.org/2001/XMLSchema-instance"
> ns2:type="xsd:string">Fred</ns1:value></ns1:entry></ns1:anyType2anyTypeMap>
>
> it complains no type mapping is found
>
> I've run a simple frontend based demo and the same Map is serialized as
>
> <ns1:greetMeResponse xmlns:ns1="
> http://greeter.samples.dosgi.cxf.apache.org/"><ns1:return><ns1:entry><ns1:key><ns2:phrase
> xmlns:ns2="http://greeter.samples.dosgi.cxf.apache.org">Bonjour</ns2:phrase></ns1:key><ns1:value>Fred</ns1:value></ns1:entry><ns1:entry><ns1:key><ns2:phrase
> xmlns:ns2="http://greeter.samples.dosgi.cxf.apache.org">Hoi</ns2:phrase></ns1:key><ns1:value>Fred</ns1:value></ns1:entry><ns1:entry><ns1:key><ns2:phrase
> xmlns:ns2="http://greeter.samples.dosgi.cxf.apache.org">Hola</ns2:phrase></ns1:key><ns1:value>Fred</ns1:value></ns1:entry><ns1:entry><ns1:key><ns2:phrase
> xmlns:ns2="http://greeter.samples.dosgi.cxf.apache.org
> ">Hello</ns2:phrase></ns1:key><ns1:value>Fred</ns1:value></ns1:entry></ns1:return></ns1:greetMeResponse>
>
> So is it possible to simplify the serialization somehow when Aegis is used
> by JAXRS ? If not then how can I make the above map being deserialized on
> the client side ? Benson, do you reckon it is even possible for Map ?
>
> thanks, Sergey
>

Re: JAXRS : issues with AegisProvider

Posted by Benson Margulies <bi...@gmail.com>.
Sergey,

My memory of how all this is supposed to work isn't good enough.

In your failing test case, the problem starts with ...

WARNING: xsi:type="{http://fortest.jaxrs.cxf.apache.org}AegisTestBean" was
specified, but no corresponding Type was registered; no default.

For this to work, somehow the Aegis context has to be aware of this type. As
the test case is structured, the only type it has access to is Map. No
annotations, no generic arguments.

You can't get a class reference for a generic type due to type erasure.
Aegis handles parameterized types by using reflection on parameters and
fields. The null 'type' argument is going to have to have something in it.



On Wed, Jun 17, 2009 at 10:24 AM, Sergey Beryozkin <sb...@progress.com>wrote:

> I created two JIRAs - please have a look at them whenever you get a chance
> - they don't block me at the moment
>
> https://issues.apache.org/jira/browse/CXF-2296
> https://issues.apache.org/jira/browse/CXF-2297
>
> thanks, Sergey
>
>
>
> ----- Original Message ----- From: "Sergey Beryozkin" <
> sberyozk@progress.com>
> To: <de...@cxf.apache.org>
> Sent: Wednesday, June 17, 2009 2:42 PM
>
> Subject: Re: JAXRS : issues with AegisProvider
>
>
>  Hi Benson - I just sent a followup email at the same time you replied :-),
>> I'll create a JIRA shortly,
>>
>> thanks, Sergey
>>
>> ----- Original Message ----- From: "Benson Margulies" <
>> bimargulies@gmail.com>
>> To: <de...@cxf.apache.org>
>> Sent: Wednesday, June 17, 2009 2:10 PM
>> Subject: Re: JAXRS : issues with AegisProvider
>>
>>
>>  Like I said. Given my current level of load, if you tee it up, I'll try
>>> to
>>> knock it down. But I need something that misbehaves. I'm sorry to have to
>>> ask for that silver platter.
>>>
>>> On Wed, Jun 17, 2009 at 8:43 AM, Sergey Beryozkin <sberyozk@progress.com
>>> >wrote:
>>>
>>>  For the purpose of the demo I introduced a wrapper around the
>>>> Map<GreetingPhrase, String> and it works nicely, but I'd appreciate any
>>>> help
>>>> in getting to the bottom of the problem I described below.
>>>>
>>>> thanks, Sergey
>>>>
>>>> ----- Original Message ----- From: "Sergey Beryozkin" <
>>>> sberyozk@progress.com>
>>>> To: <de...@cxf.apache.org>
>>>> Sent: Wednesday, June 17, 2009 1:19 PM
>>>> Subject: JAXRS : issues with AegisProvider
>>>>
>>>>
>>>>
>>>> Hi,
>>>>
>>>> I'm seeing problems with the JAXRS AegisElementProvider
>>>> producing/consuming
>>>> complex types like Maps.
>>>> I'm nearly done with making a basic end to end JAX-RS demo working n
>>>> DOSGi,
>>>> the immediate problem is that
>>>> a client proxy fails to consume the following somewhat complicated
>>>> Aegis-produced response (Map<String, String>) :
>>>>
>>>> <ns1:anyType2anyTypeMap
>>>> xmlns:ns1="urn:org.apache.cxf.aegis.types"><ns1:entry><ns1:key
>>>> xmlns:ns2="
>>>> http://rest.greeter.samples.dosgi.cxf.apache.org" xmlns:ns3="
>>>> http://www.w3.org/2001/XMLSchema-instance"
>>>>
>>>> ns3:type="ns2:GreetingPhrase"><ns2:phrase>Bonjour</ns2:phrase></ns1:key><ns1:value
>>>> xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns2="
>>>> http://www.w3.org/2001/XMLSchema-instance"
>>>> ns2:type="xsd:string">Fred</ns1:value></ns1:entry><ns1:entry><ns1:key
>>>> xmlns:ns2="http://rest.greeter.samples.dosgi.cxf.apache.org"
>>>> xmlns:ns3="
>>>> http://www.w3.org/2001/XMLSchema-instance"
>>>>
>>>> ns3:type="ns2:GreetingPhrase"><ns2:phrase>Hoi</ns2:phrase></ns1:key><ns1:value
>>>> xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns2="
>>>> http://www.w3.org/2001/XMLSchema-instance"
>>>> ns2:type="xsd:string">Fred</ns1:value></ns1:entry><ns1:entry><ns1:key
>>>> xmlns:ns2="http://rest.greeter.samples.dosgi.cxf.apache.org"
>>>> xmlns:ns3="
>>>> http://www.w3.org/2001/XMLSchema-instance"
>>>>
>>>> ns3:type="ns2:GreetingPhrase"><ns2:phrase>Hola</ns2:phrase></ns1:key><ns1:value
>>>> xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns2="
>>>> http://www.w3.org/2001/XMLSchema-instance"
>>>> ns2:type="xsd:string">Fred</ns1:value></ns1:entry><ns1:entry><ns1:key
>>>> xmlns:ns2="http://rest.greeter.samples.dosgi.cxf.apache.org"
>>>> xmlns:ns3="
>>>> http://www.w3.org/2001/XMLSchema-instance"
>>>>
>>>> ns3:type="ns2:GreetingPhrase"><ns2:phrase>Hello</ns2:phrase></ns1:key><ns1:value
>>>> xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns2="
>>>> http://www.w3.org/2001/XMLSchema-instance"
>>>>
>>>> ns2:type="xsd:string">Fred</ns1:value></ns1:entry></ns1:anyType2anyTypeMap>
>>>>
>>>> it complains no type mapping is found
>>>>
>>>> I've run a simple frontend based demo and the same Map is serialized as
>>>>
>>>> <ns1:greetMeResponse xmlns:ns1="
>>>> http://greeter.samples.dosgi.cxf.apache.org/
>>>> "><ns1:return><ns1:entry><ns1:key><ns2:phrase
>>>> xmlns:ns2="http://greeter.samples.dosgi.cxf.apache.org
>>>> ">Bonjour</ns2:phrase></ns1:key><ns1:value>Fred</ns1:value></ns1:entry><ns1:entry><ns1:key><ns2:phrase
>>>> xmlns:ns2="http://greeter.samples.dosgi.cxf.apache.org
>>>> ">Hoi</ns2:phrase></ns1:key><ns1:value>Fred</ns1:value></ns1:entry><ns1:entry><ns1:key><ns2:phrase
>>>> xmlns:ns2="http://greeter.samples.dosgi.cxf.apache.org
>>>> ">Hola</ns2:phrase></ns1:key><ns1:value>Fred</ns1:value></ns1:entry><ns1:entry><ns1:key><ns2:phrase
>>>> xmlns:ns2="http://greeter.samples.dosgi.cxf.apache.org
>>>>
>>>> ">Hello</ns2:phrase></ns1:key><ns1:value>Fred</ns1:value></ns1:entry></ns1:return></ns1:greetMeResponse>
>>>>
>>>> So is it possible to simplify the serialization somehow when Aegis is
>>>> used
>>>> by JAXRS ? If not then how can I make the above map being deserialized
>>>> on
>>>> the client side ? Benson, do you reckon it is even possible for Map ?
>>>>
>>>> thanks, Sergey
>>>>
>>>>
>>>>
>>>
>>
>

Re: JAXRS : issues with AegisProvider

Posted by Sergey Beryozkin <sb...@progress.com>.
I created two JIRAs - please have a look at them whenever you get a chance - they don't block me at the moment

https://issues.apache.org/jira/browse/CXF-2296
https://issues.apache.org/jira/browse/CXF-2297

thanks, Sergey



----- Original Message ----- 
From: "Sergey Beryozkin" <sb...@progress.com>
To: <de...@cxf.apache.org>
Sent: Wednesday, June 17, 2009 2:42 PM
Subject: Re: JAXRS : issues with AegisProvider


> Hi Benson - I just sent a followup email at the same time you replied :-), I'll create a JIRA shortly,
>
> thanks, Sergey
>
> ----- Original Message ----- 
> From: "Benson Margulies" <bi...@gmail.com>
> To: <de...@cxf.apache.org>
> Sent: Wednesday, June 17, 2009 2:10 PM
> Subject: Re: JAXRS : issues with AegisProvider
>
>
>> Like I said. Given my current level of load, if you tee it up, I'll try to
>> knock it down. But I need something that misbehaves. I'm sorry to have to
>> ask for that silver platter.
>>
>> On Wed, Jun 17, 2009 at 8:43 AM, Sergey Beryozkin <sb...@progress.com>wrote:
>>
>>> For the purpose of the demo I introduced a wrapper around the
>>> Map<GreetingPhrase, String> and it works nicely, but I'd appreciate any help
>>> in getting to the bottom of the problem I described below.
>>>
>>> thanks, Sergey
>>>
>>> ----- Original Message ----- From: "Sergey Beryozkin" <
>>> sberyozk@progress.com>
>>> To: <de...@cxf.apache.org>
>>> Sent: Wednesday, June 17, 2009 1:19 PM
>>> Subject: JAXRS : issues with AegisProvider
>>>
>>>
>>>
>>> Hi,
>>>
>>> I'm seeing problems with the JAXRS AegisElementProvider producing/consuming
>>> complex types like Maps.
>>> I'm nearly done with making a basic end to end JAX-RS demo working n DOSGi,
>>> the immediate problem is that
>>> a client proxy fails to consume the following somewhat complicated
>>> Aegis-produced response (Map<String, String>) :
>>>
>>> <ns1:anyType2anyTypeMap
>>> xmlns:ns1="urn:org.apache.cxf.aegis.types"><ns1:entry><ns1:key xmlns:ns2="
>>> http://rest.greeter.samples.dosgi.cxf.apache.org" xmlns:ns3="
>>> http://www.w3.org/2001/XMLSchema-instance"
>>> ns3:type="ns2:GreetingPhrase"><ns2:phrase>Bonjour</ns2:phrase></ns1:key><ns1:value
>>> xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns2="
>>> http://www.w3.org/2001/XMLSchema-instance"
>>> ns2:type="xsd:string">Fred</ns1:value></ns1:entry><ns1:entry><ns1:key
>>> xmlns:ns2="http://rest.greeter.samples.dosgi.cxf.apache.org" xmlns:ns3="
>>> http://www.w3.org/2001/XMLSchema-instance"
>>> ns3:type="ns2:GreetingPhrase"><ns2:phrase>Hoi</ns2:phrase></ns1:key><ns1:value
>>> xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns2="
>>> http://www.w3.org/2001/XMLSchema-instance"
>>> ns2:type="xsd:string">Fred</ns1:value></ns1:entry><ns1:entry><ns1:key
>>> xmlns:ns2="http://rest.greeter.samples.dosgi.cxf.apache.org" xmlns:ns3="
>>> http://www.w3.org/2001/XMLSchema-instance"
>>> ns3:type="ns2:GreetingPhrase"><ns2:phrase>Hola</ns2:phrase></ns1:key><ns1:value
>>> xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns2="
>>> http://www.w3.org/2001/XMLSchema-instance"
>>> ns2:type="xsd:string">Fred</ns1:value></ns1:entry><ns1:entry><ns1:key
>>> xmlns:ns2="http://rest.greeter.samples.dosgi.cxf.apache.org" xmlns:ns3="
>>> http://www.w3.org/2001/XMLSchema-instance"
>>> ns3:type="ns2:GreetingPhrase"><ns2:phrase>Hello</ns2:phrase></ns1:key><ns1:value
>>> xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns2="
>>> http://www.w3.org/2001/XMLSchema-instance"
>>> ns2:type="xsd:string">Fred</ns1:value></ns1:entry></ns1:anyType2anyTypeMap>
>>>
>>> it complains no type mapping is found
>>>
>>> I've run a simple frontend based demo and the same Map is serialized as
>>>
>>> <ns1:greetMeResponse xmlns:ns1="
>>> http://greeter.samples.dosgi.cxf.apache.org/"><ns1:return><ns1:entry><ns1:key><ns2:phrase
>>> xmlns:ns2="http://greeter.samples.dosgi.cxf.apache.org">Bonjour</ns2:phrase></ns1:key><ns1:value>Fred</ns1:value></ns1:entry><ns1:entry><ns1:key><ns2:phrase
>>> xmlns:ns2="http://greeter.samples.dosgi.cxf.apache.org">Hoi</ns2:phrase></ns1:key><ns1:value>Fred</ns1:value></ns1:entry><ns1:entry><ns1:key><ns2:phrase
>>> xmlns:ns2="http://greeter.samples.dosgi.cxf.apache.org">Hola</ns2:phrase></ns1:key><ns1:value>Fred</ns1:value></ns1:entry><ns1:entry><ns1:key><ns2:phrase
>>> xmlns:ns2="http://greeter.samples.dosgi.cxf.apache.org
>>> ">Hello</ns2:phrase></ns1:key><ns1:value>Fred</ns1:value></ns1:entry></ns1:return></ns1:greetMeResponse>
>>>
>>> So is it possible to simplify the serialization somehow when Aegis is used
>>> by JAXRS ? If not then how can I make the above map being deserialized on
>>> the client side ? Benson, do you reckon it is even possible for Map ?
>>>
>>> thanks, Sergey
>>>
>>>
>>
> 


Re: JAXRS : issues with AegisProvider

Posted by Benson Margulies <bi...@gmail.com>.
Sergey,

I have a pretty good idea of the nature of the problem.

When Aegis is run with good-old-soap, various types from the SEI are pushed
into its view to start the process. We're not doing anything like this for
JAX-RS yet, I bet.

--benson


On Wed, Jun 17, 2009 at 9:42 AM, Sergey Beryozkin <sb...@progress.com>wrote:

> Hi Benson - I just sent a followup email at the same time you replied :-),
> I'll create a JIRA shortly,
>
> thanks, Sergey
>
> ----- Original Message ----- From: "Benson Margulies" <
> bimargulies@gmail.com>
> To: <de...@cxf.apache.org>
> Sent: Wednesday, June 17, 2009 2:10 PM
> Subject: Re: JAXRS : issues with AegisProvider
>
>
>
>  Like I said. Given my current level of load, if you tee it up, I'll try to
>> knock it down. But I need something that misbehaves. I'm sorry to have to
>> ask for that silver platter.
>>
>> On Wed, Jun 17, 2009 at 8:43 AM, Sergey Beryozkin <sberyozk@progress.com
>> >wrote:
>>
>>  For the purpose of the demo I introduced a wrapper around the
>>> Map<GreetingPhrase, String> and it works nicely, but I'd appreciate any
>>> help
>>> in getting to the bottom of the problem I described below.
>>>
>>> thanks, Sergey
>>>
>>> ----- Original Message ----- From: "Sergey Beryozkin" <
>>> sberyozk@progress.com>
>>> To: <de...@cxf.apache.org>
>>> Sent: Wednesday, June 17, 2009 1:19 PM
>>> Subject: JAXRS : issues with AegisProvider
>>>
>>>
>>>
>>> Hi,
>>>
>>> I'm seeing problems with the JAXRS AegisElementProvider
>>> producing/consuming
>>> complex types like Maps.
>>> I'm nearly done with making a basic end to end JAX-RS demo working n
>>> DOSGi,
>>> the immediate problem is that
>>> a client proxy fails to consume the following somewhat complicated
>>> Aegis-produced response (Map<String, String>) :
>>>
>>> <ns1:anyType2anyTypeMap
>>> xmlns:ns1="urn:org.apache.cxf.aegis.types"><ns1:entry><ns1:key
>>> xmlns:ns2="
>>> http://rest.greeter.samples.dosgi.cxf.apache.org" xmlns:ns3="
>>> http://www.w3.org/2001/XMLSchema-instance"
>>>
>>> ns3:type="ns2:GreetingPhrase"><ns2:phrase>Bonjour</ns2:phrase></ns1:key><ns1:value
>>> xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns2="
>>> http://www.w3.org/2001/XMLSchema-instance"
>>> ns2:type="xsd:string">Fred</ns1:value></ns1:entry><ns1:entry><ns1:key
>>> xmlns:ns2="http://rest.greeter.samples.dosgi.cxf.apache.org" xmlns:ns3="
>>> http://www.w3.org/2001/XMLSchema-instance"
>>>
>>> ns3:type="ns2:GreetingPhrase"><ns2:phrase>Hoi</ns2:phrase></ns1:key><ns1:value
>>> xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns2="
>>> http://www.w3.org/2001/XMLSchema-instance"
>>> ns2:type="xsd:string">Fred</ns1:value></ns1:entry><ns1:entry><ns1:key
>>> xmlns:ns2="http://rest.greeter.samples.dosgi.cxf.apache.org" xmlns:ns3="
>>> http://www.w3.org/2001/XMLSchema-instance"
>>>
>>> ns3:type="ns2:GreetingPhrase"><ns2:phrase>Hola</ns2:phrase></ns1:key><ns1:value
>>> xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns2="
>>> http://www.w3.org/2001/XMLSchema-instance"
>>> ns2:type="xsd:string">Fred</ns1:value></ns1:entry><ns1:entry><ns1:key
>>> xmlns:ns2="http://rest.greeter.samples.dosgi.cxf.apache.org" xmlns:ns3="
>>> http://www.w3.org/2001/XMLSchema-instance"
>>>
>>> ns3:type="ns2:GreetingPhrase"><ns2:phrase>Hello</ns2:phrase></ns1:key><ns1:value
>>> xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns2="
>>> http://www.w3.org/2001/XMLSchema-instance"
>>>
>>> ns2:type="xsd:string">Fred</ns1:value></ns1:entry></ns1:anyType2anyTypeMap>
>>>
>>> it complains no type mapping is found
>>>
>>> I've run a simple frontend based demo and the same Map is serialized as
>>>
>>> <ns1:greetMeResponse xmlns:ns1="
>>> http://greeter.samples.dosgi.cxf.apache.org/
>>> "><ns1:return><ns1:entry><ns1:key><ns2:phrase
>>> xmlns:ns2="http://greeter.samples.dosgi.cxf.apache.org
>>> ">Bonjour</ns2:phrase></ns1:key><ns1:value>Fred</ns1:value></ns1:entry><ns1:entry><ns1:key><ns2:phrase
>>> xmlns:ns2="http://greeter.samples.dosgi.cxf.apache.org
>>> ">Hoi</ns2:phrase></ns1:key><ns1:value>Fred</ns1:value></ns1:entry><ns1:entry><ns1:key><ns2:phrase
>>> xmlns:ns2="http://greeter.samples.dosgi.cxf.apache.org
>>> ">Hola</ns2:phrase></ns1:key><ns1:value>Fred</ns1:value></ns1:entry><ns1:entry><ns1:key><ns2:phrase
>>> xmlns:ns2="http://greeter.samples.dosgi.cxf.apache.org
>>>
>>> ">Hello</ns2:phrase></ns1:key><ns1:value>Fred</ns1:value></ns1:entry></ns1:return></ns1:greetMeResponse>
>>>
>>> So is it possible to simplify the serialization somehow when Aegis is
>>> used
>>> by JAXRS ? If not then how can I make the above map being deserialized on
>>> the client side ? Benson, do you reckon it is even possible for Map ?
>>>
>>> thanks, Sergey
>>>
>>>
>>>
>>
>

Re: JAXRS : issues with AegisProvider

Posted by Sergey Beryozkin <sb...@progress.com>.
Hi Benson - I just sent a followup email at the same time you replied :-), I'll create a JIRA shortly,

thanks, Sergey

----- Original Message ----- 
From: "Benson Margulies" <bi...@gmail.com>
To: <de...@cxf.apache.org>
Sent: Wednesday, June 17, 2009 2:10 PM
Subject: Re: JAXRS : issues with AegisProvider


> Like I said. Given my current level of load, if you tee it up, I'll try to
> knock it down. But I need something that misbehaves. I'm sorry to have to
> ask for that silver platter.
>
> On Wed, Jun 17, 2009 at 8:43 AM, Sergey Beryozkin <sb...@progress.com>wrote:
>
>> For the purpose of the demo I introduced a wrapper around the
>> Map<GreetingPhrase, String> and it works nicely, but I'd appreciate any help
>> in getting to the bottom of the problem I described below.
>>
>> thanks, Sergey
>>
>> ----- Original Message ----- From: "Sergey Beryozkin" <
>> sberyozk@progress.com>
>> To: <de...@cxf.apache.org>
>> Sent: Wednesday, June 17, 2009 1:19 PM
>> Subject: JAXRS : issues with AegisProvider
>>
>>
>>
>> Hi,
>>
>> I'm seeing problems with the JAXRS AegisElementProvider producing/consuming
>> complex types like Maps.
>> I'm nearly done with making a basic end to end JAX-RS demo working n DOSGi,
>> the immediate problem is that
>> a client proxy fails to consume the following somewhat complicated
>> Aegis-produced response (Map<String, String>) :
>>
>> <ns1:anyType2anyTypeMap
>> xmlns:ns1="urn:org.apache.cxf.aegis.types"><ns1:entry><ns1:key xmlns:ns2="
>> http://rest.greeter.samples.dosgi.cxf.apache.org" xmlns:ns3="
>> http://www.w3.org/2001/XMLSchema-instance"
>> ns3:type="ns2:GreetingPhrase"><ns2:phrase>Bonjour</ns2:phrase></ns1:key><ns1:value
>> xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns2="
>> http://www.w3.org/2001/XMLSchema-instance"
>> ns2:type="xsd:string">Fred</ns1:value></ns1:entry><ns1:entry><ns1:key
>> xmlns:ns2="http://rest.greeter.samples.dosgi.cxf.apache.org" xmlns:ns3="
>> http://www.w3.org/2001/XMLSchema-instance"
>> ns3:type="ns2:GreetingPhrase"><ns2:phrase>Hoi</ns2:phrase></ns1:key><ns1:value
>> xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns2="
>> http://www.w3.org/2001/XMLSchema-instance"
>> ns2:type="xsd:string">Fred</ns1:value></ns1:entry><ns1:entry><ns1:key
>> xmlns:ns2="http://rest.greeter.samples.dosgi.cxf.apache.org" xmlns:ns3="
>> http://www.w3.org/2001/XMLSchema-instance"
>> ns3:type="ns2:GreetingPhrase"><ns2:phrase>Hola</ns2:phrase></ns1:key><ns1:value
>> xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns2="
>> http://www.w3.org/2001/XMLSchema-instance"
>> ns2:type="xsd:string">Fred</ns1:value></ns1:entry><ns1:entry><ns1:key
>> xmlns:ns2="http://rest.greeter.samples.dosgi.cxf.apache.org" xmlns:ns3="
>> http://www.w3.org/2001/XMLSchema-instance"
>> ns3:type="ns2:GreetingPhrase"><ns2:phrase>Hello</ns2:phrase></ns1:key><ns1:value
>> xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns2="
>> http://www.w3.org/2001/XMLSchema-instance"
>> ns2:type="xsd:string">Fred</ns1:value></ns1:entry></ns1:anyType2anyTypeMap>
>>
>> it complains no type mapping is found
>>
>> I've run a simple frontend based demo and the same Map is serialized as
>>
>> <ns1:greetMeResponse xmlns:ns1="
>> http://greeter.samples.dosgi.cxf.apache.org/"><ns1:return><ns1:entry><ns1:key><ns2:phrase
>> xmlns:ns2="http://greeter.samples.dosgi.cxf.apache.org">Bonjour</ns2:phrase></ns1:key><ns1:value>Fred</ns1:value></ns1:entry><ns1:entry><ns1:key><ns2:phrase
>> xmlns:ns2="http://greeter.samples.dosgi.cxf.apache.org">Hoi</ns2:phrase></ns1:key><ns1:value>Fred</ns1:value></ns1:entry><ns1:entry><ns1:key><ns2:phrase
>> xmlns:ns2="http://greeter.samples.dosgi.cxf.apache.org">Hola</ns2:phrase></ns1:key><ns1:value>Fred</ns1:value></ns1:entry><ns1:entry><ns1:key><ns2:phrase
>> xmlns:ns2="http://greeter.samples.dosgi.cxf.apache.org
>> ">Hello</ns2:phrase></ns1:key><ns1:value>Fred</ns1:value></ns1:entry></ns1:return></ns1:greetMeResponse>
>>
>> So is it possible to simplify the serialization somehow when Aegis is used
>> by JAXRS ? If not then how can I make the above map being deserialized on
>> the client side ? Benson, do you reckon it is even possible for Map ?
>>
>> thanks, Sergey
>>
>>
> 


Re: JAXRS : issues with AegisProvider

Posted by Benson Margulies <bi...@gmail.com>.
Like I said. Given my current level of load, if you tee it up, I'll try to
knock it down. But I need something that misbehaves. I'm sorry to have to
ask for that silver platter.

On Wed, Jun 17, 2009 at 8:43 AM, Sergey Beryozkin <sb...@progress.com>wrote:

> For the purpose of the demo I introduced a wrapper around the
> Map<GreetingPhrase, String> and it works nicely, but I'd appreciate any help
> in getting to the bottom of the problem I described below.
>
> thanks, Sergey
>
> ----- Original Message ----- From: "Sergey Beryozkin" <
> sberyozk@progress.com>
> To: <de...@cxf.apache.org>
> Sent: Wednesday, June 17, 2009 1:19 PM
> Subject: JAXRS : issues with AegisProvider
>
>
>
> Hi,
>
> I'm seeing problems with the JAXRS AegisElementProvider producing/consuming
> complex types like Maps.
> I'm nearly done with making a basic end to end JAX-RS demo working n DOSGi,
> the immediate problem is that
> a client proxy fails to consume the following somewhat complicated
> Aegis-produced response (Map<String, String>) :
>
> <ns1:anyType2anyTypeMap
> xmlns:ns1="urn:org.apache.cxf.aegis.types"><ns1:entry><ns1:key xmlns:ns2="
> http://rest.greeter.samples.dosgi.cxf.apache.org" xmlns:ns3="
> http://www.w3.org/2001/XMLSchema-instance"
> ns3:type="ns2:GreetingPhrase"><ns2:phrase>Bonjour</ns2:phrase></ns1:key><ns1:value
> xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns2="
> http://www.w3.org/2001/XMLSchema-instance"
> ns2:type="xsd:string">Fred</ns1:value></ns1:entry><ns1:entry><ns1:key
> xmlns:ns2="http://rest.greeter.samples.dosgi.cxf.apache.org" xmlns:ns3="
> http://www.w3.org/2001/XMLSchema-instance"
> ns3:type="ns2:GreetingPhrase"><ns2:phrase>Hoi</ns2:phrase></ns1:key><ns1:value
> xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns2="
> http://www.w3.org/2001/XMLSchema-instance"
> ns2:type="xsd:string">Fred</ns1:value></ns1:entry><ns1:entry><ns1:key
> xmlns:ns2="http://rest.greeter.samples.dosgi.cxf.apache.org" xmlns:ns3="
> http://www.w3.org/2001/XMLSchema-instance"
> ns3:type="ns2:GreetingPhrase"><ns2:phrase>Hola</ns2:phrase></ns1:key><ns1:value
> xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns2="
> http://www.w3.org/2001/XMLSchema-instance"
> ns2:type="xsd:string">Fred</ns1:value></ns1:entry><ns1:entry><ns1:key
> xmlns:ns2="http://rest.greeter.samples.dosgi.cxf.apache.org" xmlns:ns3="
> http://www.w3.org/2001/XMLSchema-instance"
> ns3:type="ns2:GreetingPhrase"><ns2:phrase>Hello</ns2:phrase></ns1:key><ns1:value
> xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns2="
> http://www.w3.org/2001/XMLSchema-instance"
> ns2:type="xsd:string">Fred</ns1:value></ns1:entry></ns1:anyType2anyTypeMap>
>
> it complains no type mapping is found
>
> I've run a simple frontend based demo and the same Map is serialized as
>
> <ns1:greetMeResponse xmlns:ns1="
> http://greeter.samples.dosgi.cxf.apache.org/"><ns1:return><ns1:entry><ns1:key><ns2:phrase
> xmlns:ns2="http://greeter.samples.dosgi.cxf.apache.org">Bonjour</ns2:phrase></ns1:key><ns1:value>Fred</ns1:value></ns1:entry><ns1:entry><ns1:key><ns2:phrase
> xmlns:ns2="http://greeter.samples.dosgi.cxf.apache.org">Hoi</ns2:phrase></ns1:key><ns1:value>Fred</ns1:value></ns1:entry><ns1:entry><ns1:key><ns2:phrase
> xmlns:ns2="http://greeter.samples.dosgi.cxf.apache.org">Hola</ns2:phrase></ns1:key><ns1:value>Fred</ns1:value></ns1:entry><ns1:entry><ns1:key><ns2:phrase
> xmlns:ns2="http://greeter.samples.dosgi.cxf.apache.org
> ">Hello</ns2:phrase></ns1:key><ns1:value>Fred</ns1:value></ns1:entry></ns1:return></ns1:greetMeResponse>
>
> So is it possible to simplify the serialization somehow when Aegis is used
> by JAXRS ? If not then how can I make the above map being deserialized on
> the client side ? Benson, do you reckon it is even possible for Map ?
>
> thanks, Sergey
>
>

Re: JAXRS : issues with AegisProvider

Posted by Sergey Beryozkin <sb...@progress.com>.
For the purpose of the demo I introduced a wrapper around the Map<GreetingPhrase, String> and it works nicely, but I'd appreciate 
any help in getting to the bottom of the problem I described below.

thanks, Sergey

----- Original Message ----- 
From: "Sergey Beryozkin" <sb...@progress.com>
To: <de...@cxf.apache.org>
Sent: Wednesday, June 17, 2009 1:19 PM
Subject: JAXRS : issues with AegisProvider


Hi,

I'm seeing problems with the JAXRS AegisElementProvider producing/consuming complex types like Maps.
I'm nearly done with making a basic end to end JAX-RS demo working n DOSGi, the immediate problem is that
a client proxy fails to consume the following somewhat complicated Aegis-produced response (Map<String, String>) :

<ns1:anyType2anyTypeMap xmlns:ns1="urn:org.apache.cxf.aegis.types"><ns1:entry><ns1:key 
xmlns:ns2="http://rest.greeter.samples.dosgi.cxf.apache.org" xmlns:ns3="http://www.w3.org/2001/XMLSchema-instance" 
ns3:type="ns2:GreetingPhrase"><ns2:phrase>Bonjour</ns2:phrase></ns1:key><ns1:value xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:ns2="http://www.w3.org/2001/XMLSchema-instance" ns2:type="xsd:string">Fred</ns1:value></ns1:entry><ns1:entry><ns1:key 
xmlns:ns2="http://rest.greeter.samples.dosgi.cxf.apache.org" xmlns:ns3="http://www.w3.org/2001/XMLSchema-instance" 
ns3:type="ns2:GreetingPhrase"><ns2:phrase>Hoi</ns2:phrase></ns1:key><ns1:value xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:ns2="http://www.w3.org/2001/XMLSchema-instance" ns2:type="xsd:string">Fred</ns1:value></ns1:entry><ns1:entry><ns1:key 
xmlns:ns2="http://rest.greeter.samples.dosgi.cxf.apache.org" xmlns:ns3="http://www.w3.org/2001/XMLSchema-instance" 
ns3:type="ns2:GreetingPhrase"><ns2:phrase>Hola</ns2:phrase></ns1:key><ns1:value xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:ns2="http://www.w3.org/2001/XMLSchema-instance" ns2:type="xsd:string">Fred</ns1:value></ns1:entry><ns1:entry><ns1:key 
xmlns:ns2="http://rest.greeter.samples.dosgi.cxf.apache.org" xmlns:ns3="http://www.w3.org/2001/XMLSchema-instance" 
ns3:type="ns2:GreetingPhrase"><ns2:phrase>Hello</ns2:phrase></ns1:key><ns1:value xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:ns2="http://www.w3.org/2001/XMLSchema-instance" ns2:type="xsd:string">Fred</ns1:value></ns1:entry></ns1:anyType2anyTypeMap>

it complains no type mapping is found

I've run a simple frontend based demo and the same Map is serialized as

<ns1:greetMeResponse xmlns:ns1="http://greeter.samples.dosgi.cxf.apache.org/"><ns1:return><ns1:entry><ns1:key><ns2:phrase 
xmlns:ns2="http://greeter.samples.dosgi.cxf.apache.org">Bonjour</ns2:phrase></ns1:key><ns1:value>Fred</ns1:value></ns1:entry><ns1:entry><ns1:key><ns2:phrase 
xmlns:ns2="http://greeter.samples.dosgi.cxf.apache.org">Hoi</ns2:phrase></ns1:key><ns1:value>Fred</ns1:value></ns1:entry><ns1:entry><ns1:key><ns2:phrase 
xmlns:ns2="http://greeter.samples.dosgi.cxf.apache.org">Hola</ns2:phrase></ns1:key><ns1:value>Fred</ns1:value></ns1:entry><ns1:entry><ns1:key><ns2:phrase 
xmlns:ns2="http://greeter.samples.dosgi.cxf.apache.org">Hello</ns2:phrase></ns1:key><ns1:value>Fred</ns1:value></ns1:entry></ns1:return></ns1:greetMeResponse>

So is it possible to simplify the serialization somehow when Aegis is used by JAXRS ? If not then how can I make the above map being 
deserialized on the client side ? Benson, do you reckon it is even possible for Map ?

thanks, Sergey