Hi,
I am trying to run encryption sample 05 (Rampart 1.2 with Axis2 1.2). I am
getting following exception


org.apache.axis2.AxisFault: WSDoAllReceiver: security processing failed at
org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:434)
at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:373)
at
org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:29
Follwing are the service.xml and client.axis2.xml and CallbackHandler code

*Service.xml*

<parameter name="InflowSecurity">
      <action>
        <items>Encrypt</items>

<passwordCallbackClass>org.apache.rampart.samples.sample05.PWCBHandler</passwordCallbackClass>
        <decryptionPropFile>service.properties</decryptionPropFile>
      </action>
    </parameter>

     <parameter name="OutflowSecurity">
      <action>
        <items>Encrypt</items>
        <encryptionUser>client</encryptionUser>
        <encryptionPropFile>service.properties</encryptionPropFile>
      </action>
    </parameter>

*client.axis2.xml*


<parameter name="OutflowSecurity">
      <action>
        <items>Encrypt</items>
        <encryptionUser>service</encryptionUser>
        <encryptionPropFile>client.properties</encryptionPropFile>
         <encryptionKeyIdentifier>IssuerSerial</encryptionKeyIdentifier>
      </action>
    </parameter>

    <parameter name="InflowSecurity">
      <action>
        <items>Encrypt</items>

<passwordCallbackClass>org.apache.rampart.samples.sample05.PWCBHandler</passwordCallbackClass>
        <decryptionPropFile>client.properties</decryptionPropFile>
      </action>
    </parameter>



*PWCBHandler*

public class PWCBHandler implements CallbackHandler {

    public void handle(Callback[] callbacks) throws IOException,
            UnsupportedCallbackException {
        for (int i = 0; i < callbacks.length; i++) {
            WSPasswordCallback pwcb = (WSPasswordCallback)callbacks[i];

            String id = pwcb.getIdentifer();
            if("client".equals(id)) {
                pwcb.setPassword("apache");
            } else if("service".equals(id)) {
                pwcb.setPassword("apache");
            }
        }
    }

}

I lloked at following link with similer problem and followed the pointers
provided by Ruchith Fernando, but stiil facing problems.

Can somebody guide me?

Looking for quick response

Thanks in advance

*Regards,Amit Sharma*

Reply via email to