[jboss-user] [JBossWS] - webservice jaxb and custom accessor

jkla do-not-reply at jboss.com
Mon Sep 8 04:06:15 EDT 2008


in our company we use Hibernate/JPA + JbossWS to host create web services (beans annotated with @WebService). Now we get a lot of lazy loading exceptions when the Hibernate entity is serialized, because the persistence context is not any longer available when this takes place.

Someone had the same problems and found a solution :

Only I have problems to apply this, because I do not find the correct places to configure JAXB in JBossWS.

So two things have to be done
1. set the JAXB marshaller property, only how?

marshaller.setProperty("com.sun.xml.bind.XmlAccessorFactory", true);

2. Set a JAXB property like below, but how can I pass JAXB properties in JbossWS?

  | context = JAXBContext.newInstance(new Class[] { ....}, properties);	

Would be great if someone could help


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4174907#4174907

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4174907

More information about the jboss-user mailing list