> a) works in controlled Maven unit test environment but not when deployed to 
> JBoss 7
You are right. I failed to realize that the jackson and jettison .jars
are now part of the application server and not part of the deployed
WAR when I first reported this. I will enable the jettison settings.

> b) getting XML instead of JSON from cached JAXBContext
I've got more to learn here. I don't remember MediaType being part of
the ContextResolver but do remember it being stored within a "*/*"
MediaType by doing nothing.

c) (adding this). I attempted to add a custom marshaller and
demarshaller but ran into two situations
c.1) finding a portable way (JavaEE6/JBoss7/CDI and
non-JavaEE/Jetty/Unit test) to declare my custom marshallers so they
would get instantiated, injected, and used. I am currently using the
annotated Java Application class that returns classes and objects. I
saw a Jira ticket that just fixed something related to this when CDI
is being used. I need to be able to update my JBoss server to better
test.
c.2) when I do get my custom marshaller/demarshaller to be called -- I
am not getting any Annotations passed to my read/write. I assumed I
would get the @Badgerfish annotation as well as the @Mapped
annotations but all I got was an empty array. Once I picked one way of
doing things and hard-coded everything, I was able to successfully
remove the demarshalling/marshalling code from my business methods. So
-- most of my issues now are in better understanding the framework.

Thanks for your attention on this. I realize I need to continue to dig
into this and will provide more detailed and simplified test cases
within the next few weeks after I have looked through the existing
testcases in Git.

jim

On Thu, May 17, 2012 at 10:39 AM, Bill Burke <bbu...@redhat.com> wrote:
> If its all right with you, let's figure out exactly what you need and
> what bugs exist so that you don't have to do manual json.
>
> On 5/15/12 7:07 PM, Jim Stafford wrote:
>> fyi...I ended up removing all built-in JSON marshalling and replacing
>> with manual calls to Jettison for both demarshalling JSON inputs and
>> marshalling JSON outputs before it was all over. I ran into cases
>> where
>> a) it worked fine using Jetty in the unit test/Maven environment and
>> returned different formatted JSON when running deployed to JBoss 7
>
> This is probably because AS7 comes with both Jettison and Jackson.  The
> Resteasy documentation talks about what you must do to force Jettison usage.
>
>> b) XML was being returned instead of JSON in one case where I was
>> using a cached JAXBContext to demarshal the JAXB class passed in (XML
>> in, JSON out)
>>
>
> Ok, I'll double check this one.  Cache is supposed to be based on media
> type.
>
> Thanks for your patience Jim,
>
> Bill
>
> --
> Bill Burke
> JBoss, a division of Red Hat
> http://bill.burkecentral.com
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Resteasy-users mailing list
> Resteasy-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/resteasy-users



-- 
jim stafford
SRA I&S | JHU

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Resteasy-users mailing list
Resteasy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/resteasy-users

Reply via email to