开发者

JAXBElement<String> to String using Simple Framework for Android

开发者 https://www.devze.com 2023-04-06 00:56 出处:网络
I\'m having big time trouble with Android Webservice. I am converting JAXB Annotation to Simple Annotation. Please see below.

I'm having big time trouble with Android Webservice.

I am converting JAXB Annotation to Simple Annotation. Please see below.

Here is my JAXB Annotation:

@XmlElementRef(name = "Title", namespace = "http://xxx.org/2004/07/Course", type = JAXBElement.class, required = false)
protect开发者_StackOverflow社区ed JAXBElement<String> title;

I get the value using getTitle().value();

After mapping to Simple Annotation like this:

@Element(name = "Title",  required = false)
    protected String title;

and getTitle() returns null. how can i get the value ?

I cannot use JAXB on Android. So how could I properly use Simple Framework to get the value?

I badly need help on this. Thank you so much.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号