While JAXB is a good method of mapping XML into Java objects, if your schema’s are large or complex, generating the required Object graph prior to marshaling into XML can be both tedious and error prone due to the large amount of ‘boiler plate’ code of creating an object, calling accessor methods to set the […]Read more "Implementing Builders with JAXB generated objects"
It’s been a couple of busy months with most of my time being taken up with my day job. Most of my time has been spent with either tracking down issues with our live environment, or trying to finish off a couple major projects (both related to XMPP) interspersed with the usual major partner getting […]Read more "It’s been a busy couple of months"
Back in late 2008, one of the original design goals for the rewrite of my retepXMPP project was to use JAXB for handling the marshalling of XMPP Stanzas into POJO’s. The main ideas behind this was to standardise against the XMPP schemas available online and to make the addition of further protocols easier – mainly […]Read more "Using JAXB to marshall XMPP"
When generating Java sources from an XML Schema with JAXB, the type of field used to represent an attribute is determined by it’s type in the schema. For example, a snippet from jabber-client.xsd: By default, JAXB would create the object (Message in this case) with two String properties. To change this to another object (say […]Read more "Binding custom objects to attributes in JAXB"
With JAXB it does a pretty good job in mapping between XML and Java Objects. In normal use this is fine but what happens when you need to use a custom data type for an attribute? Well JAXB supports this in binding so this article will describe this. The originating issue that’s caused this article […]Read more "Implementing custom types within JAXB"