Hi Allen,

Can you please send the message that caused the exception (with out
xml formatting) and also send the public key cert of the key that was
used to sign the message. I'll try to recreate your issue.

Thanks,
Ruchith

On 4/18/07, Liu, Xiao-Tao (Allen, HPIT-GADSC) <[EMAIL PROTECTED]> wrote:
Hi,

I am taking use of Axis2 to build a client to access a .net ws with X509
certificate signature. All the steps are fine except when I receive the
response from .net, the signature verification always failed.

Warning: Verification failed for URI
"#Id-c59b2f2c-9d10-4107-bea9-e8eb690dd67d"
Exception in thread "main" org.apache.axis2.AxisFault: WSDoAllReceiver:
security processing failed; nested exception is:
        org.apache.ws.security.WSSecurityException: The signature
verification failed
        at
org.apache.rampart.handler.WSDoAllReceiver.processBasic(WSDoAllReceiver.
java:259)
        at
org.apache.rampart.handler.WSDoAllReceiver.processMessage(WSDoAllReceive
r.java:91)
        at
org.apache.rampart.handler.WSDoAllHandler.invoke(WSDoAllHandler.java:74)
        at org.apache.axis2.engine.Phase.invoke(Phase.java:382)
        at
org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:522)
        at
org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:487)
        at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOper
ation.java:276)
        at
org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisO
peration.java:202)
        at
org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:579
)
        at
org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:508
)
        at ws.axis2.DotNetWSRClient.main(DotNetWSRClient.java:45)
Caused by: org.apache.ws.security.WSSecurityException: The signature
verification failed
        at
org.apache.ws.security.processor.SignatureProcessor.verifyXMLSignature(S
ignatureProcessor.java:332)
        at
org.apache.ws.security.processor.SignatureProcessor.handleToken(Signatur
eProcessor.java:79)
        at
org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecurity
Engine.java:279)
        at
org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecurity
Engine.java:201)
        at
org.apache.rampart.handler.WSDoAllReceiver.processBasic(WSDoAllReceiver.
java:256)
        ... 10 more

I am suspecting that's probably caused by some PrettyXML or
NamespacePrefixOptimization mechanism when Axis modified the response
body with new lines/breaks/spaces to let it looks better. And I found
there was some specific parameter in Axis configuration for Axis1:

 <globalConfiguration>
  <!-- MUST turn off pretty printing otherwise signature verification
fails -->
  <parameter name="enableNamespacePrefixOptimization" value="false"/>
  <parameter name="disablePrettyXML" value="true"/>

 </globalConfiguration>


But I didn't find there is corresponding parameters in Axis2. Has
somebody faced the same problem? I have been struggling with it for over
2 days...

Thanks,
Allen




--
www.ruchith.org
www.wso2.org

Reply via email to