cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tp_lmn <tp_...@yahoo.com>
Subject Question about enabling WS-Security in CXF - Webshpere
Date Fri, 24 Feb 2012 15:04:19 GMT
Hi,
I am running into an issue with trying to add WS security to my CXF client.
Any help is appreciated.

Problem: I have a CXF client prototype that sends a request using MTOM. It
runs inside a WAS (Websphere application server) server. Right now, I am
prototyping this locally on a local WAS server, and the client seems to be
able to send the MTOM request to the server and receive a response
successfully.
Now I am about to add WS-Security(usernametoken) to it. Basically added the
lines below.

WSS4JOutInterceptor wssOut = new WSS4JOutInterceptor(outSecurityProps);
		wssOut.setAllowMTOM(true);
		cxfEndpoint.getOutInterceptors().add(wssOut);

When I add ws-security the client is not working anymore with the error
below.

Exception created : java.lang.IncompatibleClassChangeError
	at
org.apache.cxf.staxutils.W3CDOMStreamWriter.writeStartElement(W3CDOMStreamWriter.java:132)
	at
org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.writeSoapEnvelopeStart(SoapOutInterceptor.java:122)
	at
org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.handleMessage(SoapOutInterceptor.java:81)

It looks like the SoapOutInterceptor is getting an error with the
W3CDOMStreamWriter. When there is no security(when I don't have
WSS4JOutInterceptor in the chain), the SoapOutInterceptor is fine and
StreamWriter used is com.ctc.wstx.sw.SimpleNsStreamWriter(from woodstox
jar). It looks like the SAAJOutInterceptor (added by wss4j) is replacing the
StreamWriter to W3CDOMStreamWriter and SoapOutInterceptor gets an error on
that one. From reading many of the forums, it may be a jar mismatch, but I
am getting to my wits end with this one.

CXF - 2.5.2
woodstox - 4.1.1
Thanks,
Tom

--
View this message in context: http://cxf.547215.n5.nabble.com/Question-about-enabling-WS-Security-in-CXF-Webshpere-tp5513025p5513025.html
Sent from the cxf-dev mailing list archive at Nabble.com.

Mime
View raw message