> > However WS-SecurityPolicy "SignedParts" should meet your requirements > How can I indicate that a certain signed part (like the RelatesTo field) > is optional? > > I thought this isn't possible and this was the reason of David's solution: > > http://davidvaleri.wordpress.com/2010/09/15/signing-ws-addressing-headers-in-apache-cxf/ >
No, SignedParts only signs an Element (or enforces that it is signed) if it is present in the request. Colm. > > -----Original Message----- > > From: Colm O hEigeartaigh [mailto:cohei...@apache.org] > > Sent: dinsdag 9 september 2014 19:47 > > To: users@cxf.apache.org > > Subject: Re: Cont: upgrading cxf client to 3.0.1 > > > > OPTIONAL_SIGNATURE_PARTS only works with the older approach of > > specifying "actions" for security - it doesn't work with WS- > > SecurityPolicy. However WS-SecurityPolicy "SignedParts" should meet > > your requirements. With regards to your other question, I think you > > need to create a testcase that reproduces the problem... > > > > Colm. > > > > On Tue, Sep 9, 2014 at 4:37 PM, Ed Bras <z...@debrasjes.com> wrote: > > > > > Please some advice on the following cxf client config: > > > > > > After upgrading to 3.0.1. The security isn't included as it should. > > > To solve this I currently try to use WS-SecurityPolicy auto config > > > such that it's automatically included. > > > Before I did this manual as I have optional filled fields that needed > > > to be included in the signature, I used the solution as explained in: > > > > > > http://davidvaleri.wordpress.com/2010/09/15/signing-ws-addressing- > > head > > > ers-in > > > -apache-cxf/ > > > I want to use the new WSS4J 2.0 OPTIONAL_SIGNATURE_PARTS as an > > alternative. > > > > > > Anyway: for some reason the policy info isn't used from the wsdl, as > > > such not used/included in the soap message. > > > I think because the wsdl location isn't known, so I added the > > > wsdLocation to the client, but then it complaints it can't find the > > > service definition. > > > How do I solve this? See the config below. > > > > > > Note: I define the serviceClass and address manually in the config > > > below as the Service and Port name in the wsdl are the same and CXF > > > didn't like that (at least not with version 2.X). > > > In the past I dropped a question about it in SO: > > > > > > http://stackoverflow.com/questions/13591514/how-to-deal-with-same- > > serv > > > ice-an > > > d-port-name-in-cxf > > > > > > > > > The client config snippet: > > > ------------------- > > > <jaxws:client id="preProductionClient" > > > serviceClass="com.bla.service.DeliveryServiceV12" > > > > > > address="https://preprod.bla.nl/wus/2.0/deliveryservice/1.2" > > > wsdlLocation="/wsdl/DeliverPreProd_1.2.wsdl"> > > > ------------ > > > > > > > > > The exception: > > > -------------- > > > Caused by: > > org.apache.cxf.service.factory.ServiceConstructionException: > > > Could not find definition for service {http:// > > > > > https://preprod.bla.nl/wus/2.0/deliveryservice/1.2/}DeliveryServiceV12. > > > -------------- > > > > > > - Ed > > > > > > > > > > > > -- > > Colm O hEigeartaigh > > > > Talend Community Coder > > http://coders.talend.com > > -- Colm O hEigeartaigh Talend Community Coder http://coders.talend.com