cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kulp <dk...@apache.org>
Subject Re: error: No encryption crypto object found
Date Tue, 07 Sep 2010 17:55:40 GMT
On Monday 06 September 2010 9:22:50 am kr wrote:
>   Getting org.apache.cxf.interceptor.Fault: No encryption crypto object
> found.

Without seeing the full wsdl, it's hard to completely diagnose.  However, 
looking at the stack trace and the error, it LOOKS like that service has a 
policy that states that something in the message must be digitally signed.  In 
that case, you would need to configure the SecurityPolicy runtime with the 
keystore stuff and such to be able to provide the digital signatures. 

See:
http://cxf.apache.org/docs/ws-securitypolicy.html
In particular the stuff about the signature properties and such.


Dan



> 
> when i try to consume a .Net web service :
> The endpoint is defined in WSDL:
> 
> - <wsdl:service name="CourseCatalogService">
> *- <wsdl:port name="WSHttpBinding_CourseCatalog"
> binding="i0:WSHttpBinding_CourseCatalog">*
> <soap12:address location="http://test.webservice.svc" />
> - <wsa10:EndpointReference>
> <wsa10:Address>http://test.webservice.svc</wsa10:Address>
> - <Identity
> xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity">
> - <KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
> - <X509Data>
> <X509Certificate>MIIB9TCCAV6gAwIBAgIQi44rt4TniIxH4RQppZnvqjANBgkqhkiG9w0BAQ
> QFADATMREwDwYDVQQDEwhTTFNlcnZlcjAgFw0wNjEyMzEyMzAwMDBaGA8yMDk4MTIzMTIzMDAwM
> FowEzERMA8GA1UEAxMIU0xTZXJ2ZXIwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBALi5T5Oi
> asfwCHqS22ddltwIoJGgw7xYw0COaiIeOiRsipIUnfP1v9oCiWgWzIzHNODck/J2YLWS8+ncdRZ
> yNZT3nqxrwE4Xinfscwc5gbAGY4iBIMwvx0fF72I67PWUEfPbBLcG8CXT3jyDY4LvGy9PB6qZ8/
> ECL8d90ieFnSE/AgMBAAGjSDBGMEQGA1UdAQQ9MDuAENGjsAA4CfcDesZTdZuGGtihFTATMREwD
> wYDVQQDEwhTTFNlcnZlcoIQi44rt4TniIxH4RQppZnvqjANBgkqhkiG9w0BAQQFAAOBgQAvHH9K
> jfu51Dk6VGHm8p0Lb+SpKceMXjSIDEH0q42t41J+miPa66dB6CnF3ljTYBeblG82f8+So70K0/Y
> c463hSZu7A35EdjxXiOioy/Qw26r4v/vairftlunibN6jT1LqkP/79GQCh8x75X7bGTppNq3oyV
> YfdWdZGMMTrbLMJg==</X509Certificate>
> 
> </X509Data>
> </KeyInfo>
> </Identity>
> </wsa10:EndpointReference>
> </wsdl:port>
> </wsdl:service>
> 
> 
> Exception:
> org.apache.cxf.interceptor.Fault: No encryption crypto object found.
>      at
> org.apache.cxf.ws.security.wss4j.policyhandlers.SymmetricBindingHandler.doS
> ignBeforeEncrypt(SymmetricBindingHandler.java:384) at
> org.apache.cxf.ws.security.wss4j.policyhandlers.SymmetricBindingHandler.han
> dleBinding(SymmetricBindingHandler.java:113) at
> org.apache.cxf.ws.security.wss4j.PolicyBasedWSS4JOutInterceptor$PolicyBased
> WSS4JOutInterceptorInternal.handleMessage(PolicyBasedWSS4JOutInterceptor.ja
> va:130) at
> org.apache.cxf.ws.security.wss4j.PolicyBasedWSS4JOutInterceptor$PolicyBased
> WSS4JOutInterceptorInternal.handleMessage(PolicyBasedWSS4JOutInterceptor.ja
> va:73) at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChai
> n.java:243) at
> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:484) at
> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:310) at
> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:262) at
> org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
> 
> I tried to set crediential on client side., by this but still get the
> same fault msg: No encryption crypto fond
> 
> final Map<String, Object> requestContext = ((BindingProvider)
> port).getRequestContext();
> requestContext.put("ws-security.username", user.getUserName());
> requestContext.put("ws-security.password", user.getPassword());
> 
> Nice if any body can tell me how to get the endpoint port,
> *WSHttpBinding_CourseCatalog *.,
> 
> Regards
> Karan

-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog

Mime
View raw message