On Wed December 2 2009 12:44:22 am Glen Mazza wrote: > OK, judging from here: http://tinyurl.com/yatskw4 and > http://tinyurl.com/y9e7rjf the "name" attribute of jaxws:client must point > to the name of the wsdl:port within the wsdl:service section, *not* the > name of the wsdl:service. I'll update the docs to clarify that. That > doesn't completely solve my problem, as I'm still getting some "No > assertion builder for type..." error messages (it can't understand all of > the SecPol elements I'm using), but I'll research that further.
If they are standard SecPol elements, please log them as bugs. We definitely need to get them supported. Dan > > Glen > > Glen Mazza wrote: > > 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.po > >licyNotAsserted(AbstractBindingBuilder.java:278) [INFO] at > > org.apache.cxf.ws.security.wss4j.policyhandlers.AbstractBindingBuilder.ge > >tSignatureBuider(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-Confi > >guringviaSpring > -- Daniel Kulp [email protected] http://www.dankulp.com/blog
