I think you should inline policy expressions like this, have a look please at
ws-policy system tests :
<beans xmlns:p="http://cxf.apache.org/policy"
xsi:schemaLocation="...http://cxf.apache.org/policy
http://cxf.apache.org/schemas/policy.xsd...">
<jaxws:endpoint id="echoService"
implementor="com.example.EchoService" address="/echo">
<jaxws:features>
<p:policies>
<wsp:PolicyReference URI="#PolicyId"/>
</p:policies>
</jaxws:features>
</jaxws:endpoint>
<wsp:Policy wsu:Id="PolicyId">
<!-- ... -->
</wsp:Policy>
</beans>
But, as I said earlier, CXF is not capable yet of automatically propagating such policy expressions into a generated wsdl, hence, at
the moment, you need to do something like this :
<jaxws:endpoint id="echoService"
wsdlLocation="META-INF/wsdl/hello.wsdl"/>
With no policy expressions in the spring config but only in the explicitly created wsdl, this is only needed if the task is to have
a non-CXF policy aware client like a NET client be capable of consuming the endpoint as expected :
<wsdl:definitions>
<wsdl:service>
<wsdl:port>
<!-- your policy expression goes here -->
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Hope this helps
Sergey
----- Original Message -----
From: "Gerhard Schlager" <[EMAIL PROTECTED]>
To: <cxf-user@incubator.apache.org>
Sent: Wednesday, April 16, 2008 10:04 PM
Subject: Re: CXF, WS-Policy and Spring
BTW, this is the content of my Spring config file which leads to the
exception.
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jaxws="http://cxf.apache.org/jaxws"
xmlns:wsp="http://www.w3.org/2006/07/ws-policy"
xmlns:wsrm="http://schemas.xmlsoap.org/ws/2005/02/rm/policy"
xmlns:wsam="http://www.w3.org/2007/02/addressing/metadata"
xmlns:mtom="http://schemas.xmlsoap.org/ws/2004/09/policy/optimizedmimeserialization"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
<import resource="classpath:META-INF/cxf/cxf.xml" />
<import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
<import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
<jaxws:endpoint id="echoService"
implementor="com.example.EchoService" address="/echo">
<jaxws:features>
<wsp:Policy>
<wsrm:RMAssertion>
<wsrm:InactivityTimeout Milliseconds="600000" />
<wsrm:AcknowledgementInterval Milliseconds="200" />
</wsrm:RMAssertion>
<wsam:Addressing>
<wsp:Policy />
</wsam:Addressing>
<mtom:OptimizedMimeSerialization />
</wsp:Policy>
</jaxws:features>
</jaxws:endpoint>
</beans>
I have the following JARs in my build path:
asm-2.2.3.jar
commons-logging-1.1.jar
cxf-2.0.5-incubator.jar
geronimo-activation_1.1_spec-1.0.2.jar
geronimo-annotation_1.0_spec-1.1.1.jar
geronimo-javamail_1.4_spec-1.2.jar
geronimo-servlet_2.5_spec-1.1.2.jar
geronimo-stax-api_1.0_spec-1.0.1.jar
geronimo-ws-metadata_2.0_spec-1.1.2.jar
jaxb-api-2.0.jar
jaxb-impl-2.0.5.jar
jaxws-api-2.0.jar
jetty-6.1.8.jar
jetty-util-6.1.8.jar
neethi-2.0.2.jar
saaj-api-1.3.jar
saaj-impl-1.3.jar
slf4j-api-1.3.1.jar
slf4j-jdk14-1.3.1.jar
wsdl4j-1.6.1.jar
wstx-asl-3.2.4.jar
xml-resolver-1.2.jar
XmlSchema-1.3.2.jar
spring.jar
Maybe those details help finding the cause of the exception.
--
View this message in context:
http://www.nabble.com/CXF%2C-WS-Policy-and-Spring-tp16718063p16733491.html
Sent from the cxf-user mailing list archive at Nabble.com.
----------------------------
IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland