Hello, I'm trying to use WS-SecurityPolicy with the X.509 token profile and want to set the SOAP client signature/encryption policies via a jaxws:client block in a cxf.xml file, as shown here[1] When I run the SOAP client, CXF outputs that it has loaded the cxf.xml file, but it says it can't find the "signature username" I defined within the jaxws:client block. CXF debugging is seeming to indicate that the SOAP client is not detecting the jaxws:client element within the cxf.xml and hence isn't reading the signature username.
Error message: [INFO] Caused by: org.apache.cxf.ws.policy.PolicyException: No signature username found. [INFO] at org.apache.cxf.ws.security.wss4j.policyhandlers.AbstractBindingBuilder.policyNotAsserted(AbstractBindingBuilder.java:278) [INFO] at org.apache.cxf.ws.security.wss4j.policyhandlers.AbstractBindingBuilder.getSignatureBuider(AbstractBindingBuilder.java:1220) My cxf.xml: <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:http="http://cxf.apache.org/transports/http/configuration" 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"> <jaxws:client name="{http://www.example.org/contract/DoubleIt}DoubleItService" createdFromAPI="true"> <jaxws:properties> <entry key="ws-security.signature.username" value="myclientkey"/> <entry key="ws-security.encryption.username" value="myservicekey"/> <entry key="ws-security.callback-handler" value="com.mycompany.webservice.client.ClientKeystorePasswordCallback"/> <entry key="ws-security.signature.properties" value="clientKeystore.properties"/> <entry key="ws-security.encryption.properties" value="clientKeystore.properties"/> </jaxws:properties> </jaxws:client> </beans> I think my problem is with the "name" attribute above--it *should* work but somehow it is not mapping to the service defined in the WSDL. The WSDL (minus the WS-Policy stuff) is here: http://www.jroller.com/gmazza/entry/creating_a_wsdl_first_web1#WFstep4 Can anyone see what I'm doing wrong? Thanks, Glen [1] http://cxf.apache.org/docs/ws-securitypolicy.html#WS-SecurityPolicy-ConfiguringviaSpring -- View this message in context: http://old.nabble.com/Problem-getting-SOAP-client-to-read-jaxws%3Aproperties-tp26560671p26560671.html Sent from the cxf-user mailing list archive at Nabble.com.
