Re: [Simple-support] Exporting Java bean methods to XML
Brought to you by:
niallg
|
From: Niall G. <gal...@ya...> - 2011-06-18 03:10:10
|
Hi,
This can be serialized, but how would you deserialize it? Provide a setter method or a constructor to get this working. See the tutorial for reference.
Niall
--- On Thu, 16/6/11, simon mottram <sim...@ho...> wrote:
From: simon mottram <sim...@ho...>
Subject: [Simple-support] Exporting Java bean methods to XML
To: sim...@li...
Received: Thursday, 16 June, 2011, 9:16 PM
I'm sure I'm missing something terribly simple here but, while I can export fields with no trouble, methods always give me a constructor error.
For example a simple class
@Root
class MyClass {
@Element(name="name")
public String getName() {
return "Simon"
}
}
Always throws an Exception.
I am hoping to expose a bunch of classes as XML and they use getters for the most part, to export fields directly would be a right pain. This must be simple right?
Cheers
Simon
Simon Mottram
TEL
+64 (09) 575 4574
MOB
+64 (021) 243 7745
WEB
Linked In |
Soundcloud
-----Inline Attachment Follows-----
------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
-----Inline Attachment Follows-----
_______________________________________________
Simple-support mailing list
Sim...@li...
https://lists.sourceforge.net/lists/listinfo/simple-support
|