You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wink.apache.org by "Kaloyan Kolev (JIRA)" <ji...@apache.org> on 2009/10/21 10:25:59 UTC

[jira] Created: (WINK-218) GenericEntity'

GenericEntity'
--------------

                 Key: WINK-218
                 URL: https://issues.apache.org/jira/browse/WINK-218
             Project: Wink
          Issue Type: Bug
            Reporter: Kaloyan Kolev




-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WINK-218) GenericEntity's generic type is not used when choosing provider.

Posted by "Michael Elman (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WINK-218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12768131#action_12768131 ] 

Michael Elman commented on WINK-218:
------------------------------------

Does XAtomEntry have JAXB annotations?


> GenericEntity's generic type is not used when choosing provider.
> ----------------------------------------------------------------
>
>                 Key: WINK-218
>                 URL: https://issues.apache.org/jira/browse/WINK-218
>             Project: Wink
>          Issue Type: Bug
>          Components: Common
>    Affects Versions: 0.2
>            Reporter: Kaloyan Kolev
>
> I have created a subclass of the AtomEntry, let's say XAtomEntry. When I return that as an entity resource I get exception that there is no provider for that type. The exception is thrown by FlushResultHandler. I tried to wrap the new type in a GenericEntity with a generic type set to AtomEntry, but the result was the same.
> Here is the check for the GenericEntity:
> {code}
>  Class<?> rawType = null;
>         if (entity instanceof GenericEntity) {
>             GenericEntity<?> genericEntity = (GenericEntity<?>)entity; 
>             entity = genericEntity.getEntity(); // this is the XAtomEntity instance
>             rawType = genericEntity.getRawType(); // this is the  XAtomEntity class
>             genericType = genericEntity.getType(); // this is the AtomEntity class
>         } else {
>             rawType = (entity != null ? entity.getClass() : null);
>             if (isOriginalEntityResponseObj) {
>                 genericType = rawType;
>             } else {
>                 genericType = (genericType != null ? genericType : rawType);
>             }
>         }
> {code}
> This should match the default JAXBXmlProvider, right? 
> Later a provider is searched for:
> {code}
> // get the provider to write the entity
>         Providers providers = context.getProviders();
>         MessageBodyWriter<Object> messageBodyWriter =
>             (MessageBodyWriter<Object>)providers.getMessageBodyWriter(rawType,
>                                                                       genericType,
>                                                                       declaredAnnotations,
>                                                                       responseMediaType);
> {code}
> Here the messageBodyWriter is set to null.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (WINK-218) GenericEntity's generic type is not used when choosing provider.

Posted by "Kaloyan Kolev (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WINK-218?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kaloyan Kolev closed WINK-218.
------------------------------

    Resolution: Invalid

The issue turned out to be a problem with the JAXBXmlProvider so this issue will be reopened with the proper description.

> GenericEntity's generic type is not used when choosing provider.
> ----------------------------------------------------------------
>
>                 Key: WINK-218
>                 URL: https://issues.apache.org/jira/browse/WINK-218
>             Project: Wink
>          Issue Type: Bug
>          Components: Common
>    Affects Versions: 0.2
>            Reporter: Kaloyan Kolev
>
> I have created a subclass of the AtomEntry, let's say XAtomEntry. When I return that as an entity resource I get exception that there is no provider for that type. The exception is thrown by FlushResultHandler. I tried to wrap the new type in a GenericEntity with a generic type set to AtomEntry, but the result was the same.
> Here is the check for the GenericEntity:
> {code}
>  Class<?> rawType = null;
>         if (entity instanceof GenericEntity) {
>             GenericEntity<?> genericEntity = (GenericEntity<?>)entity; 
>             entity = genericEntity.getEntity(); // this is the XAtomEntity instance
>             rawType = genericEntity.getRawType(); // this is the  XAtomEntity class
>             genericType = genericEntity.getType(); // this is the AtomEntity class
>         } else {
>             rawType = (entity != null ? entity.getClass() : null);
>             if (isOriginalEntityResponseObj) {
>                 genericType = rawType;
>             } else {
>                 genericType = (genericType != null ? genericType : rawType);
>             }
>         }
> {code}
> This should match the default JAXBXmlProvider, right? 
> Later a provider is searched for:
> {code}
> // get the provider to write the entity
>         Providers providers = context.getProviders();
>         MessageBodyWriter<Object> messageBodyWriter =
>             (MessageBodyWriter<Object>)providers.getMessageBodyWriter(rawType,
>                                                                       genericType,
>                                                                       declaredAnnotations,
>                                                                       responseMediaType);
> {code}
> Here the messageBodyWriter is set to null.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WINK-218) GenericEntity's generic type is not used when choosing provider.

Posted by "Kaloyan Kolev (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WINK-218?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kaloyan Kolev updated WINK-218:
-------------------------------

          Component/s: Common
          Description: 
I have created a subclass of the AtomEntry, let's say XAtomEntry. When I return that as an entity resource I get exception that there is no provider for that type. The exception is thrown by FlushResultHandler. I tried to wrap the new type in a GenericEntity with a generic type set to AtomEntry, but the result was the same.

Here is the check for the GenericEntity:
{code}
 Class<?> rawType = null;

        if (entity instanceof GenericEntity) {
            GenericEntity<?> genericEntity = (GenericEntity<?>)entity; 
            entity = genericEntity.getEntity(); // this is the XAtomEntity instance
            rawType = genericEntity.getRawType(); // this is the  XAtomEntity class
            genericType = genericEntity.getType(); // this is the AtomEntity class
        } else {
            rawType = (entity != null ? entity.getClass() : null);
            if (isOriginalEntityResponseObj) {
                genericType = rawType;
            } else {
                genericType = (genericType != null ? genericType : rawType);
            }
        }
{code}

This should match the default JAXBXmlProvider, right? 

Later a provider is searched for:
{code}
// get the provider to write the entity
        Providers providers = context.getProviders();
        MessageBodyWriter<Object> messageBodyWriter =
            (MessageBodyWriter<Object>)providers.getMessageBodyWriter(rawType,
                                                                      genericType,
                                                                      declaredAnnotations,
                                                                      responseMediaType);
{code}

Here the messageBodyWriter is set to null.
    Affects Version/s: 0.2
              Summary: GenericEntity's generic type is not used when choosing provider.  (was: GenericEntity')

> GenericEntity's generic type is not used when choosing provider.
> ----------------------------------------------------------------
>
>                 Key: WINK-218
>                 URL: https://issues.apache.org/jira/browse/WINK-218
>             Project: Wink
>          Issue Type: Bug
>          Components: Common
>    Affects Versions: 0.2
>            Reporter: Kaloyan Kolev
>
> I have created a subclass of the AtomEntry, let's say XAtomEntry. When I return that as an entity resource I get exception that there is no provider for that type. The exception is thrown by FlushResultHandler. I tried to wrap the new type in a GenericEntity with a generic type set to AtomEntry, but the result was the same.
> Here is the check for the GenericEntity:
> {code}
>  Class<?> rawType = null;
>         if (entity instanceof GenericEntity) {
>             GenericEntity<?> genericEntity = (GenericEntity<?>)entity; 
>             entity = genericEntity.getEntity(); // this is the XAtomEntity instance
>             rawType = genericEntity.getRawType(); // this is the  XAtomEntity class
>             genericType = genericEntity.getType(); // this is the AtomEntity class
>         } else {
>             rawType = (entity != null ? entity.getClass() : null);
>             if (isOriginalEntityResponseObj) {
>                 genericType = rawType;
>             } else {
>                 genericType = (genericType != null ? genericType : rawType);
>             }
>         }
> {code}
> This should match the default JAXBXmlProvider, right? 
> Later a provider is searched for:
> {code}
> // get the provider to write the entity
>         Providers providers = context.getProviders();
>         MessageBodyWriter<Object> messageBodyWriter =
>             (MessageBodyWriter<Object>)providers.getMessageBodyWriter(rawType,
>                                                                       genericType,
>                                                                       declaredAnnotations,
>                                                                       responseMediaType);
> {code}
> Here the messageBodyWriter is set to null.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WINK-218) GenericEntity's generic type is not used when choosing provider.

Posted by "Michael Elman (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WINK-218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12768150#action_12768150 ] 

Michael Elman commented on WINK-218:
------------------------------------

bq.  Isn't that is why the GenericEntity is used - to provide a super type to use when serializing.

Not exactly. The  GenericEntity is used  to represent a response entity of a generic type.
For example, if there is a provider that accepts List of a specific type, the GenericEntity will be the solution.

In your case, the JAXBXmlProvider doesn't expect to handle any specific generic types, but only supported raw types. Therefore, it cannot find a provider since raw type is XAtomEntity and it doesn't have any JAXB annotations.

So, IMO there is no bug here.


> GenericEntity's generic type is not used when choosing provider.
> ----------------------------------------------------------------
>
>                 Key: WINK-218
>                 URL: https://issues.apache.org/jira/browse/WINK-218
>             Project: Wink
>          Issue Type: Bug
>          Components: Common
>    Affects Versions: 0.2
>            Reporter: Kaloyan Kolev
>
> I have created a subclass of the AtomEntry, let's say XAtomEntry. When I return that as an entity resource I get exception that there is no provider for that type. The exception is thrown by FlushResultHandler. I tried to wrap the new type in a GenericEntity with a generic type set to AtomEntry, but the result was the same.
> Here is the check for the GenericEntity:
> {code}
>  Class<?> rawType = null;
>         if (entity instanceof GenericEntity) {
>             GenericEntity<?> genericEntity = (GenericEntity<?>)entity; 
>             entity = genericEntity.getEntity(); // this is the XAtomEntity instance
>             rawType = genericEntity.getRawType(); // this is the  XAtomEntity class
>             genericType = genericEntity.getType(); // this is the AtomEntity class
>         } else {
>             rawType = (entity != null ? entity.getClass() : null);
>             if (isOriginalEntityResponseObj) {
>                 genericType = rawType;
>             } else {
>                 genericType = (genericType != null ? genericType : rawType);
>             }
>         }
> {code}
> This should match the default JAXBXmlProvider, right? 
> Later a provider is searched for:
> {code}
> // get the provider to write the entity
>         Providers providers = context.getProviders();
>         MessageBodyWriter<Object> messageBodyWriter =
>             (MessageBodyWriter<Object>)providers.getMessageBodyWriter(rawType,
>                                                                       genericType,
>                                                                       declaredAnnotations,
>                                                                       responseMediaType);
> {code}
> Here the messageBodyWriter is set to null.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WINK-218) GenericEntity's generic type is not used when choosing provider.

Posted by "Kaloyan Kolev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WINK-218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12768230#action_12768230 ] 

Kaloyan Kolev commented on WINK-218:
------------------------------------

{quote}
Not exactly. The GenericEntity is used to represent a response entity of a generic type.
For example, if there is a provider that accepts List of a specific type, the GenericEntity will be the solution.
{quote}
Yes this is the reason why I thought that if there is a provider that is able to serialize a AtomEntry then it will be able to serialize a derivative class by using the generic type. 

{quote}
In your case, the JAXBXmlProvider doesn't expect to handle any specific generic types, but only supported raw types. Therefore, it cannot find a provider since raw type is XAtomEntity and it doesn't have any JAXB annotations.
{quote}

What is the reason for this provider to not be able to handle any objects of known generic types? After all the XAtomEntry is an instance of AtomEntry, so I don't see why this won't work always.

I checked the specification and it does not enforce such obligation on the providers so I agree it is not a bug (as I was assuming) but probably an enhancement request. Do you think I should close this and open a feature request?

Thanks.

> GenericEntity's generic type is not used when choosing provider.
> ----------------------------------------------------------------
>
>                 Key: WINK-218
>                 URL: https://issues.apache.org/jira/browse/WINK-218
>             Project: Wink
>          Issue Type: Bug
>          Components: Common
>    Affects Versions: 0.2
>            Reporter: Kaloyan Kolev
>
> I have created a subclass of the AtomEntry, let's say XAtomEntry. When I return that as an entity resource I get exception that there is no provider for that type. The exception is thrown by FlushResultHandler. I tried to wrap the new type in a GenericEntity with a generic type set to AtomEntry, but the result was the same.
> Here is the check for the GenericEntity:
> {code}
>  Class<?> rawType = null;
>         if (entity instanceof GenericEntity) {
>             GenericEntity<?> genericEntity = (GenericEntity<?>)entity; 
>             entity = genericEntity.getEntity(); // this is the XAtomEntity instance
>             rawType = genericEntity.getRawType(); // this is the  XAtomEntity class
>             genericType = genericEntity.getType(); // this is the AtomEntity class
>         } else {
>             rawType = (entity != null ? entity.getClass() : null);
>             if (isOriginalEntityResponseObj) {
>                 genericType = rawType;
>             } else {
>                 genericType = (genericType != null ? genericType : rawType);
>             }
>         }
> {code}
> This should match the default JAXBXmlProvider, right? 
> Later a provider is searched for:
> {code}
> // get the provider to write the entity
>         Providers providers = context.getProviders();
>         MessageBodyWriter<Object> messageBodyWriter =
>             (MessageBodyWriter<Object>)providers.getMessageBodyWriter(rawType,
>                                                                       genericType,
>                                                                       declaredAnnotations,
>                                                                       responseMediaType);
> {code}
> Here the messageBodyWriter is set to null.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (WINK-218) GenericEntity's generic type is not used when choosing provider.

Posted by "Kaloyan Kolev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WINK-218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12768256#action_12768256 ] 

Kaloyan Kolev edited comment on WINK-218 at 10/21/09 2:29 PM:
--------------------------------------------------------------

The issue turned out to be a problem with the JAXBXmlProvider so it will be reopened with the proper description. Link to the other issue: https://issues.apache.org/jira/browse/WINK-219

      was (Author: kkolev):
    The issue turned out to be a problem with the JAXBXmlProvider so this issue will be reopened with the proper description.
  
> GenericEntity's generic type is not used when choosing provider.
> ----------------------------------------------------------------
>
>                 Key: WINK-218
>                 URL: https://issues.apache.org/jira/browse/WINK-218
>             Project: Wink
>          Issue Type: Bug
>          Components: Common
>    Affects Versions: 0.2
>            Reporter: Kaloyan Kolev
>
> I have created a subclass of the AtomEntry, let's say XAtomEntry. When I return that as an entity resource I get exception that there is no provider for that type. The exception is thrown by FlushResultHandler. I tried to wrap the new type in a GenericEntity with a generic type set to AtomEntry, but the result was the same.
> Here is the check for the GenericEntity:
> {code}
>  Class<?> rawType = null;
>         if (entity instanceof GenericEntity) {
>             GenericEntity<?> genericEntity = (GenericEntity<?>)entity; 
>             entity = genericEntity.getEntity(); // this is the XAtomEntity instance
>             rawType = genericEntity.getRawType(); // this is the  XAtomEntity class
>             genericType = genericEntity.getType(); // this is the AtomEntity class
>         } else {
>             rawType = (entity != null ? entity.getClass() : null);
>             if (isOriginalEntityResponseObj) {
>                 genericType = rawType;
>             } else {
>                 genericType = (genericType != null ? genericType : rawType);
>             }
>         }
> {code}
> This should match the default JAXBXmlProvider, right? 
> Later a provider is searched for:
> {code}
> // get the provider to write the entity
>         Providers providers = context.getProviders();
>         MessageBodyWriter<Object> messageBodyWriter =
>             (MessageBodyWriter<Object>)providers.getMessageBodyWriter(rawType,
>                                                                       genericType,
>                                                                       declaredAnnotations,
>                                                                       responseMediaType);
> {code}
> Here the messageBodyWriter is set to null.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (WINK-218) GenericEntity's generic type is not used when choosing provider.

Posted by "Michael Elman (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WINK-218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12768131#action_12768131 ] 

Michael Elman edited comment on WINK-218 at 10/21/09 8:49 AM:
--------------------------------------------------------------

Does XAtomEntry have JAXB annotations?
I'm asking, since the JAXB annotations are not automatically inherited.

      was (Author: elman):
    Does XAtomEntry have JAXB annotations?

  
> GenericEntity's generic type is not used when choosing provider.
> ----------------------------------------------------------------
>
>                 Key: WINK-218
>                 URL: https://issues.apache.org/jira/browse/WINK-218
>             Project: Wink
>          Issue Type: Bug
>          Components: Common
>    Affects Versions: 0.2
>            Reporter: Kaloyan Kolev
>
> I have created a subclass of the AtomEntry, let's say XAtomEntry. When I return that as an entity resource I get exception that there is no provider for that type. The exception is thrown by FlushResultHandler. I tried to wrap the new type in a GenericEntity with a generic type set to AtomEntry, but the result was the same.
> Here is the check for the GenericEntity:
> {code}
>  Class<?> rawType = null;
>         if (entity instanceof GenericEntity) {
>             GenericEntity<?> genericEntity = (GenericEntity<?>)entity; 
>             entity = genericEntity.getEntity(); // this is the XAtomEntity instance
>             rawType = genericEntity.getRawType(); // this is the  XAtomEntity class
>             genericType = genericEntity.getType(); // this is the AtomEntity class
>         } else {
>             rawType = (entity != null ? entity.getClass() : null);
>             if (isOriginalEntityResponseObj) {
>                 genericType = rawType;
>             } else {
>                 genericType = (genericType != null ? genericType : rawType);
>             }
>         }
> {code}
> This should match the default JAXBXmlProvider, right? 
> Later a provider is searched for:
> {code}
> // get the provider to write the entity
>         Providers providers = context.getProviders();
>         MessageBodyWriter<Object> messageBodyWriter =
>             (MessageBodyWriter<Object>)providers.getMessageBodyWriter(rawType,
>                                                                       genericType,
>                                                                       declaredAnnotations,
>                                                                       responseMediaType);
> {code}
> Here the messageBodyWriter is set to null.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WINK-218) GenericEntity's generic type is not used when choosing provider.

Posted by "Kaloyan Kolev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WINK-218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12768139#action_12768139 ] 

Kaloyan Kolev commented on WINK-218:
------------------------------------

No. Any new extension elements are set to the AtomEntry#any field so they get picked up when the instance is serialized as AtomEntry. Isn't that is why the GenericEntity is used - to provide a super type to use when serializing. 

> GenericEntity's generic type is not used when choosing provider.
> ----------------------------------------------------------------
>
>                 Key: WINK-218
>                 URL: https://issues.apache.org/jira/browse/WINK-218
>             Project: Wink
>          Issue Type: Bug
>          Components: Common
>    Affects Versions: 0.2
>            Reporter: Kaloyan Kolev
>
> I have created a subclass of the AtomEntry, let's say XAtomEntry. When I return that as an entity resource I get exception that there is no provider for that type. The exception is thrown by FlushResultHandler. I tried to wrap the new type in a GenericEntity with a generic type set to AtomEntry, but the result was the same.
> Here is the check for the GenericEntity:
> {code}
>  Class<?> rawType = null;
>         if (entity instanceof GenericEntity) {
>             GenericEntity<?> genericEntity = (GenericEntity<?>)entity; 
>             entity = genericEntity.getEntity(); // this is the XAtomEntity instance
>             rawType = genericEntity.getRawType(); // this is the  XAtomEntity class
>             genericType = genericEntity.getType(); // this is the AtomEntity class
>         } else {
>             rawType = (entity != null ? entity.getClass() : null);
>             if (isOriginalEntityResponseObj) {
>                 genericType = rawType;
>             } else {
>                 genericType = (genericType != null ? genericType : rawType);
>             }
>         }
> {code}
> This should match the default JAXBXmlProvider, right? 
> Later a provider is searched for:
> {code}
> // get the provider to write the entity
>         Providers providers = context.getProviders();
>         MessageBodyWriter<Object> messageBodyWriter =
>             (MessageBodyWriter<Object>)providers.getMessageBodyWriter(rawType,
>                                                                       genericType,
>                                                                       declaredAnnotations,
>                                                                       responseMediaType);
> {code}
> Here the messageBodyWriter is set to null.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WINK-218) GenericEntity's generic type is not used when choosing provider.

Posted by "Michael Elman (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WINK-218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12768249#action_12768249 ] 

Michael Elman commented on WINK-218:
------------------------------------

bq. What is the reason for this provider to not be able to handle any objects of known generic types? After all the XAtomEntry is an instance of AtomEntry, so I don't see why this won't work always.

I think that JAXBXmlProvider should be able to handle any object that can be handled by JAXB framework.
As I've just checked, the JAXB is able to handle the objects with inherited annotations, therefore it's a bug in the JAXBXmlProvider: it should determine if the object can be handled not only by searching the proper annotations on the class.
The best solution will be probably testing if the class can be handled. I'm not sure if there is a way to check it using JAXB APIs.
Anyway, I still think that JAXBXmlProvider should ignore the generic type, since I don't think that it somehow changes if the object is readable/writeable.

bq. Do you think I should close this and open a feature request?

Theoretically, it's possible to change this Issue's description, but IMO it's better to open a new one. And close this one.
The bug should be something like: "JAXBXmlProvider should be able to handle inherited types, since JAXB is able to handle them."

> GenericEntity's generic type is not used when choosing provider.
> ----------------------------------------------------------------
>
>                 Key: WINK-218
>                 URL: https://issues.apache.org/jira/browse/WINK-218
>             Project: Wink
>          Issue Type: Bug
>          Components: Common
>    Affects Versions: 0.2
>            Reporter: Kaloyan Kolev
>
> I have created a subclass of the AtomEntry, let's say XAtomEntry. When I return that as an entity resource I get exception that there is no provider for that type. The exception is thrown by FlushResultHandler. I tried to wrap the new type in a GenericEntity with a generic type set to AtomEntry, but the result was the same.
> Here is the check for the GenericEntity:
> {code}
>  Class<?> rawType = null;
>         if (entity instanceof GenericEntity) {
>             GenericEntity<?> genericEntity = (GenericEntity<?>)entity; 
>             entity = genericEntity.getEntity(); // this is the XAtomEntity instance
>             rawType = genericEntity.getRawType(); // this is the  XAtomEntity class
>             genericType = genericEntity.getType(); // this is the AtomEntity class
>         } else {
>             rawType = (entity != null ? entity.getClass() : null);
>             if (isOriginalEntityResponseObj) {
>                 genericType = rawType;
>             } else {
>                 genericType = (genericType != null ? genericType : rawType);
>             }
>         }
> {code}
> This should match the default JAXBXmlProvider, right? 
> Later a provider is searched for:
> {code}
> // get the provider to write the entity
>         Providers providers = context.getProviders();
>         MessageBodyWriter<Object> messageBodyWriter =
>             (MessageBodyWriter<Object>)providers.getMessageBodyWriter(rawType,
>                                                                       genericType,
>                                                                       declaredAnnotations,
>                                                                       responseMediaType);
> {code}
> Here the messageBodyWriter is set to null.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.