Running CXF+WSS4J on Weblogic

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Running CXF+WSS4J on Weblogic

Dmitriev Vadim

I'm trying to create WS-S enabled service based on CXF to run inside
WebLogic container. Currently I got stuck at overriding custom weblogic
classes related to XML processing. Sadly, this certified enterprise
bla-bla-bla server doesn't ship level 3 DOM and many other JVM XML
services required for WSS4J (and Apache Santuario underneath it) to run.

First, XMLInputFactory shipped with WL eventually created half-working
DOM that was failing when both WSS4JInInterceptor was installed and
schema-validation-enabled was set to "true" on the endpoint:
java.lang.AssertionError: UNIMPLEMENTED
     at weblogic.xml.domimpl.NodeImpl.getUserData(

Ok, got around it by specifying on the
<entry key="">
<bean class="com.ctc.wstx.stax.WstxInputFactory"/>

Figure two: now I'm getting
java.lang.AssertionError: UNIMPLEMENTED

There is a workaround for this problem too by setting system property
"org.apache.cxf.binding.soap.messageFactoryClassName" to JVM's own
MessageFactory. Though it works, this solution has downsides:
1. it is set for the whole JVM, not CXF instance. It can have
unpredictable effects on the other CXF apps installed on the same app
2. this property is not per SOAP version. So if I set it to SOAP 1.1
MessageFactory, SOAP 1.2 may stop working.

I wanted to fix these issues before going production. My initial attempt
was to define impl classes for both SOAP 1.1 and 1.2 message factories
in SoapMessage contextual properties and cache instantiated objects in
o.a.c.binding.soap.saaj.SAAJFactoryResolver. Now that I described source
of the problems, is my approach proper from architectural POV? Is it
worth filing an enhancement ticket for this?


P.S. They do really love "AssertionError("UNIMPLEMENTED")" there at
P.P.S. Sorry for all there emotions, but I'm very very tired of this app