users@jersey.java.net
[Jersey] Jersey with JAXBIntrospector
This message
: [
Message body
] [ More options (
top
,
bottom
) ]
Related messages
: [
Next message
] [
Previous message
]
Contemporary messages sorted
: [
by date
] [
by thread
] [
by subject
] [
by author
] [
by messages with attachments
]
From
: Lee Kenny <
Kenny.Lee_at_bosch-si.com
>
Date
: Wed, 18 Dec 2013 10:15:35 +0000
Hi,
In my class that I expose as a service, I have an attribute of generic type Object.
public class MyPOJO {
private Object value;
}
When I am fetching my object via GET, the value is dynamically set. (Could be string, int, float, etc)
The XML response returns (In this case the value set is a String):
<value
xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance
"
xmlns:xs="
http://www.w3.org/2001/XMLSchema
" xsi:type="xs:string">My String Value
</value>
I prefer to get:
<value>My String Value</value>
So I read from the link below that we can use the JAXBIntrospector. But not sure how to use it with Jersey though.
http://stackoverflow.com/questions/4146540/how-to-marshal-an-object-via-jaxb-without-any-information-about-it
Mit freundlichen Grüßen / Best regards
Kenny Lee
INST/DSW2-AP
Tel. +65 6571 2250
This message
: [
Message body
]
Next message
:
Trudeau, Simon: "[Jersey] Jersey Client 2.4.1 - best practices"
Previous message
:
Jack Lista: "[Jersey] _at_Autowire working for local classes but not for dependent projects"
Contemporary messages sorted
: [
by date
] [
by thread
] [
by subject
] [
by author
] [
by messages with attachments
]