File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services Certification (SCDJWS/OCEJWSD) and the fly likes How to set properties in JAXB Marshaller in JAX-WS Web service client Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Web Services Certification (SCDJWS/OCEJWSD)
Bookmark "How to set properties in JAXB Marshaller in JAX-WS Web service client" Watch "How to set properties in JAXB Marshaller in JAX-WS Web service client" New topic
Forums: Web Services Web Services Certification (SCDJWS/OCEJWSD) Websphere
Author

How to set properties in JAXB Marshaller in JAX-WS Web service client

Sujeeth Pakala
Ranch Hand

Joined: Mar 24, 2009
Posts: 80
Hello Ranchers,

I have to set property "com.sun.xml.bind.characterEscapeHandler" in marshller object of JAXB runtime in my JAX-WS web service cleint.

I am using IBM Websphere 8.5.5 provided JAX-WS runtime.

I know it can be done for a simple JAXB client like :



Quick answer will help.

Thanks.


Regards, Sujeeth Pakala
SCJP, SCWCD, SCBCD, ICAD, XML Master Basic, Certified SOA Professional
g tsuji
Ranch Hand

Joined: Jan 18, 2011
Posts: 464
    
    2
It is a vendor property. It is meant to work with jaxb RI for sure and incorporated into the release. Other than RI, no guarantee is made for its support. It has to be looked into on a case-by-case basis.

To study how it works, you can check out the sample bundled with jaxb RI under the directory of "samples". In particular, the sample application is under the sub-directory "character-escape".
Sujeeth Pakala
Ranch Hand

Joined: Mar 24, 2009
Posts: 80
I managed to use character escaped handler using JAXB. But, I am trying to find out how to hook this to JAXB in JAX-WS runtime..
Sujeeth Pakala
Ranch Hand

Joined: Mar 24, 2009
Posts: 80
I have confirmation from IBM that it is not possible to set properties on JAXB marshaller of JAX-WS/RS runtimes of IBM.

Abhay Agarwal
Ranch Hand

Joined: Feb 29, 2008
Posts: 1000
    
    1

Even I tried to find the solution.
Thanks for posting your finding here.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to set properties in JAXB Marshaller in JAX-WS Web service client
 
Similar Threads
How to bind JAXB persistant objects to WS parameters?
How to marshal data from a SOAP header and write it to disc
ArrayIndexOutOfBounds -1 error during unmarshalling
JAX-RPC client for JAX-WS service
Why JAX-WS over JAX-RPC + JAXB