You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by XyLus <ma...@gmail.com> on 2009/03/10 22:48:23 UTC

servicemix-cxf-bc provider and org.apache.ws.security.WSSecurityException: The signature or decryption was invalid error

Hello All,

I am working on servicemix flow that invokes web service secured with
WS-Security X.509 Profile (incoming request should be signed with digital
signature in order to authenticate request sender and support data
integrity)

First, I developed prototype of web service client and web service using CXF
Tutorial (http://cwiki.apache.org/CXF20DOC/ws-security.html).
This prototype works fine (CXF standalone client sign message and  send it 
to web service, which verify signature , accepts requests and sends back
correct response)

After that I  tried to invoke web service using servicemix cxf-bc (version 
2008.01.0.3-fuse).
I took CXF standalone configuration (jks file, interceptors chain) and just
"translated" to servicemix-cxf-bc  xbean.xml  (please find servicemix-cxf-bc
service unit configuration in attachment).

Now when I test  my servicemix flow, everything on smx side goes fine - I
mean message is signed and sent to  web service BUT web service throws
error:

org.apache.ws.security.WSSecurityException: The signature or decryption was
invalid
... (details in web_service.log attachment )

I really don't know why the same configuration works fine for standalone CXF
client and fails in case of cxf bc service unit....

I attach cxf bc service unit configuration, smx logs and web service log.

Attachments:
http://www.nabble.com/file/p22444327/xbean.xml xbean.xml  (servicemix cxf bc
service unit)  
http://www.nabble.com/file/p22444327/client_config.xml client_config.xml (
cxf bus configuration - SSL settings)  
http://www.nabble.com/file/p22444327/servicemix.log servicemix.log (excerpt
from servicemix logs that shows CXF BC processing)  
http://www.nabble.com/file/p22444327/web_service.log web_service.log (web
service logs with error stack trace) 

Any hints, help would be really appreciated!

Regards,
Maciej


-- 
View this message in context: http://www.nabble.com/servicemix-cxf-bc-provider-and-org.apache.ws.security.WSSecurityException%3A-The-signature-or-decryption-was-invalid-error-tp22444327p22444327.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: servicemix-cxf-bc provider and org.apache.ws.security.WSSecurityException: The signature or decryption was invalid error

Posted by XyLus <ma...@gmail.com>.

Freeman Fang wrote:
> 
> Would you mind create a jira ticket and append your testcase (as you 
> already append on www.nabble.com/file), I will investigate this issue 
> later on.
> Freeman
> 
> 
> 

Done. Ticket submitted. Please check 
http://fusesource.com/issues/browse/DEV-1466

Regards,
Maciej
-- 
View this message in context: http://www.nabble.com/servicemix-cxf-bc-provider-and-org.apache.ws.security.WSSecurityException%3A-The-signature-or-decryption-was-invalid-error-tp22444327p22968587.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: servicemix-cxf-bc provider and org.apache.ws.security.WSSecurityException: The signature or decryption was invalid error

Posted by Freeman Fang <fr...@gmail.com>.
XyLus wrote:
> Freeman Fang wrote:
>   
>> Hi,
>> Could you tell me the smx version and cxf version are you using?
>> Especially check the version for xmlsec.jar  and wss4j.jar used in cxf 
>> (in CXF_HOME/lib)and in smx (you can find those two jars in 
>> servicemix-shared-installer.zip)
>> If they are different, I suggest you do a quick test with same version.
>> Freeman
>>
>>     
>
> Hi,
>
> To answer your question I use customized servicemix version
> but when it comest to servicemix-shared-installer.zip is the same as
> official one
> in 3.3.0.2 servicemix distribution
> servicemix-shared-3.3.0.2-fuse-installer.zip  contains:
> - xmlsec-1.3.0.jar
> - wss4j-1.5.1.jar
>
> I replaced them with jars my CXF server uses
>
> - xmlsec-1.4.2.jar
> - wss4j-1.5.5.jar
>
> Next according to your suggestion I did quick tast... but the result is the
> same as it used to be
> org.apache.ws.security.WSSecurityException: The signature or decryption was
> invalid error
>
> I am running out of ideas how this error could be fixed - I hope you are not
> ;-)
>
> Regards,
> Maciej
>   

Thanks.

Would you mind create a jira ticket and append your testcase (as you 
already append on www.nabble.com/file), I will investigate this issue 
later on.
Freeman


Re: servicemix-cxf-bc provider and org.apache.ws.security.WSSecurityException: The signature or decryption was invalid error

Posted by XyLus <ma...@gmail.com>.

Freeman Fang wrote:
> 
> Hi,
> Could you tell me the smx version and cxf version are you using?
> Especially check the version for xmlsec.jar  and wss4j.jar used in cxf 
> (in CXF_HOME/lib)and in smx (you can find those two jars in 
> servicemix-shared-installer.zip)
> If they are different, I suggest you do a quick test with same version.
> Freeman
> 

Hi,

To answer your question I use customized servicemix version
but when it comest to servicemix-shared-installer.zip is the same as
official one
in 3.3.0.2 servicemix distribution
servicemix-shared-3.3.0.2-fuse-installer.zip  contains:
- xmlsec-1.3.0.jar
- wss4j-1.5.1.jar

I replaced them with jars my CXF server uses

- xmlsec-1.4.2.jar
- wss4j-1.5.5.jar

Next according to your suggestion I did quick tast... but the result is the
same as it used to be
org.apache.ws.security.WSSecurityException: The signature or decryption was
invalid error

I am running out of ideas how this error could be fixed - I hope you are not
;-)

Regards,
Maciej

-- 
View this message in context: http://www.nabble.com/servicemix-cxf-bc-provider-and-org.apache.ws.security.WSSecurityException%3A-The-signature-or-decryption-was-invalid-error-tp22444327p22557850.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: servicemix-cxf-bc provider and org.apache.ws.security.WSSecurityException: The signature or decryption was invalid error

Posted by Freeman Fang <fr...@gmail.com>.
XyLus wrote:
>
> Hello Freeman,
>
> I tried your suggestion with declarative user setting in xbean.xml but  it
> does not help
>  
> I went through debug logs for cxf-client,cxf-server and smx. Please find my
> remarks below:
>
> 1.For all components (cxf-server,cxf-client,smx) floowing exception is
> thrown once:
> java.lang.ClassNotFoundException:
> org.apache.security.juice.provider.JuiCEProviderOpenSSL
> 	at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
> 	at java.security.AccessController.doPrivileged(Native Method)
> 	at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
> 	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
> 	at org.apache.ws.security.util.Loader.loadClass(Loader.java:162)
> 	at org.apache.ws.security.WSSConfig.loadProvider(WSSConfig.java:495)
> 	at org.apache.ws.security.WSSConfig.addJceProvider(WSSConfig.java:536)
> 	at org.apache.ws.security.WSSConfig.staticInit(WSSConfig.java:252)
> 	at org.apache.ws.security.WSSConfig.<init>(WSSConfig.java:269)
> 	at org.apache.ws.security.WSSConfig.getNewInstance(WSSConfig.java:278)
> 	at
> org.apache.ws.security.handler.WSHandler.doSenderAction(WSHandler.java:93)
> 	at
> org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor.access$200(WSS4JOutInterceptor.java:47)
> 	at
> org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor$WSS4JOutInterceptorInternal.handleMessage(WSS4JOutInterceptor.java:219)
> 	at
> org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor$WSS4JOutInterceptorInternal.handleMessage(WSS4JOutInterceptor.java:107)
> 	at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:226)
>
> 2. CXF client signing process log   differs from  CXFBC provider  i.e. CXF
> standalone client creates SignatureRSA using SHA1withRSA while CXFBC
> provider creates SignatureDSA using SHA1withRSACheck (3 times) Check out
> logs : cxf_signing_short.log,smx_signing_short.log
>
>   
Hi,
Could you tell me the smx version and cxf version are you using?
Especially check the version for xmlsec.jar  and wss4j.jar used in cxf 
(in CXF_HOME/lib)and in smx (you can find those two jars in 
servicemix-shared-installer.zip)
If they are different, I suggest you do a quick test with same version.
Freeman
> 3. SMX digest verification ends up with information:
>    Verification failed for URI "#id-32452563"
>    Expected Digest: 27IKaRl8+DrXZ1fiF3g/KAE+E1A=
>    Actual Digest: ICTBwMYJ6elWWsCOQgwj33auIG0=
> followed by  exception "org.apache.ws.security.WSSecurityException: The
> signature or decryption was invalid"
>
> My understanding is that digest value might differ when either content has
> changed or digest calculation algorithms are different.
> Given that content is the same (I double check that message body CXFBC sends
> and  CXF server receives are the same) and according to logs CXF client
> generates SignatureRSA
> while CXFBC uses SignatureDSA, I suspect that the root cause is different
> digest algorithm.
> How can we fix it?
>
> I tried to set RSA algorithm in following way:
>
> public class WSSSettingsHandlerInterceptor extends
> AbstractPhaseInterceptor<Message> implements
>     CallbackHandler {
>  ...
>     public void handleMessage(Message message) throws Fault {
>     ...
>     message.getExchange().put(WSHandlerConstants.SIG_ALGO, WSConstants.RSA);
>
>     }
> }
>
> But it does not help I can still see message in logs: Created SignatureDSA
> using SHA1withRSACheck
>
>
> Attachments:
>
>   http://www.nabble.com/file/p22500975/cxf_signing_short.log
> cxf_signing_short.log  - signing process by CXF client
>   http://www.nabble.com/file/p22500975/smx_signing_short.log
> smx_signing_short.log  - signing process by CXFBC provider
> http://www.nabble.com/file/p22500975/smx_digest_verication%2540server.log
> smx_digest_verication%40server.log - request digest verification by CXF
> server  (request sent by CXFBC provider)
>
> http://www.nabble.com/file/p22500975/smx_req%2540server.xml
> smx_req@server.xml - request sent by CXFBC provider
>   http://www.nabble.com/file/p22500975/cxf_req%2540server.xml
> cxf_req@server.xml - request sent by CXF client
>
>   http://www.nabble.com/file/p22500975/cxf-client.log cxf-client.log  -
> entire CXF client logs
>   http://www.nabble.com/file/p22500975/cxf-server.log cxf-server.log  -
> entire CXF server logs
>   http://www.nabble.com/file/p22500975/smx-client.log smx-client.log  -
> entire SMX client logs
>
>
> Regards,
> Maciej
>
>
>
>
>
> Freeman Fang wrote:
>   
>> Hi,
>> Before I get to investigate your testcase, I notice there is a little 
>> different between your standalone cxf client configuration and the 
>> configuration used for your cxf provider.
>> in your standalone cxf client, you use hardcode user setting like
>>                                                 <entry 
>> key="signaturePropFile"
>>                                                         
>> value="client_sign.properties" />
>>                                                 <entry key="user" 
>> value="myAlias" />
>>
>> But in your cxf provider, you choose to set the user in outgoing 
>> inteceptors,
>>                                               <entry
>> key="signaturePropFile"
>>                                         value="client_sign.properties" />
>>                                 <entry key="signatureKeyIdentifier"
>>                                         value="DirectReference" />
>>
>> even though I'm not sure if this can cause your specific error, but 
>> would you mind trying with  same configuration for standalone cxf client 
>> and cxf provider?
>>
>> Thanks
>> Freeman
>>
>> XyLus wrote:
>>     
>>> I provided   http://www.nabble.com/file/p22459654/testcase.zip testcase 
>>> - in
>>> attachment you can find:
>>>
>>> cxf-client (standalone client implemented in CXF - import to eclipse and
>>> run
>>> UploadServicePortType_UploadServicePort_Client)
>>> cxf-server (web service implemented in CXF - import to eclipse and run
>>> UploadServicePortType_UploadServicePort_Server)
>>>
>>> Those two components works fine.
>>>
>>> Attachment contains also smx test case (shown in  
>>> http://www.nabble.com/file/p22459654/smx_flow_testcase.png diagram )
>>>
>>>
>>> As you can see I use MTOM to transfer attachment - I know that CXF does
>>> not
>>> support signing attachment (WSS4J interceptor in CXF replaces xop:Include
>>> reference with attachment content and after that interecptor signs
>>> message
>>> body - this processing might be changed by setting allowMTOM property in
>>> WSS4J Interceptor to 'true' -  then soap body is singed only but
>>> xop:Include
>>> reference remains and attachment is still not signed) 
>>>
>>> Well, my point is that it works in CXF framework - I can successfuly
>>> invoke
>>> web service with both settings  (alllowMTOM=true, allowMTOM=false). Each
>>> time message is signed and signature is successfuly verified by CXF web
>>> service.
>>>
>>> When I try do this using CXF BC provider - every time I got error 
>>> 'The signature or decryption was invalid' and what is more file is always
>>> sent as an attachment (CXF BC provider does not care of  allowMTOM value
>>> in
>>> WSS4J Intreceptor)
>>>
>>>
>>> I really appreciate if someone can give me useful hint how to "transfer"
>>> working solution from CXF framework to servicemix.
>>>
>>> Regards,
>>> Maciej
>>>
>>> PS: Just to clarify, I've also  tried flow without attachment and MTOM -
>>> sending soap message without attachment ended up with the same error. 
>>>
>>>
>>>
>>>
>>> XyLus wrote:
>>>   
>>>       
>>>> Hi Freeman,
>>>>
>>>> Thanks for your reply I tried to apply your suggestion but it still does
>>>> not work.
>>>>
>>>> However, I double checked and found out that soap headers request
>>>> generated by CXF BC provider are different than SOAP headers generated
>>>> by
>>>> CXF standalone client.
>>>>
>>>> In case of CXF BC provider there is  <wsse:BinarySecurityToken> with
>>>> client certificate included
>>>>
>>>> Please have a look
>>>>
>>>>
>>>> http://www.nabble.com/file/p22454086/requestFromCXFClient%2540WebService.xml
>>>> request generated by CXF client (taken from Web service log)  
>>>>
>>>>  http://www.nabble.com/file/p22454086/request%2540WebService.xml request
>>>> generated by CXF BC provider (taken from Web service log)  
>>>>
>>>> Regards,
>>>> Maciej
>>>>
>>>>
>>>> Freeman Fang wrote:
>>>>     
>>>>         
>>>>> Hi,
>>>>> I don't see you define test prefix in your xbean.xml, you should add
>>>>> sth 
>>>>> like
>>>>> xmlns:test="http://vn.x.y.z/uploader"
>>>>>
>>>>> Also change the endpoint="CXFEndpoint" to endpoint="UploadServicePort" 
>>>>> in your xbean.xml (I believe UploadServicePort is the port name used in 
>>>>> your wsdl).
>>>>>
>>>>> If it still doesn't work then  append your wsdl used here also.
>>>>>
>>>>> Freeman
>>>>>
>>>>> XyLus wrote:
>>>>>       
>>>>>           
>>>>>> Hello All,
>>>>>>
>>>>>> I am working on servicemix flow that invokes web service secured with
>>>>>> WS-Security X.509 Profile (incoming request should be signed with
>>>>>> digital
>>>>>> signature in order to authenticate request sender and support data
>>>>>> integrity)
>>>>>>
>>>>>> First, I developed prototype of web service client and web service
>>>>>> using
>>>>>> CXF
>>>>>> Tutorial (http://cwiki.apache.org/CXF20DOC/ws-security.html).
>>>>>> This prototype works fine (CXF standalone client sign message and 
>>>>>> send
>>>>>> it 
>>>>>> to web service, which verify signature , accepts requests and sends
>>>>>> back
>>>>>> correct response)
>>>>>>
>>>>>> After that I  tried to invoke web service using servicemix cxf-bc
>>>>>> (version 
>>>>>> 2008.01.0.3-fuse).
>>>>>> I took CXF standalone configuration (jks file, interceptors chain) and
>>>>>> just
>>>>>> "translated" to servicemix-cxf-bc  xbean.xml  (please find
>>>>>> servicemix-cxf-bc
>>>>>> service unit configuration in attachment).
>>>>>>
>>>>>> Now when I test  my servicemix flow, everything on smx side goes fine
>>>>>> -
>>>>>> I
>>>>>> mean message is signed and sent to  web service BUT web service throws
>>>>>> error:
>>>>>>
>>>>>> org.apache.ws.security.WSSecurityException: The signature or
>>>>>> decryption
>>>>>> was
>>>>>> invalid
>>>>>> ... (details in web_service.log attachment )
>>>>>>
>>>>>> I really don't know why the same configuration works fine for
>>>>>> standalone
>>>>>> CXF
>>>>>> client and fails in case of cxf bc service unit....
>>>>>>
>>>>>> I attach cxf bc service unit configuration, smx logs and web service
>>>>>> log.
>>>>>>
>>>>>> Attachments:
>>>>>> http://www.nabble.com/file/p22444327/xbean.xml xbean.xml  (servicemix
>>>>>> cxf bc
>>>>>> service unit)  
>>>>>> http://www.nabble.com/file/p22444327/client_config.xml
>>>>>> client_config.xml
>>>>>> (
>>>>>> cxf bus configuration - SSL settings)  
>>>>>> http://www.nabble.com/file/p22444327/servicemix.log servicemix.log
>>>>>> (excerpt
>>>>>> from servicemix logs that shows CXF BC processing)  
>>>>>> http://www.nabble.com/file/p22444327/web_service.log web_service.log
>>>>>> (web
>>>>>> service logs with error stack trace) 
>>>>>>
>>>>>> Any hints, help would be really appreciated!
>>>>>>
>>>>>> Regards,
>>>>>> Maciej
>>>>>>
>>>>>>
>>>>>>   
>>>>>>         
>>>>>>             
>>>>>       
>>>>>           
>>>>     
>>>>         
>>>   
>>>       
>>
>>     
>
>   


Re: servicemix-cxf-bc provider and org.apache.ws.security.WSSecurityException: The signature or decryption was invalid error

Posted by XyLus <ma...@gmail.com>.


Hello Freeman,

I tried your suggestion with declarative user setting in xbean.xml but  it
does not help
 
I went through debug logs for cxf-client,cxf-server and smx. Please find my
remarks below:

1.For all components (cxf-server,cxf-client,smx) floowing exception is
thrown once:
java.lang.ClassNotFoundException:
org.apache.security.juice.provider.JuiCEProviderOpenSSL
	at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
	at org.apache.ws.security.util.Loader.loadClass(Loader.java:162)
	at org.apache.ws.security.WSSConfig.loadProvider(WSSConfig.java:495)
	at org.apache.ws.security.WSSConfig.addJceProvider(WSSConfig.java:536)
	at org.apache.ws.security.WSSConfig.staticInit(WSSConfig.java:252)
	at org.apache.ws.security.WSSConfig.<init>(WSSConfig.java:269)
	at org.apache.ws.security.WSSConfig.getNewInstance(WSSConfig.java:278)
	at
org.apache.ws.security.handler.WSHandler.doSenderAction(WSHandler.java:93)
	at
org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor.access$200(WSS4JOutInterceptor.java:47)
	at
org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor$WSS4JOutInterceptorInternal.handleMessage(WSS4JOutInterceptor.java:219)
	at
org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor$WSS4JOutInterceptorInternal.handleMessage(WSS4JOutInterceptor.java:107)
	at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:226)

2. CXF client signing process log   differs from  CXFBC provider  i.e. CXF
standalone client creates SignatureRSA using SHA1withRSA while CXFBC
provider creates SignatureDSA using SHA1withRSACheck (3 times) Check out
logs : cxf_signing_short.log,smx_signing_short.log


3. SMX digest verification ends up with information:
   Verification failed for URI "#id-32452563"
   Expected Digest: 27IKaRl8+DrXZ1fiF3g/KAE+E1A=
   Actual Digest: ICTBwMYJ6elWWsCOQgwj33auIG0=
followed by  exception "org.apache.ws.security.WSSecurityException: The
signature or decryption was invalid"

My understanding is that digest value might differ when either content has
changed or digest calculation algorithms are different.
Given that content is the same (I double check that message body CXFBC sends
and  CXF server receives are the same) and according to logs CXF client
generates SignatureRSA
while CXFBC uses SignatureDSA, I suspect that the root cause is different
digest algorithm.
How can we fix it?

I tried to set RSA algorithm in following way:

public class WSSSettingsHandlerInterceptor extends
AbstractPhaseInterceptor<Message> implements
    CallbackHandler {
 ...
    public void handleMessage(Message message) throws Fault {
    ...
    message.getExchange().put(WSHandlerConstants.SIG_ALGO, WSConstants.RSA);

    }
}

But it does not help I can still see message in logs: Created SignatureDSA
using SHA1withRSACheck


Attachments:

  http://www.nabble.com/file/p22500975/cxf_signing_short.log
cxf_signing_short.log  - signing process by CXF client
  http://www.nabble.com/file/p22500975/smx_signing_short.log
smx_signing_short.log  - signing process by CXFBC provider
http://www.nabble.com/file/p22500975/smx_digest_verication%2540server.log
smx_digest_verication%40server.log - request digest verification by CXF
server  (request sent by CXFBC provider)

http://www.nabble.com/file/p22500975/smx_req%2540server.xml
smx_req@server.xml - request sent by CXFBC provider
  http://www.nabble.com/file/p22500975/cxf_req%2540server.xml
cxf_req@server.xml - request sent by CXF client

  http://www.nabble.com/file/p22500975/cxf-client.log cxf-client.log  -
entire CXF client logs
  http://www.nabble.com/file/p22500975/cxf-server.log cxf-server.log  -
entire CXF server logs
  http://www.nabble.com/file/p22500975/smx-client.log smx-client.log  -
entire SMX client logs


Regards,
Maciej





Freeman Fang wrote:
> 
> Hi,
> Before I get to investigate your testcase, I notice there is a little 
> different between your standalone cxf client configuration and the 
> configuration used for your cxf provider.
> in your standalone cxf client, you use hardcode user setting like
>                                                 <entry 
> key="signaturePropFile"
>                                                         
> value="client_sign.properties" />
>                                                 <entry key="user" 
> value="myAlias" />
> 
> But in your cxf provider, you choose to set the user in outgoing 
> inteceptors,
>                                               <entry
> key="signaturePropFile"
>                                         value="client_sign.properties" />
>                                 <entry key="signatureKeyIdentifier"
>                                         value="DirectReference" />
> 
> even though I'm not sure if this can cause your specific error, but 
> would you mind trying with  same configuration for standalone cxf client 
> and cxf provider?
> 
> Thanks
> Freeman
> 
> XyLus wrote:
>> I provided   http://www.nabble.com/file/p22459654/testcase.zip testcase 
>> - in
>> attachment you can find:
>>
>> cxf-client (standalone client implemented in CXF - import to eclipse and
>> run
>> UploadServicePortType_UploadServicePort_Client)
>> cxf-server (web service implemented in CXF - import to eclipse and run
>> UploadServicePortType_UploadServicePort_Server)
>>
>> Those two components works fine.
>>
>> Attachment contains also smx test case (shown in  
>> http://www.nabble.com/file/p22459654/smx_flow_testcase.png diagram )
>>
>>
>> As you can see I use MTOM to transfer attachment - I know that CXF does
>> not
>> support signing attachment (WSS4J interceptor in CXF replaces xop:Include
>> reference with attachment content and after that interecptor signs
>> message
>> body - this processing might be changed by setting allowMTOM property in
>> WSS4J Interceptor to 'true' -  then soap body is singed only but
>> xop:Include
>> reference remains and attachment is still not signed) 
>>
>> Well, my point is that it works in CXF framework - I can successfuly
>> invoke
>> web service with both settings  (alllowMTOM=true, allowMTOM=false). Each
>> time message is signed and signature is successfuly verified by CXF web
>> service.
>>
>> When I try do this using CXF BC provider - every time I got error 
>> 'The signature or decryption was invalid' and what is more file is always
>> sent as an attachment (CXF BC provider does not care of  allowMTOM value
>> in
>> WSS4J Intreceptor)
>>
>>
>> I really appreciate if someone can give me useful hint how to "transfer"
>> working solution from CXF framework to servicemix.
>>
>> Regards,
>> Maciej
>>
>> PS: Just to clarify, I've also  tried flow without attachment and MTOM -
>> sending soap message without attachment ended up with the same error. 
>>
>>
>>
>>
>> XyLus wrote:
>>   
>>> Hi Freeman,
>>>
>>> Thanks for your reply I tried to apply your suggestion but it still does
>>> not work.
>>>
>>> However, I double checked and found out that soap headers request
>>> generated by CXF BC provider are different than SOAP headers generated
>>> by
>>> CXF standalone client.
>>>
>>> In case of CXF BC provider there is  <wsse:BinarySecurityToken> with
>>> client certificate included
>>>
>>> Please have a look
>>>
>>>
>>> http://www.nabble.com/file/p22454086/requestFromCXFClient%2540WebService.xml
>>> request generated by CXF client (taken from Web service log)  
>>>
>>>  http://www.nabble.com/file/p22454086/request%2540WebService.xml request
>>> generated by CXF BC provider (taken from Web service log)  
>>>
>>> Regards,
>>> Maciej
>>>
>>>
>>> Freeman Fang wrote:
>>>     
>>>> Hi,
>>>> I don't see you define test prefix in your xbean.xml, you should add
>>>> sth 
>>>> like
>>>> xmlns:test="http://vn.x.y.z/uploader"
>>>>
>>>> Also change the endpoint="CXFEndpoint" to endpoint="UploadServicePort" 
>>>> in your xbean.xml (I believe UploadServicePort is the port name used in 
>>>> your wsdl).
>>>>
>>>> If it still doesn't work then  append your wsdl used here also.
>>>>
>>>> Freeman
>>>>
>>>> XyLus wrote:
>>>>       
>>>>> Hello All,
>>>>>
>>>>> I am working on servicemix flow that invokes web service secured with
>>>>> WS-Security X.509 Profile (incoming request should be signed with
>>>>> digital
>>>>> signature in order to authenticate request sender and support data
>>>>> integrity)
>>>>>
>>>>> First, I developed prototype of web service client and web service
>>>>> using
>>>>> CXF
>>>>> Tutorial (http://cwiki.apache.org/CXF20DOC/ws-security.html).
>>>>> This prototype works fine (CXF standalone client sign message and 
>>>>> send
>>>>> it 
>>>>> to web service, which verify signature , accepts requests and sends
>>>>> back
>>>>> correct response)
>>>>>
>>>>> After that I  tried to invoke web service using servicemix cxf-bc
>>>>> (version 
>>>>> 2008.01.0.3-fuse).
>>>>> I took CXF standalone configuration (jks file, interceptors chain) and
>>>>> just
>>>>> "translated" to servicemix-cxf-bc  xbean.xml  (please find
>>>>> servicemix-cxf-bc
>>>>> service unit configuration in attachment).
>>>>>
>>>>> Now when I test  my servicemix flow, everything on smx side goes fine
>>>>> -
>>>>> I
>>>>> mean message is signed and sent to  web service BUT web service throws
>>>>> error:
>>>>>
>>>>> org.apache.ws.security.WSSecurityException: The signature or
>>>>> decryption
>>>>> was
>>>>> invalid
>>>>> ... (details in web_service.log attachment )
>>>>>
>>>>> I really don't know why the same configuration works fine for
>>>>> standalone
>>>>> CXF
>>>>> client and fails in case of cxf bc service unit....
>>>>>
>>>>> I attach cxf bc service unit configuration, smx logs and web service
>>>>> log.
>>>>>
>>>>> Attachments:
>>>>> http://www.nabble.com/file/p22444327/xbean.xml xbean.xml  (servicemix
>>>>> cxf bc
>>>>> service unit)  
>>>>> http://www.nabble.com/file/p22444327/client_config.xml
>>>>> client_config.xml
>>>>> (
>>>>> cxf bus configuration - SSL settings)  
>>>>> http://www.nabble.com/file/p22444327/servicemix.log servicemix.log
>>>>> (excerpt
>>>>> from servicemix logs that shows CXF BC processing)  
>>>>> http://www.nabble.com/file/p22444327/web_service.log web_service.log
>>>>> (web
>>>>> service logs with error stack trace) 
>>>>>
>>>>> Any hints, help would be really appreciated!
>>>>>
>>>>> Regards,
>>>>> Maciej
>>>>>
>>>>>
>>>>>   
>>>>>         
>>>>
>>>>       
>>>     
>>
>>   
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/servicemix-cxf-bc-provider-and-org.apache.ws.security.WSSecurityException%3A-The-signature-or-decryption-was-invalid-error-tp22444327p22500975.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: servicemix-cxf-bc provider and org.apache.ws.security.WSSecurityException: The signature or decryption was invalid error

Posted by Freeman Fang <fr...@gmail.com>.
Hi,
Before I get to investigate your testcase, I notice there is a little 
different between your standalone cxf client configuration and the 
configuration used for your cxf provider.
in your standalone cxf client, you use hardcode user setting like
                                                <entry 
key="signaturePropFile"
                                                        
value="client_sign.properties" />
                                                <entry key="user" 
value="myAlias" />

But in your cxf provider, you choose to set the user in outgoing 
inteceptors,
                                              <entry key="signaturePropFile"
                                        value="client_sign.properties" />
                                <entry key="signatureKeyIdentifier"
                                        value="DirectReference" />

even though I'm not sure if this can cause your specific error, but 
would you mind trying with  same configuration for standalone cxf client 
and cxf provider?

Thanks
Freeman

XyLus wrote:
> I provided   http://www.nabble.com/file/p22459654/testcase.zip testcase  - in
> attachment you can find:
>
> cxf-client (standalone client implemented in CXF - import to eclipse and run
> UploadServicePortType_UploadServicePort_Client)
> cxf-server (web service implemented in CXF - import to eclipse and run
> UploadServicePortType_UploadServicePort_Server)
>
> Those two components works fine.
>
> Attachment contains also smx test case (shown in  
> http://www.nabble.com/file/p22459654/smx_flow_testcase.png diagram )
>
>
> As you can see I use MTOM to transfer attachment - I know that CXF does not
> support signing attachment (WSS4J interceptor in CXF replaces xop:Include
> reference with attachment content and after that interecptor signs message
> body - this processing might be changed by setting allowMTOM property in
> WSS4J Interceptor to 'true' -  then soap body is singed only but xop:Include
> reference remains and attachment is still not signed) 
>
> Well, my point is that it works in CXF framework - I can successfuly invoke
> web service with both settings  (alllowMTOM=true, allowMTOM=false). Each
> time message is signed and signature is successfuly verified by CXF web
> service.
>
> When I try do this using CXF BC provider - every time I got error 
> 'The signature or decryption was invalid' and what is more file is always
> sent as an attachment (CXF BC provider does not care of  allowMTOM value in
> WSS4J Intreceptor)
>
>
> I really appreciate if someone can give me useful hint how to "transfer"
> working solution from CXF framework to servicemix.
>
> Regards,
> Maciej
>
> PS: Just to clarify, I've also  tried flow without attachment and MTOM -
> sending soap message without attachment ended up with the same error. 
>
>
>
>
> XyLus wrote:
>   
>> Hi Freeman,
>>
>> Thanks for your reply I tried to apply your suggestion but it still does
>> not work.
>>
>> However, I double checked and found out that soap headers request
>> generated by CXF BC provider are different than SOAP headers generated by
>> CXF standalone client.
>>
>> In case of CXF BC provider there is  <wsse:BinarySecurityToken> with
>> client certificate included
>>
>> Please have a look
>>
>>
>> http://www.nabble.com/file/p22454086/requestFromCXFClient%2540WebService.xml
>> request generated by CXF client (taken from Web service log)  
>>
>>  http://www.nabble.com/file/p22454086/request%2540WebService.xml request
>> generated by CXF BC provider (taken from Web service log)  
>>
>> Regards,
>> Maciej
>>
>>
>> Freeman Fang wrote:
>>     
>>> Hi,
>>> I don't see you define test prefix in your xbean.xml, you should add sth 
>>> like
>>> xmlns:test="http://vn.x.y.z/uploader"
>>>
>>> Also change the endpoint="CXFEndpoint" to endpoint="UploadServicePort" 
>>> in your xbean.xml (I believe UploadServicePort is the port name used in 
>>> your wsdl).
>>>
>>> If it still doesn't work then  append your wsdl used here also.
>>>
>>> Freeman
>>>
>>> XyLus wrote:
>>>       
>>>> Hello All,
>>>>
>>>> I am working on servicemix flow that invokes web service secured with
>>>> WS-Security X.509 Profile (incoming request should be signed with
>>>> digital
>>>> signature in order to authenticate request sender and support data
>>>> integrity)
>>>>
>>>> First, I developed prototype of web service client and web service using
>>>> CXF
>>>> Tutorial (http://cwiki.apache.org/CXF20DOC/ws-security.html).
>>>> This prototype works fine (CXF standalone client sign message and  send
>>>> it 
>>>> to web service, which verify signature , accepts requests and sends back
>>>> correct response)
>>>>
>>>> After that I  tried to invoke web service using servicemix cxf-bc
>>>> (version 
>>>> 2008.01.0.3-fuse).
>>>> I took CXF standalone configuration (jks file, interceptors chain) and
>>>> just
>>>> "translated" to servicemix-cxf-bc  xbean.xml  (please find
>>>> servicemix-cxf-bc
>>>> service unit configuration in attachment).
>>>>
>>>> Now when I test  my servicemix flow, everything on smx side goes fine -
>>>> I
>>>> mean message is signed and sent to  web service BUT web service throws
>>>> error:
>>>>
>>>> org.apache.ws.security.WSSecurityException: The signature or decryption
>>>> was
>>>> invalid
>>>> ... (details in web_service.log attachment )
>>>>
>>>> I really don't know why the same configuration works fine for standalone
>>>> CXF
>>>> client and fails in case of cxf bc service unit....
>>>>
>>>> I attach cxf bc service unit configuration, smx logs and web service
>>>> log.
>>>>
>>>> Attachments:
>>>> http://www.nabble.com/file/p22444327/xbean.xml xbean.xml  (servicemix
>>>> cxf bc
>>>> service unit)  
>>>> http://www.nabble.com/file/p22444327/client_config.xml client_config.xml
>>>> (
>>>> cxf bus configuration - SSL settings)  
>>>> http://www.nabble.com/file/p22444327/servicemix.log servicemix.log
>>>> (excerpt
>>>> from servicemix logs that shows CXF BC processing)  
>>>> http://www.nabble.com/file/p22444327/web_service.log web_service.log
>>>> (web
>>>> service logs with error stack trace) 
>>>>
>>>> Any hints, help would be really appreciated!
>>>>
>>>> Regards,
>>>> Maciej
>>>>
>>>>
>>>>   
>>>>         
>>>
>>>       
>>     
>
>   


Re: servicemix-cxf-bc provider and org.apache.ws.security.WSSecurityException: The signature or decryption was invalid error

Posted by XyLus <ma...@gmail.com>.
I provided   http://www.nabble.com/file/p22459654/testcase.zip testcase  - in
attachment you can find:

cxf-client (standalone client implemented in CXF - import to eclipse and run
UploadServicePortType_UploadServicePort_Client)
cxf-server (web service implemented in CXF - import to eclipse and run
UploadServicePortType_UploadServicePort_Server)

Those two components works fine.

Attachment contains also smx test case (shown in  
http://www.nabble.com/file/p22459654/smx_flow_testcase.png diagram )


As you can see I use MTOM to transfer attachment - I know that CXF does not
support signing attachment (WSS4J interceptor in CXF replaces xop:Include
reference with attachment content and after that interecptor signs message
body - this processing might be changed by setting allowMTOM property in
WSS4J Interceptor to 'true' -  then soap body is singed only but xop:Include
reference remains and attachment is still not signed) 

Well, my point is that it works in CXF framework - I can successfuly invoke
web service with both settings  (alllowMTOM=true, allowMTOM=false). Each
time message is signed and signature is successfuly verified by CXF web
service.

When I try do this using CXF BC provider - every time I got error 
'The signature or decryption was invalid' and what is more file is always
sent as an attachment (CXF BC provider does not care of  allowMTOM value in
WSS4J Intreceptor)


I really appreciate if someone can give me useful hint how to "transfer"
working solution from CXF framework to servicemix.

Regards,
Maciej

PS: Just to clarify, I've also  tried flow without attachment and MTOM -
sending soap message without attachment ended up with the same error. 




XyLus wrote:
> 
> Hi Freeman,
> 
> Thanks for your reply I tried to apply your suggestion but it still does
> not work.
> 
> However, I double checked and found out that soap headers request
> generated by CXF BC provider are different than SOAP headers generated by
> CXF standalone client.
> 
> In case of CXF BC provider there is  <wsse:BinarySecurityToken> with
> client certificate included
> 
> Please have a look
> 
> 
> http://www.nabble.com/file/p22454086/requestFromCXFClient%2540WebService.xml
> request generated by CXF client (taken from Web service log)  
> 
>  http://www.nabble.com/file/p22454086/request%2540WebService.xml request
> generated by CXF BC provider (taken from Web service log)  
> 
> Regards,
> Maciej
> 
> 
> Freeman Fang wrote:
>> 
>> Hi,
>> I don't see you define test prefix in your xbean.xml, you should add sth 
>> like
>> xmlns:test="http://vn.x.y.z/uploader"
>> 
>> Also change the endpoint="CXFEndpoint" to endpoint="UploadServicePort" 
>> in your xbean.xml (I believe UploadServicePort is the port name used in 
>> your wsdl).
>> 
>> If it still doesn't work then  append your wsdl used here also.
>> 
>> Freeman
>> 
>> XyLus wrote:
>>> Hello All,
>>>
>>> I am working on servicemix flow that invokes web service secured with
>>> WS-Security X.509 Profile (incoming request should be signed with
>>> digital
>>> signature in order to authenticate request sender and support data
>>> integrity)
>>>
>>> First, I developed prototype of web service client and web service using
>>> CXF
>>> Tutorial (http://cwiki.apache.org/CXF20DOC/ws-security.html).
>>> This prototype works fine (CXF standalone client sign message and  send
>>> it 
>>> to web service, which verify signature , accepts requests and sends back
>>> correct response)
>>>
>>> After that I  tried to invoke web service using servicemix cxf-bc
>>> (version 
>>> 2008.01.0.3-fuse).
>>> I took CXF standalone configuration (jks file, interceptors chain) and
>>> just
>>> "translated" to servicemix-cxf-bc  xbean.xml  (please find
>>> servicemix-cxf-bc
>>> service unit configuration in attachment).
>>>
>>> Now when I test  my servicemix flow, everything on smx side goes fine -
>>> I
>>> mean message is signed and sent to  web service BUT web service throws
>>> error:
>>>
>>> org.apache.ws.security.WSSecurityException: The signature or decryption
>>> was
>>> invalid
>>> ... (details in web_service.log attachment )
>>>
>>> I really don't know why the same configuration works fine for standalone
>>> CXF
>>> client and fails in case of cxf bc service unit....
>>>
>>> I attach cxf bc service unit configuration, smx logs and web service
>>> log.
>>>
>>> Attachments:
>>> http://www.nabble.com/file/p22444327/xbean.xml xbean.xml  (servicemix
>>> cxf bc
>>> service unit)  
>>> http://www.nabble.com/file/p22444327/client_config.xml client_config.xml
>>> (
>>> cxf bus configuration - SSL settings)  
>>> http://www.nabble.com/file/p22444327/servicemix.log servicemix.log
>>> (excerpt
>>> from servicemix logs that shows CXF BC processing)  
>>> http://www.nabble.com/file/p22444327/web_service.log web_service.log
>>> (web
>>> service logs with error stack trace) 
>>>
>>> Any hints, help would be really appreciated!
>>>
>>> Regards,
>>> Maciej
>>>
>>>
>>>   
>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/servicemix-cxf-bc-provider-and-org.apache.ws.security.WSSecurityException%3A-The-signature-or-decryption-was-invalid-error-tp22444327p22459654.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: servicemix-cxf-bc provider and org.apache.ws.security.WSSecurityException: The signature or decryption was invalid error

Posted by Freeman Fang <fr...@gmail.com>.
Hi,
Would you also append the cxf configuration file used for your 
standalone cxf client?
Freeman
XyLus wrote:
> Hi Freeman,
>
> Thanks for your reply I tried to apply your suggestion but it still does not
> work.
>
> However, I double checked and found out that soap headers request generated
> by CXF BC provider are different than SOAP headers generated by CXF
> standalone client.
>
> In case of CXF BC provider there is  <wsse:BinarySecurityToken> with client
> certificate included
>
> Please have a look
>
> http://www.nabble.com/file/p22454086/requestFromCXFClient%2540WebService.xml
> request generated by CXF client (taken from Web service log)  
>
> http://www.nabble.com/file/p22454086/request%2540WebService.xml request
> generated by CXF BC provider (taken from Web service log)  
>
> Regards,
> Maciej
>
>
> Freeman Fang wrote:
>   
>> Hi,
>> I don't see you define test prefix in your xbean.xml, you should add sth 
>> like
>> xmlns:test="http://vn.x.y.z/uploader"
>>
>> Also change the endpoint="CXFEndpoint" to endpoint="UploadServicePort" 
>> in your xbean.xml (I believe UploadServicePort is the port name used in 
>> your wsdl).
>>
>> If it still doesn't work then  append your wsdl used here also.
>>
>> Freeman
>>
>> XyLus wrote:
>>     
>>> Hello All,
>>>
>>> I am working on servicemix flow that invokes web service secured with
>>> WS-Security X.509 Profile (incoming request should be signed with digital
>>> signature in order to authenticate request sender and support data
>>> integrity)
>>>
>>> First, I developed prototype of web service client and web service using
>>> CXF
>>> Tutorial (http://cwiki.apache.org/CXF20DOC/ws-security.html).
>>> This prototype works fine (CXF standalone client sign message and  send
>>> it 
>>> to web service, which verify signature , accepts requests and sends back
>>> correct response)
>>>
>>> After that I  tried to invoke web service using servicemix cxf-bc
>>> (version 
>>> 2008.01.0.3-fuse).
>>> I took CXF standalone configuration (jks file, interceptors chain) and
>>> just
>>> "translated" to servicemix-cxf-bc  xbean.xml  (please find
>>> servicemix-cxf-bc
>>> service unit configuration in attachment).
>>>
>>> Now when I test  my servicemix flow, everything on smx side goes fine - I
>>> mean message is signed and sent to  web service BUT web service throws
>>> error:
>>>
>>> org.apache.ws.security.WSSecurityException: The signature or decryption
>>> was
>>> invalid
>>> ... (details in web_service.log attachment )
>>>
>>> I really don't know why the same configuration works fine for standalone
>>> CXF
>>> client and fails in case of cxf bc service unit....
>>>
>>> I attach cxf bc service unit configuration, smx logs and web service log.
>>>
>>> Attachments:
>>> http://www.nabble.com/file/p22444327/xbean.xml xbean.xml  (servicemix cxf
>>> bc
>>> service unit)  
>>> http://www.nabble.com/file/p22444327/client_config.xml client_config.xml
>>> (
>>> cxf bus configuration - SSL settings)  
>>> http://www.nabble.com/file/p22444327/servicemix.log servicemix.log
>>> (excerpt
>>> from servicemix logs that shows CXF BC processing)  
>>> http://www.nabble.com/file/p22444327/web_service.log web_service.log (web
>>> service logs with error stack trace) 
>>>
>>> Any hints, help would be really appreciated!
>>>
>>> Regards,
>>> Maciej
>>>
>>>
>>>   
>>>       
>>
>>     
>
>   


Re: servicemix-cxf-bc provider and org.apache.ws.security.WSSecurityException: The signature or decryption was invalid error

Posted by XyLus <ma...@gmail.com>.
Hi Freeman,

Thanks for your reply I tried to apply your suggestion but it still does not
work.

However, I double checked and found out that soap headers request generated
by CXF BC provider are different than SOAP headers generated by CXF
standalone client.

In case of CXF BC provider there is  <wsse:BinarySecurityToken> with client
certificate included

Please have a look

http://www.nabble.com/file/p22454086/requestFromCXFClient%2540WebService.xml
request generated by CXF client (taken from Web service log)  

http://www.nabble.com/file/p22454086/request%2540WebService.xml request
generated by CXF BC provider (taken from Web service log)  

Regards,
Maciej


Freeman Fang wrote:
> 
> Hi,
> I don't see you define test prefix in your xbean.xml, you should add sth 
> like
> xmlns:test="http://vn.x.y.z/uploader"
> 
> Also change the endpoint="CXFEndpoint" to endpoint="UploadServicePort" 
> in your xbean.xml (I believe UploadServicePort is the port name used in 
> your wsdl).
> 
> If it still doesn't work then  append your wsdl used here also.
> 
> Freeman
> 
> XyLus wrote:
>> Hello All,
>>
>> I am working on servicemix flow that invokes web service secured with
>> WS-Security X.509 Profile (incoming request should be signed with digital
>> signature in order to authenticate request sender and support data
>> integrity)
>>
>> First, I developed prototype of web service client and web service using
>> CXF
>> Tutorial (http://cwiki.apache.org/CXF20DOC/ws-security.html).
>> This prototype works fine (CXF standalone client sign message and  send
>> it 
>> to web service, which verify signature , accepts requests and sends back
>> correct response)
>>
>> After that I  tried to invoke web service using servicemix cxf-bc
>> (version 
>> 2008.01.0.3-fuse).
>> I took CXF standalone configuration (jks file, interceptors chain) and
>> just
>> "translated" to servicemix-cxf-bc  xbean.xml  (please find
>> servicemix-cxf-bc
>> service unit configuration in attachment).
>>
>> Now when I test  my servicemix flow, everything on smx side goes fine - I
>> mean message is signed and sent to  web service BUT web service throws
>> error:
>>
>> org.apache.ws.security.WSSecurityException: The signature or decryption
>> was
>> invalid
>> ... (details in web_service.log attachment )
>>
>> I really don't know why the same configuration works fine for standalone
>> CXF
>> client and fails in case of cxf bc service unit....
>>
>> I attach cxf bc service unit configuration, smx logs and web service log.
>>
>> Attachments:
>> http://www.nabble.com/file/p22444327/xbean.xml xbean.xml  (servicemix cxf
>> bc
>> service unit)  
>> http://www.nabble.com/file/p22444327/client_config.xml client_config.xml
>> (
>> cxf bus configuration - SSL settings)  
>> http://www.nabble.com/file/p22444327/servicemix.log servicemix.log
>> (excerpt
>> from servicemix logs that shows CXF BC processing)  
>> http://www.nabble.com/file/p22444327/web_service.log web_service.log (web
>> service logs with error stack trace) 
>>
>> Any hints, help would be really appreciated!
>>
>> Regards,
>> Maciej
>>
>>
>>   
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/servicemix-cxf-bc-provider-and-org.apache.ws.security.WSSecurityException%3A-The-signature-or-decryption-was-invalid-error-tp22444327p22454086.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: servicemix-cxf-bc provider and org.apache.ws.security.WSSecurityException: The signature or decryption was invalid error

Posted by Freeman Fang <fr...@gmail.com>.
Hi,
I don't see you define test prefix in your xbean.xml, you should add sth 
like
xmlns:test="http://vn.x.y.z/uploader"

Also change the endpoint="CXFEndpoint" to endpoint="UploadServicePort" 
in your xbean.xml (I believe UploadServicePort is the port name used in 
your wsdl).

If it still doesn't work then  append your wsdl used here also.

Freeman

XyLus wrote:
> Hello All,
>
> I am working on servicemix flow that invokes web service secured with
> WS-Security X.509 Profile (incoming request should be signed with digital
> signature in order to authenticate request sender and support data
> integrity)
>
> First, I developed prototype of web service client and web service using CXF
> Tutorial (http://cwiki.apache.org/CXF20DOC/ws-security.html).
> This prototype works fine (CXF standalone client sign message and  send it 
> to web service, which verify signature , accepts requests and sends back
> correct response)
>
> After that I  tried to invoke web service using servicemix cxf-bc (version 
> 2008.01.0.3-fuse).
> I took CXF standalone configuration (jks file, interceptors chain) and just
> "translated" to servicemix-cxf-bc  xbean.xml  (please find servicemix-cxf-bc
> service unit configuration in attachment).
>
> Now when I test  my servicemix flow, everything on smx side goes fine - I
> mean message is signed and sent to  web service BUT web service throws
> error:
>
> org.apache.ws.security.WSSecurityException: The signature or decryption was
> invalid
> ... (details in web_service.log attachment )
>
> I really don't know why the same configuration works fine for standalone CXF
> client and fails in case of cxf bc service unit....
>
> I attach cxf bc service unit configuration, smx logs and web service log.
>
> Attachments:
> http://www.nabble.com/file/p22444327/xbean.xml xbean.xml  (servicemix cxf bc
> service unit)  
> http://www.nabble.com/file/p22444327/client_config.xml client_config.xml (
> cxf bus configuration - SSL settings)  
> http://www.nabble.com/file/p22444327/servicemix.log servicemix.log (excerpt
> from servicemix logs that shows CXF BC processing)  
> http://www.nabble.com/file/p22444327/web_service.log web_service.log (web
> service logs with error stack trace) 
>
> Any hints, help would be really appreciated!
>
> Regards,
> Maciej
>
>
>