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.

Reply via email to