You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by luca76 <lu...@gmail.com> on 2013/08/22 14:11:46 UTC

cxf 2.7.6 server start problem whit sign_enc

Hello, i have test the: 

apache-cxf-2.7.6\samples\ws_security\sign_enc

and i have obtain the (post only the last part)exception:

Caused by: org.apache.ws.security.WSSecurityException: General security
error (WSEncryptBody/WSSignEnvelope: Element to encrypt/sign not found:
http://schemas.xmlsoap.org/soap/envelope/, Body)
at
org.apache.ws.security.message.WSSecSignatureBase.addReferencesToSign(WSSecSignatureBase.java:160)
... 25 more 

but with:
      apache-cxf-2.3.3\samples\ws_security\sign_enc, the server started
correctly.

somebody can hel me?

Thank you!











--
View this message in context: http://cxf.547215.n5.nabble.com/cxf-2-7-6-server-start-problem-whit-sign-enc-tp5732885.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: cxf 2.7.6 server start problem whit sign_enc

Posted by luca76 <lu...@gmail.com>.
Ok, perfect!

thank you!



--
View this message in context: http://cxf.547215.n5.nabble.com/cxf-2-7-6-server-start-problem-whit-sign-enc-tp5732885p5732951.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: cxf 2.7.6 server start problem whit sign_enc

Posted by Colm O hEigeartaigh <co...@apache.org>.
Ok, I see what the problem is. You are starting the 2.7.6 server with the
WS-Discovery jars on the classpath, which means it is trying to register
the service + picks up the WSS4J configuration. The solution is to remove
the cxf-services-ws-discovery-service and cxf-services-ws-discovery-api
jars from the classpath.

Colm.


On Fri, Aug 23, 2013 at 7:46 AM, luca76 <lu...@gmail.com> wrote:

> Ok, if you start the file server.java(cxf v. 2.7.6):
> <http://cxf.547215.n5.nabble.com/file/n5732936/Immagine.jpg>
>
>
> you obtain the exception:
>
> SEVERE:
> org.apache.ws.security.WSSecurityException: General security error
> (WSEncryptBody/WSSignEnvelope: Element to encrypt/sign not found:
> http://schemas.xmlsoap.org/soap/envelope/, Body)
>         at
>
> org.apache.ws.security.message.WSSecSignatureBase.addReferencesToSign(WSSecSignatureBase.java:160)
>         at
>
> org.apache.ws.security.message.WSSecSignature.addReferencesToSign(WSSecSignature.java:410)
>         at
>
> org.apache.ws.security.action.SignatureAction.execute(SignatureAction.java:97)
>         at
> org.apache.ws.security.handler.WSHandler.doSenderAction(WSHandler.java:232)
>         at
>
> org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor.access$200(WSS4JOutInterceptor.java:52)
>         at
>
> org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor$WSS4JOutInterceptorInternal.handleMessage(WSS4JOutInterceptor.java:260)
>         at
>
> org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor$WSS4JOutInterceptorInternal.handleMessage(WSS4JOutInterceptor.java:136)
>         at
>
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271)
>         at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:541)
>         at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:474)
>         at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:377)
>         at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:330)
>         at
> org.apache.cxf.endpoint.ClientImpl.invokeWrapped(ClientImpl.java:365)
>         at org.apache.cxf.jaxws.DispatchImpl.invoke(DispatchImpl.java:385)
>         at
> org.apache.cxf.jaxws.DispatchImpl.invokeOneWay(DispatchImpl.java:432)
>         at
>
> org.apache.cxf.ws.discovery.WSDiscoveryClient.register(WSDiscoveryClient.java:287)
>         at
>
> org.apache.cxf.ws.discovery.internal.WSDiscoveryServiceImpl.serverStarted(WSDiscoveryServiceImpl.java:186)
>         at
>
> org.apache.cxf.ws.discovery.listeners.WSDiscoveryServerListener.startServer(WSDiscoveryServerListener.java:73)
>         at
>
> org.apache.cxf.bus.managers.ServerLifeCycleManagerImpl.startServer(ServerLifeCycleManagerImpl.java:61)
>         at org.apache.cxf.endpoint.ServerImpl.start(ServerImpl.java:146)
>         at
> org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:360)
>         at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:251)
>         at
>
> org.apache.cxf.jaxws.spi.ProviderImpl.createAndPublishEndpoint(ProviderImpl.java:152)
>         at javax.xml.ws.Endpoint.publish(Unknown Source)
>         at demo.wssec.server.Server.<init>(Server.java:47)
>         at demo.wssec.server.Server.main(Server.java:109)
>
> ago 23, 2013 8:43:02 AM org.apache.cxf.phase.PhaseInterceptorChain
> doDefaultLogging
> WARNING: Interceptor for
> {
> http://docs.oasis-open.org/ws-dd/ns/discovery/2009/01}DiscoveryProxy#{http://cxf.apache.org/jaxws/dispatch}InvokeOneWay
> has thrown exception, unwinding now
> org.apache.cxf.binding.soap.SoapFault: Security processing failed.
>         at
>
> org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor$WSS4JOutInterceptorInternal.handleMessage(WSS4JOutInterceptor.java:275)
>         at
>
> org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor$WSS4JOutInterceptorInternal.handleMessage(WSS4JOutInterceptor.java:136)
>         at
>
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271)
>         at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:541)
>         at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:474)
>         at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:377)
>         at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:330)
>         at
> org.apache.cxf.endpoint.ClientImpl.invokeWrapped(ClientImpl.java:365)
>         at org.apache.cxf.jaxws.DispatchImpl.invoke(DispatchImpl.java:385)
>         at
> org.apache.cxf.jaxws.DispatchImpl.invokeOneWay(DispatchImpl.java:432)
>         at
>
> org.apache.cxf.ws.discovery.WSDiscoveryClient.register(WSDiscoveryClient.java:287)
>         at
>
> org.apache.cxf.ws.discovery.internal.WSDiscoveryServiceImpl.serverStarted(WSDiscoveryServiceImpl.java:186)
>         at
>
> org.apache.cxf.ws.discovery.listeners.WSDiscoveryServerListener.startServer(WSDiscoveryServerListener.java:73)
>         at
>
> org.apache.cxf.bus.managers.ServerLifeCycleManagerImpl.startServer(ServerLifeCycleManagerImpl.java:61)
>         at org.apache.cxf.endpoint.ServerImpl.start(ServerImpl.java:146)
>         at
> org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:360)
>         at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:251)
>         at
>
> org.apache.cxf.jaxws.spi.ProviderImpl.createAndPublishEndpoint(ProviderImpl.java:152)
>         at javax.xml.ws.Endpoint.publish(Unknown Source)
>         at demo.wssec.server.Server.<init>(Server.java:47)
>         at demo.wssec.server.Server.main(Server.java:109)
> Caused by: org.apache.ws.security.WSSecurityException: Error during
> Signature:
>         at
>
> org.apache.ws.security.action.SignatureAction.execute(SignatureAction.java:109)
>         at
> org.apache.ws.security.handler.WSHandler.doSenderAction(WSHandler.java:232)
>         at
>
> org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor.access$200(WSS4JOutInterceptor.java:52)
>         at
>
> org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor$WSS4JOutInterceptorInternal.handleMessage(WSS4JOutInterceptor.java:260)
>         ... 20 more
> Caused by: org.apache.ws.security.WSSecurityException: Signature creation
> failed (Cannot setup signature data structure)
>         at
>
> org.apache.ws.security.message.WSSecSignatureBase.addReferencesToSign(WSSecSignatureBase.java:191)
>         at
>
> org.apache.ws.security.message.WSSecSignature.addReferencesToSign(WSSecSignature.java:410)
>         at
>
> org.apache.ws.security.action.SignatureAction.execute(SignatureAction.java:97)
>         ... 23 more
> Caused by: org.apache.ws.security.WSSecurityException: General security
> error (WSEncryptBody/WSSignEnvelope: Element to encrypt/sign not found:
> http://schemas.xmlsoap.org/soap/envelope/, Body)
>         at
>
> org.apache.ws.security.message.WSSecSignatureBase.addReferencesToSign(WSSecSignatureBase.java:160)
>         ... 25 more
>
> Exception in thread "main" javax.xml.ws.WebServiceException:
> javax.xml.ws.soap.SOAPFaultException: Security processing failed.
>         at
> org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:369)
>         at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:251)
>         at
>
> org.apache.cxf.jaxws.spi.ProviderImpl.createAndPublishEndpoint(ProviderImpl.java:152)
>         at javax.xml.ws.Endpoint.publish(Unknown Source)
>         at demo.wssec.server.Server.<init>(Server.java:47)
>         at demo.wssec.server.Server.main(Server.java:109)
> Caused by: javax.xml.ws.soap.SOAPFaultException: Security processing
> failed.
>         at
> org.apache.cxf.jaxws.DispatchImpl.mapException(DispatchImpl.java:287)
>         at org.apache.cxf.jaxws.DispatchImpl.invoke(DispatchImpl.java:392)
>         at
> org.apache.cxf.jaxws.DispatchImpl.invokeOneWay(DispatchImpl.java:432)
>         at
>
> org.apache.cxf.ws.discovery.WSDiscoveryClient.register(WSDiscoveryClient.java:287)
>         at
>
> org.apache.cxf.ws.discovery.internal.WSDiscoveryServiceImpl.serverStarted(WSDiscoveryServiceImpl.java:186)
>         at
>
> org.apache.cxf.ws.discovery.listeners.WSDiscoveryServerListener.startServer(WSDiscoveryServerListener.java:73)
>         at
>
> org.apache.cxf.bus.managers.ServerLifeCycleManagerImpl.startServer(ServerLifeCycleManagerImpl.java:61)
>         at org.apache.cxf.endpoint.ServerImpl.start(ServerImpl.java:146)
>         at
> org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:360)
>         ... 5 more
> Caused by: org.apache.cxf.binding.soap.SoapFault: Security processing
> failed.
>         at
>
> org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor$WSS4JOutInterceptorInternal.handleMessage(WSS4JOutInterceptor.java:275)
>         at
>
> org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor$WSS4JOutInterceptorInternal.handleMessage(WSS4JOutInterceptor.java:136)
>         at
>
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271)
>         at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:541)
>         at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:474)
>         at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:377)
>         at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:330)
>         at
> org.apache.cxf.endpoint.ClientImpl.invokeWrapped(ClientImpl.java:365)
>         at org.apache.cxf.jaxws.DispatchImpl.invoke(DispatchImpl.java:385)
>         ... 12 more
> Caused by: org.apache.ws.security.WSSecurityException: Error during
> Signature:
>         at
>
> org.apache.ws.security.action.SignatureAction.execute(SignatureAction.java:109)
>         at
> org.apache.ws.security.handler.WSHandler.doSenderAction(WSHandler.java:232)
>         at
>
> org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor.access$200(WSS4JOutInterceptor.java:52)
>         at
>
> org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor$WSS4JOutInterceptorInternal.handleMessage(WSS4JOutInterceptor.java:260)
>         ... 20 more
> Caused by: org.apache.ws.security.WSSecurityException: Signature creation
> failed (Cannot setup signature data structure)
>         at
>
> org.apache.ws.security.message.WSSecSignatureBase.addReferencesToSign(WSSecSignatureBase.java:191)
>         at
>
> org.apache.ws.security.message.WSSecSignature.addReferencesToSign(WSSecSignature.java:410)
>         at
>
> org.apache.ws.security.action.SignatureAction.execute(SignatureAction.java:97)
>         ... 23 more
> Caused by: org.apache.ws.security.WSSecurityException: General security
> error (WSEncryptBody/WSSignEnvelope: Element to encrypt/sign not found:
> http://schemas.xmlsoap.org/soap/envelope/, Body)
>         at
>
> org.apache.ws.security.message.WSSecSignatureBase.addReferencesToSign(WSSecSignatureBase.java:160)
>         ... 25 more
>
>
> If you start the file server.java(cxf v. 2.3.3) it is ok, server started
> correttly!!!
>
> thank you!
>
>
>
>
>
>
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/cxf-2-7-6-server-start-problem-whit-sign-enc-tp5732885p5732936.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>



-- 
Colm O hEigeartaigh

Talend Community Coder
http://coders.talend.com

Re: cxf 2.7.6 server start problem whit sign_enc

Posted by luca76 <lu...@gmail.com>.
Ok, if you start the file server.java(cxf v. 2.7.6):
<http://cxf.547215.n5.nabble.com/file/n5732936/Immagine.jpg> 


you obtain the exception:

SEVERE: 
org.apache.ws.security.WSSecurityException: General security error
(WSEncryptBody/WSSignEnvelope: Element to encrypt/sign not found:
http://schemas.xmlsoap.org/soap/envelope/, Body)
	at
org.apache.ws.security.message.WSSecSignatureBase.addReferencesToSign(WSSecSignatureBase.java:160)
	at
org.apache.ws.security.message.WSSecSignature.addReferencesToSign(WSSecSignature.java:410)
	at
org.apache.ws.security.action.SignatureAction.execute(SignatureAction.java:97)
	at
org.apache.ws.security.handler.WSHandler.doSenderAction(WSHandler.java:232)
	at
org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor.access$200(WSS4JOutInterceptor.java:52)
	at
org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor$WSS4JOutInterceptorInternal.handleMessage(WSS4JOutInterceptor.java:260)
	at
org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor$WSS4JOutInterceptorInternal.handleMessage(WSS4JOutInterceptor.java:136)
	at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271)
	at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:541)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:474)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:377)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:330)
	at org.apache.cxf.endpoint.ClientImpl.invokeWrapped(ClientImpl.java:365)
	at org.apache.cxf.jaxws.DispatchImpl.invoke(DispatchImpl.java:385)
	at org.apache.cxf.jaxws.DispatchImpl.invokeOneWay(DispatchImpl.java:432)
	at
org.apache.cxf.ws.discovery.WSDiscoveryClient.register(WSDiscoveryClient.java:287)
	at
org.apache.cxf.ws.discovery.internal.WSDiscoveryServiceImpl.serverStarted(WSDiscoveryServiceImpl.java:186)
	at
org.apache.cxf.ws.discovery.listeners.WSDiscoveryServerListener.startServer(WSDiscoveryServerListener.java:73)
	at
org.apache.cxf.bus.managers.ServerLifeCycleManagerImpl.startServer(ServerLifeCycleManagerImpl.java:61)
	at org.apache.cxf.endpoint.ServerImpl.start(ServerImpl.java:146)
	at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:360)
	at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:251)
	at
org.apache.cxf.jaxws.spi.ProviderImpl.createAndPublishEndpoint(ProviderImpl.java:152)
	at javax.xml.ws.Endpoint.publish(Unknown Source)
	at demo.wssec.server.Server.<init>(Server.java:47)
	at demo.wssec.server.Server.main(Server.java:109)

ago 23, 2013 8:43:02 AM org.apache.cxf.phase.PhaseInterceptorChain
doDefaultLogging
WARNING: Interceptor for
{http://docs.oasis-open.org/ws-dd/ns/discovery/2009/01}DiscoveryProxy#{http://cxf.apache.org/jaxws/dispatch}InvokeOneWay
has thrown exception, unwinding now
org.apache.cxf.binding.soap.SoapFault: Security processing failed.
	at
org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor$WSS4JOutInterceptorInternal.handleMessage(WSS4JOutInterceptor.java:275)
	at
org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor$WSS4JOutInterceptorInternal.handleMessage(WSS4JOutInterceptor.java:136)
	at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271)
	at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:541)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:474)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:377)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:330)
	at org.apache.cxf.endpoint.ClientImpl.invokeWrapped(ClientImpl.java:365)
	at org.apache.cxf.jaxws.DispatchImpl.invoke(DispatchImpl.java:385)
	at org.apache.cxf.jaxws.DispatchImpl.invokeOneWay(DispatchImpl.java:432)
	at
org.apache.cxf.ws.discovery.WSDiscoveryClient.register(WSDiscoveryClient.java:287)
	at
org.apache.cxf.ws.discovery.internal.WSDiscoveryServiceImpl.serverStarted(WSDiscoveryServiceImpl.java:186)
	at
org.apache.cxf.ws.discovery.listeners.WSDiscoveryServerListener.startServer(WSDiscoveryServerListener.java:73)
	at
org.apache.cxf.bus.managers.ServerLifeCycleManagerImpl.startServer(ServerLifeCycleManagerImpl.java:61)
	at org.apache.cxf.endpoint.ServerImpl.start(ServerImpl.java:146)
	at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:360)
	at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:251)
	at
org.apache.cxf.jaxws.spi.ProviderImpl.createAndPublishEndpoint(ProviderImpl.java:152)
	at javax.xml.ws.Endpoint.publish(Unknown Source)
	at demo.wssec.server.Server.<init>(Server.java:47)
	at demo.wssec.server.Server.main(Server.java:109)
Caused by: org.apache.ws.security.WSSecurityException: Error during
Signature: 
	at
org.apache.ws.security.action.SignatureAction.execute(SignatureAction.java:109)
	at
org.apache.ws.security.handler.WSHandler.doSenderAction(WSHandler.java:232)
	at
org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor.access$200(WSS4JOutInterceptor.java:52)
	at
org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor$WSS4JOutInterceptorInternal.handleMessage(WSS4JOutInterceptor.java:260)
	... 20 more
Caused by: org.apache.ws.security.WSSecurityException: Signature creation
failed (Cannot setup signature data structure)
	at
org.apache.ws.security.message.WSSecSignatureBase.addReferencesToSign(WSSecSignatureBase.java:191)
	at
org.apache.ws.security.message.WSSecSignature.addReferencesToSign(WSSecSignature.java:410)
	at
org.apache.ws.security.action.SignatureAction.execute(SignatureAction.java:97)
	... 23 more
Caused by: org.apache.ws.security.WSSecurityException: General security
error (WSEncryptBody/WSSignEnvelope: Element to encrypt/sign not found:
http://schemas.xmlsoap.org/soap/envelope/, Body)
	at
org.apache.ws.security.message.WSSecSignatureBase.addReferencesToSign(WSSecSignatureBase.java:160)
	... 25 more

Exception in thread "main" javax.xml.ws.WebServiceException:
javax.xml.ws.soap.SOAPFaultException: Security processing failed.
	at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:369)
	at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:251)
	at
org.apache.cxf.jaxws.spi.ProviderImpl.createAndPublishEndpoint(ProviderImpl.java:152)
	at javax.xml.ws.Endpoint.publish(Unknown Source)
	at demo.wssec.server.Server.<init>(Server.java:47)
	at demo.wssec.server.Server.main(Server.java:109)
Caused by: javax.xml.ws.soap.SOAPFaultException: Security processing failed.
	at org.apache.cxf.jaxws.DispatchImpl.mapException(DispatchImpl.java:287)
	at org.apache.cxf.jaxws.DispatchImpl.invoke(DispatchImpl.java:392)
	at org.apache.cxf.jaxws.DispatchImpl.invokeOneWay(DispatchImpl.java:432)
	at
org.apache.cxf.ws.discovery.WSDiscoveryClient.register(WSDiscoveryClient.java:287)
	at
org.apache.cxf.ws.discovery.internal.WSDiscoveryServiceImpl.serverStarted(WSDiscoveryServiceImpl.java:186)
	at
org.apache.cxf.ws.discovery.listeners.WSDiscoveryServerListener.startServer(WSDiscoveryServerListener.java:73)
	at
org.apache.cxf.bus.managers.ServerLifeCycleManagerImpl.startServer(ServerLifeCycleManagerImpl.java:61)
	at org.apache.cxf.endpoint.ServerImpl.start(ServerImpl.java:146)
	at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:360)
	... 5 more
Caused by: org.apache.cxf.binding.soap.SoapFault: Security processing
failed.
	at
org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor$WSS4JOutInterceptorInternal.handleMessage(WSS4JOutInterceptor.java:275)
	at
org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor$WSS4JOutInterceptorInternal.handleMessage(WSS4JOutInterceptor.java:136)
	at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271)
	at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:541)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:474)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:377)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:330)
	at org.apache.cxf.endpoint.ClientImpl.invokeWrapped(ClientImpl.java:365)
	at org.apache.cxf.jaxws.DispatchImpl.invoke(DispatchImpl.java:385)
	... 12 more
Caused by: org.apache.ws.security.WSSecurityException: Error during
Signature: 
	at
org.apache.ws.security.action.SignatureAction.execute(SignatureAction.java:109)
	at
org.apache.ws.security.handler.WSHandler.doSenderAction(WSHandler.java:232)
	at
org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor.access$200(WSS4JOutInterceptor.java:52)
	at
org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor$WSS4JOutInterceptorInternal.handleMessage(WSS4JOutInterceptor.java:260)
	... 20 more
Caused by: org.apache.ws.security.WSSecurityException: Signature creation
failed (Cannot setup signature data structure)
	at
org.apache.ws.security.message.WSSecSignatureBase.addReferencesToSign(WSSecSignatureBase.java:191)
	at
org.apache.ws.security.message.WSSecSignature.addReferencesToSign(WSSecSignature.java:410)
	at
org.apache.ws.security.action.SignatureAction.execute(SignatureAction.java:97)
	... 23 more
Caused by: org.apache.ws.security.WSSecurityException: General security
error (WSEncryptBody/WSSignEnvelope: Element to encrypt/sign not found:
http://schemas.xmlsoap.org/soap/envelope/, Body)
	at
org.apache.ws.security.message.WSSecSignatureBase.addReferencesToSign(WSSecSignatureBase.java:160)
	... 25 more


If you start the file server.java(cxf v. 2.3.3) it is ok, server started
correttly!!!

thank you!






--
View this message in context: http://cxf.547215.n5.nabble.com/cxf-2-7-6-server-start-problem-whit-sign-enc-tp5732885p5732936.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: cxf 2.7.6 server start problem whit sign_enc

Posted by Colm O hEigeartaigh <co...@apache.org>.
You're still not telling me what the problem is. Are you running the 2.3
client against the 2.7 server? What are the exact steps to follow to
reproduce the problem?

Colm.


On Thu, Aug 22, 2013 at 4:06 PM, luca76 <lu...@gmail.com> wrote:

> cxf_2_7_6.7z <http://cxf.547215.n5.nabble.com/file/n5732902/cxf_2_7_6.7z>
> cxf2_3_3.7z <http://cxf.547215.n5.nabble.com/file/n5732902/cxf2_3_3.7z>
>
> Hello, I post the project width version 2_7_6 (project width problem)
>
> and
>
> project width version 2_3_3 (this it is ok), in this project i have created
> both server and client
>
> greetings and thanks!
>
>
>
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/cxf-2-7-6-server-start-problem-whit-sign-enc-tp5732885p5732902.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>



-- 
Colm O hEigeartaigh

Talend Community Coder
http://coders.talend.com

Re: cxf 2.7.6 server start problem whit sign_enc

Posted by luca76 <lu...@gmail.com>.
cxf_2_7_6.7z <http://cxf.547215.n5.nabble.com/file/n5732902/cxf_2_7_6.7z>  
cxf2_3_3.7z <http://cxf.547215.n5.nabble.com/file/n5732902/cxf2_3_3.7z>  

Hello, I post the project width version 2_7_6 (project width problem)

and

project width version 2_3_3 (this it is ok), in this project i have created
both server and client

greetings and thanks!



--
View this message in context: http://cxf.547215.n5.nabble.com/cxf-2-7-6-server-start-problem-whit-sign-enc-tp5732885p5732902.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: cxf 2.7.6 server start problem whit sign_enc

Posted by Colm O hEigeartaigh <co...@apache.org>.
You could attach it to the JIRA you created.

Colm.


On Thu, Aug 22, 2013 at 3:20 PM, luca76 <lu...@gmail.com> wrote:

> Yes, but how I can post you the project?
>
>
>
>
>
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/cxf-2-7-6-server-start-problem-whit-sign-enc-tp5732885p5732896.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>



-- 
Colm O hEigeartaigh

Talend Community Coder
http://coders.talend.com

Re: cxf 2.7.6 server start problem whit sign_enc

Posted by luca76 <lu...@gmail.com>.
Yes, but how I can post you the project?





--
View this message in context: http://cxf.547215.n5.nabble.com/cxf-2-7-6-server-start-problem-whit-sign-enc-tp5732885p5732896.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: cxf 2.7.6 server start problem whit sign_enc

Posted by Colm O hEigeartaigh <co...@apache.org>.
Could you supply a project to reproduce the error?

Colm.


On Thu, Aug 22, 2013 at 2:34 PM, luca76 <lu...@gmail.com> wrote:

> Yes, you replay it is correct because,
>
> I have made this change:
>
> this code(soap11):
>
> private static final String WSU_NS =
> "
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd
> ";
> outProps.put("encryptionParts", "{Element}{" + WSU_NS + "}Timestamp;"
> + "{Content}{http://schemas.xmlsoap.org/soap/envelope/}Body");
> outProps.put("signatureParts", "{Element}{" + WSU_NS + "}Timestamp;"
> + "{Element}{http://schemas.xmlsoap.org/soap/envelope/}Body");
>
> whith(soap12):
>
> private static final String WSU_NS =
> "
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd
> ";
> outProps.put("encryptionParts", "{Element}{" + WSU_NS + "}Timestamp;"
> + "{Content}{http://www.w3.org/2003/05/soap-envelope}Body");
> outProps.put("signatureParts", "{Element}{" + WSU_NS + "}Timestamp;"
> + "{Element}{http://www.w3.org/2003/05/soap-envelope}Body");
>
> But i have this warning:
>
> WARNING: Interceptor for
> {
> http://docs.oasis-open.org/ws-dd/ns/discovery/2009/01}Discovery#{http://cxf.apache.org/jaxws/provider}invoke
> has thrown exception, unwinding now
> org.apache.cxf.binding.soap.SoapFault: MustUnderstand headers:
> [{
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}Security
> ]
> are not understood.
> at
>
> org.apache.cxf.binding.soap.interceptor.MustUnderstandInterceptor$MustUnderstandEndingInterceptor.handleMessage(MustUnderstandInterceptor.java:281)
> at
>
> org.apache.cxf.binding.soap.interceptor.MustUnderstandInterceptor$MustUnderstandEndingInterceptor.handleMessage(MustUnderstandInterceptor.java:259)
> at
>
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271)
> at
>
> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
> at
>
> org.apache.cxf.transport.udp.UDPDestination$MCastListener$2.run(UDPDestination.java:106)
> at
>
> org.apache.cxf.workqueue.AutomaticWorkQueueImpl$3.run(AutomaticWorkQueueImpl.java:428)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
> at
>
> org.apache.cxf.workqueue.AutomaticWorkQueueImpl$AWQThreadFactory$1.run(AutomaticWorkQueueImpl.java:353)
> at java.lang.Thread.run(Unknown Source)
>
>
> But the problem is that i have copy e past the sample sign_enc, and the
> libraries of cxf 2.3.3 ,whith the version 2.3.3 not prolem,  the client e
> server  handshake correttly.
>
> But,...
>
> If I change simply the libraries(use the libraries of cxf 2.7.6), whit same
> project(sample sign_enc by cxf 2.3.3), I have the problem over posted.
>
> I use:
> apache-tomcat-7.0.30-windows-x64
> jdk 1.7
> eclipse-jee-juno-win32-x86_64
>
> post my configuration:
>
> <http://cxf.547215.n5.nabble.com/file/n5732888/Immagine.jpg>
>
>
> thank you!
>
>
>
>
>
>
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/cxf-2-7-6-server-start-problem-whit-sign-enc-tp5732885p5732888.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>



-- 
Colm O hEigeartaigh

Talend Community Coder
http://coders.talend.com

Re: cxf 2.7.6 server start problem whit sign_enc

Posted by luca76 <lu...@gmail.com>.
Yes, you replay it is correct because,

I have made this change:

this code(soap11):

private static final String WSU_NS =
"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
outProps.put("encryptionParts", "{Element}{" + WSU_NS + "}Timestamp;"
+ "{Content}{http://schemas.xmlsoap.org/soap/envelope/}Body");
outProps.put("signatureParts", "{Element}{" + WSU_NS + "}Timestamp;"
+ "{Element}{http://schemas.xmlsoap.org/soap/envelope/}Body");

whith(soap12):

private static final String WSU_NS =
"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
outProps.put("encryptionParts", "{Element}{" + WSU_NS + "}Timestamp;"
+ "{Content}{http://www.w3.org/2003/05/soap-envelope}Body");
outProps.put("signatureParts", "{Element}{" + WSU_NS + "}Timestamp;"
+ "{Element}{http://www.w3.org/2003/05/soap-envelope}Body");

But i have this warning:

WARNING: Interceptor for
{http://docs.oasis-open.org/ws-dd/ns/discovery/2009/01}Discovery#{http://cxf.apache.org/jaxws/provider}invoke
has thrown exception, unwinding now
org.apache.cxf.binding.soap.SoapFault: MustUnderstand headers:
[{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}Security]
are not understood.
at
org.apache.cxf.binding.soap.interceptor.MustUnderstandInterceptor$MustUnderstandEndingInterceptor.handleMessage(MustUnderstandInterceptor.java:281)
at
org.apache.cxf.binding.soap.interceptor.MustUnderstandInterceptor$MustUnderstandEndingInterceptor.handleMessage(MustUnderstandInterceptor.java:259)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271)
at
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
at
org.apache.cxf.transport.udp.UDPDestination$MCastListener$2.run(UDPDestination.java:106)
at
org.apache.cxf.workqueue.AutomaticWorkQueueImpl$3.run(AutomaticWorkQueueImpl.java:428)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at
org.apache.cxf.workqueue.AutomaticWorkQueueImpl$AWQThreadFactory$1.run(AutomaticWorkQueueImpl.java:353)
at java.lang.Thread.run(Unknown Source) 


But the problem is that i have copy e past the sample sign_enc, and the
libraries of cxf 2.3.3 ,whith the version 2.3.3 not prolem,  the client e
server  handshake correttly.

But,...

If I change simply the libraries(use the libraries of cxf 2.7.6), whit same
project(sample sign_enc by cxf 2.3.3), I have the problem over posted.

I use:
apache-tomcat-7.0.30-windows-x64
jdk 1.7
eclipse-jee-juno-win32-x86_64

post my configuration:

<http://cxf.547215.n5.nabble.com/file/n5732888/Immagine.jpg> 


thank you!






--
View this message in context: http://cxf.547215.n5.nabble.com/cxf-2-7-6-server-start-problem-whit-sign-enc-tp5732885p5732888.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: cxf 2.7.6 server start problem whit sign_enc

Posted by Colm O hEigeartaigh <co...@apache.org>.
As stated in the JIRA you raised, the sample itself works fine. So the
issue is that you have modified the sample in some way and it is not
working. It looks like you are using SOAP 1.2 and so you will need to
change the namespace of the encryption + signature parts accordingly.

Colm.


On Thu, Aug 22, 2013 at 1:11 PM, luca76 <lu...@gmail.com> wrote:

> Hello, i have test the:
>
> apache-cxf-2.7.6\samples\ws_security\sign_enc
>
> and i have obtain the (post only the last part)exception:
>
> Caused by: org.apache.ws.security.WSSecurityException: General security
> error (WSEncryptBody/WSSignEnvelope: Element to encrypt/sign not found:
> http://schemas.xmlsoap.org/soap/envelope/, Body)
> at
>
> org.apache.ws.security.message.WSSecSignatureBase.addReferencesToSign(WSSecSignatureBase.java:160)
> ... 25 more
>
> but with:
>       apache-cxf-2.3.3\samples\ws_security\sign_enc, the server started
> correctly.
>
> somebody can hel me?
>
> Thank you!
>
>
>
>
>
>
>
>
>
>
>
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/cxf-2-7-6-server-start-problem-whit-sign-enc-tp5732885.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>



-- 
Colm O hEigeartaigh

Talend Community Coder
http://coders.talend.com