Dear NG, I would like to use WS-Policy with CXF. For that, I prepared a WSDL-file that contains a policy plus a policy reference (working well with Sun's Metro). I followed the scarce info from the user guide to activate the policy engine and tried the following config:
<?xml version="1.0" encoding="UTF-8"?> <!-- CXF configuration file --> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:http="http://cxf.apache.org/transports/http/configuration" xmlns:p="http://cxf.apache.org/policy-config" xsi:schemaLocation="http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> <bean id="org.apache.cxf.ws.policy.PolicyEngine" class="org.apache.cxf.ws.policy.spring.InitializingPolicyEngine"> <property name="bus" ref="cxf" /> <property name="enabled" value="true" /> </bean> <p:engine enabled="true" ignoreUnknownAssertions="false" /> </beans> but then I get an error because the assertion to enable the policy engine is not recognized by the parser: [java] Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'p:engine'. [java] at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) [java] at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(Unknown Source) [java] at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source) [java] at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source) [java] at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(Unknown Source) [java] at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(Unknown Source) [java] at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source) [java] at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.emptyElement(Unknown Source) [java] at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) [java] at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source) [java] at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source) [java] at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source) [java] at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) [java] at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) [java] at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) [java] at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source) [java] at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source) [java] at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source) [java] at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:76) [java] at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:351) What's the problem here? How do I enable CXF to load the policy and conform to the security assertions within? I'm using CXF 2.0.2. Regards, Till. --------------------------------------------------------------------- Till Haselmann Diplomand viadee Unternehmensberatung GmbH [EMAIL PROTECTED] www.viadee.de
