I am trying to setup an outbound interceptor for my webservice security header. However, when I instantiate WSS4JStaxOutInterceptor class like following:
Map<String, Object> outboundProp = new HashMap<String, Object>();
//Inserting some outbound properties
WSS4JStaxOutInterceptor outInterceptor = new WSS4JStaxOutInterceptor(outboundProp);
I get following exception
Caused by: java.lang.RuntimeException:
org.apache.xml.security.stax.impl.resourceResolvers.ResolverFilesystem
cannot be cast to org.apache.xml.security.stax.ext.ResourceResolverLookup
at org.apache.wss4j.stax.setup.WSSec.<clinit>(WSSec.java:84)
... 16 more
Caused by: org.apache.xml.security.stax.ext.XMLSecurityConfigurationException:
org.apache.xml.security.stax.impl.resourceResolvers.ResolverFilesystem
cannot be cast to org.apache.xml.security.stax.ext.ResourceResolverLookup
Original Exception was java.lang.ClassCastException:
org.apache.xml.security.stax.impl.resourceResolvers.ResolverFilesystem
cannot be cast to org.apache.xml.security.stax.ext.ResourceResolverLookup
at org.apache.xml.security.stax.config.Init.init(Init.java:92)
at org.apache.wss4j.stax.setup.WSSec.<clinit>(WSSec.java:62)
... 16 more
Caused by: java.lang.ClassCastException:
org.apache.xml.security.stax.impl.resourceResolvers.ResolverFilesystem
cannot be cast to org.apache.xml.security.stax.ext.ResourceResolverLookup
at org.apache.xml.security.stax.config.ResourceResolverMapper.init(ResourceResolverMapper.java:48)
at org.apache.xml.security.stax.config.Init.init(Init.java:85)
... 17 more
What is really weird is ResolverFilesystem implements ResourceResolverLookup. So why would it throw class cast exception?
Your help is greatly appreciated.