Java web service without a web application server

You don’t need a third party library to use jax-ws annotations. J2SE ships with jax-ws, so all the annotations are still available to you. You can achieve lightweight results with the following solution, but for anything optimized/multi-threaded, it’s on your own head to implement: Design a SEI, service endpoint interface, which is basically a java … Read more

Is it possible to customize the namespace prefix that JAXB uses when marshalling to a String?

http://hwellmann.blogspot.com/2011/03/jaxb-marshalling-with-custom-namespace.html This shows how to do it. Another: http://www.systemmobile.com/?p=280 Key bits in case that link dies too: the NamespacePrefixMapper class, found in the com.sun.xml.bind.marshaller package. The abstract class has one method to implement: public abstract String getPreferredPrefix( String namespaceUri, String suggestion, boolean requirePrefix); then Marshaller marshaller = jaxbContext.createMarshaller(); marshaller.setProperty(”com.sun.xml.bind.namespacePrefixMapper”, new MyNamespacePrefixMapper()); If you’re also using … Read more