Hi Werner,
thank for your precious help,
yes I'm using Axis 1.4 I try to use the code to disable pretty xml see below:
public static EngineConfiguration createClientConfig() {
AxisProperties.setProperty("enableNamespacePrefixOptimization","false");
SimpleProvider clientConfig = new SimpleProvider();
Handler securitySenderHandler = (Handler) new WSDoAllSender();
//Handler securityReceiverHandler = (Handler) new WSDoAllReceiver();
securitySenderHandler.setOption(WSHandlerConstants.ACTION, WSHandlerConstants.SIGNATURE);
securitySenderHandler.setOption(WSHandlerConstants.USER, "167deb1fb811921fce0fe7890db0b9da93225867");
securitySenderHandler.setOption(WSHandlerConstants.PW_CALLBACK_CLASS,"Clas.PWCallback");
securitySenderHandler.setOption(WSHandlerConstants.SIG_PROP_FILE, "cryptoSender.properties");
//securitySenderHandler.setOption(WSHandlerConstants.SIG_KEY_ID, "DirectReference");
securitySenderHandler.setOption(WSHandlerConstants.MUST_UNDERSTAND, "false");
SimpleChain reqHandler = new SimpleChain();
SimpleChain respHandler = new SimpleChain();
// add the sender handler to the request
reqHandler.addHandler(securitySenderHandler);
// add the reveiver handler to the response
//respHandler.addHandler(securityReceiverHandler);
Handler pivot = (Handler) new HTTPSender();
Handler transport = new SimpleTargetedChain(reqHandler, pivot, respHandler);
clientConfig.deployTransport(HTTPTransport.DEFAULT_TRANSPORT_NAME,transport);
Hashtable<String, Object> opts = new Hashtable<String, Object>();
opts.put(AxisEngine.PROP_DISABLE_PRETTY_XML, Boolean.TRUE);
clientConfig.setGlobalOptions(opts);
return clientConfig;
}
}
but return always the same error.
How can i resolve?
Thanks for all
Hermann
-----Messaggio originale-----
Da: Dittmann, Werner [mailto:[EMAIL PROTECTED]]
Inviato: mar 27/06/2006 16.53
A: [EMAIL PROTECTED]; [email protected]
Oggetto: AW: [WSS4J 1.5]WSDoAllReceiver: The signature verification failed
Which Axis version do you use? There is a know problem in Axis 1.4
AFAIK.
In one of your posting I saw that you disabled "prettyPrinting" - can
you do this
again. _Any_ modification of the signed part of the request causes a
verification
failure. Sometimes some SOAP engines tend to modify or "pretty print"
the request
after the Signature was created.
I saw something like this in one of your previous posts:
...
Hashtable<String, Object> opts = new Hashtable<String, Object>();
opts.put(AxisEngine.PROP_DISABLE_PRETTY_XML, Boolean.TRUE);
this.setGlobalOptions(opts);
...
Pls give it a try.
Regards,
Werner
________________________________
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Gesendet: Dienstag, 27. Juni 2006 15:47
An: [email protected]
Betreff: [WSS4J 1.5]WSDoAllReceiver: The signature verification
failed
Hi all,
I finally send a signed soap message i created a class engine
where i set all my properties
public class Engine{
public static EngineConfiguration createClientConfig() {
AxisProperties.setProperty("enableNamespacePrefixOptimization","false");
SimpleProvider clientConfig = new SimpleProvider();
Handler securitySenderHandler = (Handler) new
WSDoAllSender();
securitySenderHandler.setOption(WSHandlerConstants.ACTION,
WSHandlerConstants.SIGNATURE);
securitySenderHandler.setOption(WSHandlerConstants.USER,
"167deb1fb811921fce0fe7890db0b9da93225867");
securitySenderHandler.setOption(WSHandlerConstants.PW_CALLBACK_CLASS,"Cl
as.PWCallback");
securitySenderHandler.setOption(WSHandlerConstants.SIG_PROP_FILE,
"cryptoSender.properties");
securitySenderHandler.setOption(WSHandlerConstants.SIG_KEY_ID,
"DirectReference");
securitySenderHandler.setOption(WSHandlerConstants.MUST_UNDERSTAND,
"false");
SimpleChain reqHandler = new SimpleChain();
SimpleChain respHandler = new SimpleChain();
// add the sender handler to the request
reqHandler.addHandler(securitySenderHandler);
Handler pivot = (Handler) new HTTPSender();
Handler transport = new
SimpleTargetedChain(reqHandler, pivot, respHandler);
clientConfig.deployTransport(HTTPTransport.DEFAULT_TRANSPORT_NAME,transp
ort);
return clientConfig;
}
}
and call this class in my locator:
EngineConfiguration config=Engine.createClientConfig();
PerformWSSecServiceLocator l=new
PerformWSSecServiceLocator(config);
but when i run the program and send to server It return me this
error:
WSDoAllReceiver: security processing failed; nested exception
is:
org.apache.ws.security.WSSecurityException: The signature
verification failed
The deploy.wsdd of the server is this:
<!-- Use this file to deploy some handlers/chains and services
-->
<!-- Two ways to do this:
-->
<!-- java org.apache.axis.client.AdminClient deploy.wsdd
-->
<!-- after the axis server is running
-->
<!-- or
-->
<!-- java org.apache.axis.utils.Admin client|server
deploy.wsdd -->
<!-- from the same directory that the Axis engine runs
-->
<deployment
xmlns="http://xml.apache.org/axis/wsdd/"
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
<!-- Services from PerformWSService WSDL service -->
<service name="PerformWService" provider="java:RPC"
style="rpc" use="encoded">
<requestFlow>
<handler
type="java:org.apache.ws.axis.security.WSDoAllReceiver">
<parameter name="action" value="Signature"/>
<parameter name="signaturePropFile"
value="cryptoReceiver.properties"/>
</handler>
</requestFlow>
<parameter name="wsdlTargetNamespace"
value="urn:PerformWService"/>
<parameter name="wsdlServiceElement"
value="PerformWSService"/>
<parameter name="wsdlServicePort"
value="PerformWService"/>
<parameter name="className"
value="PerformWS.PerformWServiceSoapBindingSkeleton"/>
<parameter name="wsdlPortType" value="PerformWS"/>
<parameter name="typeMappingVersion" value="1.2"/>
<parameter name="allowedMethods" value="*"/>
<parameter name="scope" value="Session"/>
</service>
</deployment>
How can resolve this error?
The properties are setting well I think
Thanks for help
Hermann
Title: R: [WSS4J 1.5]WSDoAllReceiver: The signature verification failed
- AW: [WSS4J 1.5]WSDoAllReceiver: The signature verificatio... Dittmann, Werner
- R: [WSS4J 1.5]WSDoAllReceiver: The signature verific... hescot
- Re: AW: [WSS4J 1.5]WSDoAllReceiver: The signature ve... Rami Jaamour
