Hi all,
I've tried to send sign message to my server
With your help I've resolved a lot of problem but now I don't understand why It doesn't work
My server 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>
my cryptoReceiver.properties is:
org.apache.ws.security.crypto.merlin.file=cacerts.jks
org.apache.ws.security.crypto.merlin.keystore.type=JKS
org.apache.ws.security.crypto.merlin.keystore.password=1234567890
Now the client have tha class that invoke the method:
ritorno="Nel try ";
PerformWSSecServiceLocator l=new PerformWSSecServiceLocator(new MyEngineConfiguration());
ritorno=ritorno+"creato il locator ";
PerformWSSecuritySoapBindingStub stub =(PerformWSSecuritySoapBindingStub) l.getPerformWSSecurity();
ritorno=ritorno+"creato lo stub ";
ritorno=stub.outputStr(host,usr,pass,com);
MyEngineConfiguration is this:
public class MyEngineConfiguration extends SimpleProvider {
public MyEngineConfiguration() {
super();
this.deployTransport("http", new SimpleTargetedChain(new org.apache.axis.transport.http.HTTPSender()));
//parameters
Hashtable<String, Object> opts = new Hashtable<String, Object>();
opts.put(AxisEngine.PROP_DISABLE_PRETTY_XML, Boolean.TRUE);
this.setGlobalOptions(opts);
//requestFlow
org.apache.ws.axis.security.WSDoAllSender w = new WSDoAllSender();
w.setOption(WSHandlerConstants.ACTION, WSHandlerConstants.SIGNATURE);
w.setOption(WSHandlerConstants.USER, "167deb1fb811921fce0fe7890db0b9da93225867");
w.setOption(WSHandlerConstants.PW_CALLBACK_CLASS,"PWCallback");
w.setOption(WSHandlerConstants.SIG_PROP_FILE, "cryptoSender.properties");
w.setOption(WSHandlerConstants.SIG_KEY_ID, "DirectReference");
w.setOption(WSHandlerConstants.MUST_UNDERSTAND, "false");
this.setGlobalResponse(w);
}
@Override
public void configureEngine(AxisEngine engine) throws
ConfigurationException {
engine.refreshGlobalOptions();
}
}
but when Run the main it return always this error:
WSDoAllReceiver: Request does not contain required Security header
I don't understan why!!!
Please help me
Thanks all
Hermann
Title: [WSS4J 1.5] WSDoAllReceiver: Request does not contain required Security header
- [WSS4J 1.5] WSDoAllReceiver: Request does not contain required... hescot
