I am using Tomcat 7, CXF 2.7.14 and Spring 4.1.4.RELEASE.
I want to place a XSLTInInterceptor after the signature and timestamp was validated.
Background: the body of the message contains a element with a wrong namespace, which must be replaces, before the unmarshalling happens. Right now I am getting the "unexpected element" error message.
My cxf-servlet.xml
<jaxws:endpoint
id="SecurityTokenService"
implementor="SampleSTS"
address="/SecurityTokenService"
wsdlLocation="WEB-INF/wsdl/ws-trust-1.4-service.wsdl"
xmlns:ns1="http://ift.tt/1oKkWnD"
serviceName="ns1:SecurityTokenService"
endpointName="ns1:UT_Port"
>
<jaxws:properties>
<entry key="ws-security.is-bsp-compliant" value="false"/>
...
</jaxws:properties>
<jaxws:inInterceptors>
<bean class="org.apache.cxf.binding.soap.saaj.SAAJInInterceptor"/>
<ref bean="WSS4JInInterceptor"/>
<ref bean="intransformation"/>
</jaxws:inInterceptors>
</jaxws:endpoint>
...
<bean id="intransformation" class="org.apache.cxf.feature.transform.XSLTInInterceptor">
<constructor-arg index="0" value="pre-protocol"/>
<constructor-arg index="1" value="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor"/>
<constructor-arg index="2" value="org.apache.cxf.binding.soap.saaj.SAAJInInterceptor"/>
<constructor-arg index="3" value="xsl/stylesheet.xsl"/>
</bean>
Since I am still getting the "unexpected element" error message, I believe that the interceptor was not called.
Which class/phase should I specify for this to work? Is there a way to configure a Logging interceptor right before and after the XSLTInInterceptor was called, to see if the transformation worked as expected?
Aucun commentaire:
Enregistrer un commentaire