So one of my recent projects involved sending some data to a SOAP service. Something I took to be trivial. It was until the requirement of MTOM bindings, SAML assertions and a huge schema came into play.
IBM WebSphere 6.1 (WAS) doesn't support MTOM so we had to use WAS 8.
Then I hit this wonderful error:
Caused by: java.lang.ClassCastException: oasis.names.tc.ebxml_regrep.xsd.rim._3.ExtrinsicObjectType incompatible with javax.xml.bind.JAXBElement
at oasis.names.tc.ebxml_regrep.xsd.rim._3.RegistryObjectListType_JAXB_Serialization_Stub.write(oasis.names.tc.ebxml_regrep.xsd.rim._3.RegistryObjectListType_JAXB_Serialization_Stub.java)
at oasis.names.tc.ebxml_regrep.xsd.lcm._3.SubmitObjectsRequest_JAXB_Serialization_Stub.write(oasis.names.tc.ebxml_regrep.xsd.lcm._3.SubmitObjectsRequest_JAXB_Serialization_Stub.java)
at ihe.iti.xds_b._2007.ProvideAndRegisterDocumentSetRequestType_JAXB_Serialization_Stub.write(ihe.iti.xds_b._2007.ProvideAndRegisterDocumentSetRequestType_JAXB_Serialization_Stub.java)
After a ticket with IBM I finally received the workaround after 3 weeks.
Set the following custom JVM property
com.ibm.xml.xlxp.jaxb.opti.level = 0
For those who do not know how to set custom properties:
http://publib.boulder.ibm.com/infocenter/wasinfo/v8r0/index.jsp?topic=%2Fcom.ibm.websphere.nd.iseries.doc%2Finfo%2Fiseriesnd%2Fae%2Fxrun_jvm.html