Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Signing a message with axis2

Edder Pena
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Everyone.

I'm implementing a client for a secure web service with uses private keys and public certificates for the signing and encryption of the message. I'm using Axis2 for the generation of the client (through eclipse) and rampart for the security. I follow a tutorial in but it keeps me sending the same error message than if I wouldn't did anything.

The error message is the next:

org.apache.axis2.AxisFault: CWWSS5720E: A required message part [body] is not signed.
at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(
at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(
at org.apache.axis2.description.OutInAxisOperationClient.send(
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(
at org.apache.axis2.client.OperationClient.execute(
at com.avvillas.soi.manejoidentidad.wsba_manejoidentidad_autenticar.binding.WSBA_ManejoIdentidad_autenticarStub.autenticar(
at com.avvillas.soi.manejoidentidad.wsba_manejoidentidad_autenticar.binding.ClienteServicioAVVillas.main(

And the invocation of the client is the following:

public static void main(String[] args) {
try {
System.out.println("Entra al Cliente del servicio de autenticación");
ConfigurationContext context = ConfigurationContextFactory.createConfigurationContextFromFileSystem("I:\\wsPruebas\\ServicioAVVillas3\\WebContent\\WEB-INF\\", null);
WSBA_ManejoIdentidad_autenticarStub stub = new WSBA_ManejoIdentidad_autenticarStub(context, "");
ServiceClient client = stub._getServiceClient();

RampartConfig rampartConfig = new RampartConfig();

CryptoConfig sigCrypto = new CryptoConfig();

Properties props = new Properties();
props.setProperty("", "JKS");
props.setProperty("","C:\\Documents and Setting\\epena\\ClienteAutenticacionAVVillas");
props.setProperty("", "ClaveIT2010");


Policy policy = new Policy();

client.getAxisService().getPolicyInclude().addPolicyElement(PolicyInclude.AXIS_SERVICE_POLICY, policy);

Autenticar autenticar0 = new Autenticar();
Oe_Autenticacion param = new Oe_Autenticacion();
AutenticarResponse response = new AutenticarResponse();
response = stub.autenticar(autenticar0);
System.out.println("Resultado del servicio: "+response.getOs_salida().toString());
} catch (AxisFault e) {
} catch (RemoteException e) {
// TODO Auto-generated catch block


I'll appreciate your help, 'cause I have a lot of time raounding this subject and I can't find the answer.

Thanks a lot.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic