Manipulate marshaller in jax-ws

Is there a way to manipulate the marshaller used in jaxws. I like to send the cdata given in the webservice request and for that I want to try something like the description here: http://odedpeer.blogspot.de/2010/07/jaxb-sun-and-how-to-marshal-cdata .html

In short, it does this:

Marshaller m = JAXBContext.newInstance( Item.class ).createMarshaller();  
m.setProperty( "com.sun.xml.internal.bind.characterEscapeHandler", new CharacterEscapeHandler() {  
  @Override  
  public void escape( char[] ac, int i, int j, boolean flag, Writer writer ) throws IOException  
  {  
   // do not escape  
   writer.write( ac, i, j );  
  }  
});  

      

is this possible with jaxws?

+3


source to share


1 answer


Well, the answer to your question is:



JAX-WS

is based on JAXB

, so yes, maybe just create the linked stuff JAXB

(as you showed in your question) in your application and you can process XML

from your request in your webservice.

+1


source







All Articles