org.apache.cxf.ws.policy.PolicyException: Reference to policy #policy could not be resolved
Issue
- We are getting this exception in the log files, whenever we are trying to hit the service endpoint,
org.apache.cxf.ws.policy.PolicyException: Reference to policy #policy could not be resolved
- Our CXF endpoint configuration in the route is as below,
<cxf:cxfEndpoint id="myService" address="" > wsdlURL="myservice.wsdl" serviceClass="com.redhat.SomeClass"> > > <cxf:features> > <p:policies enabled="false" ></p:policies> > </cxf:features> > > <cxf:inInterceptors> > <ref bean="loggingInInterceptor" ></ref> > <!-- <ref bean="wss4jInInterceptor"></ref> --> > </cxf:inInterceptors> > > <cxf:outInterceptors> > <ref bean="loggingOutInterceptor" ></ref> >
<bean class="org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor" ></bean> > <bean class="org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor"> > <property name="properties"> > <map> > <entry key="action" value="UsernameToken" ></entry> > <entry key="passwordType" value="PasswordText" ></entry> > <entry key="user" value="IFACE" ></entry> > <entry key="passwordCallbackRef" value-ref="passwordCallback" ></entry> > </map> > </property> > </bean> > </cxf:outInterceptors> > </cxf:cxfEndpoint> > > <bean id="passwordCallback" class="com.redhat.WSPasswordCallbackHandler" > > <property name="username" value="someUsername" ></property> > <property name="password" value="somePassword" ></property> > </bean>
Environment
- Red Hat JBoss Fuse
- 6.x
- Red Hat JBoss Enterprise Application Platform (EAP)
- 6.x
- Apache CXF
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
