Using real POJOs (without JAXB Annotations) as transfer objects with JAX-RS

December 1st, 2011 · No Comments

Are you annoyed that you have to annotate your POJOs with @XmlRootElement, so they can be used with JAX-RS? If your using Jersey as JAX-RS implementation your lucky: Just add to the <servlet> tag in your web.xml the following snippet: <init-param> <param-name>com.sun.jersey.api.json.POJOMappingFeature</param-name> <param-value>true</param-value> </init-param> After restarting your servlet, your POJOs are marshalled to JSON as [...]

[Read more →]

Topics: · , , , , , , , , ,

Let the user change the column order in Java/Swing

November 18th, 2011 · No Comments

Do you have the requirement to let the user of your application change the order of his columns and your app is based on Swing? Then you should read further. Below you find a TableColumnModel that has two states: STANDARD and USERDEFINED. In the STANDARD state the user may not change the order of the [...]

[Read more →]

Topics: · , , ,

Openbahn-API – Bahn-Webseite als Webservice

June 22nd, 2011 · 4 Comments

As this is only of interest for German users – this article is in German only. It’s about a new project of mine. Sorry folks. Ich bin gerade dabei eine Android-App zu entwickeln, mit der es möglich ist Fahrkarten für Bahn-Pendler einfacher zu buchen. Bei der Entwicklung ist mir aufgefallen, dass die Bahn leider keine [...]

[Read more →]

Topics: · , , , , , , ,

Using Axis2 services from Javascript (by removing the XML namespaces)

January 27th, 2009 · 1 Comment

If you want to call an Axis2 service from Javascript you will face the problem that the XML response of an Axis2 service call contains XML namespaces – something Javascript doesn’t like in cross-browser-friendly way. The idea to fix this issue is to make an XSLT transformation directly from Axis2 that removes the unnecessary namespaces. [...]

[Read more →]

Topics: · , , , , , , ,

Building a JSON web service with Java and Axis2

January 23rd, 2009 · 9 Comments

It is said that in Java usually the easiest things are the hardest. The following is a nice example as it took me some time to figure out how to do it. I wanted to build a simple URL request based web service in Java that returns an JSON object. Yes, you can do that [...]

[Read more →]

Topics: · , , , , , ,