axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Edder Peña (JIRA) <j...@apache.org>
Subject [jira] Created: (AXIS2-4864) Error AxisFault: A required message part [body] is not signed.
Date Mon, 25 Oct 2010 22:52:20 GMT
Error AxisFault: A required message part [body] is not signed.
--------------------------------------------------------------

                 Key: AXIS2-4864
                 URL: https://issues.apache.org/jira/browse/AXIS2-4864
             Project: Axis2
          Issue Type: Task
         Environment: Tomcat 6, Axis2 1.5.1, Rampart 1.5.1
            Reporter: Edder Peña


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 http://wso2.org/library/3415
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(Utils.java:435)
	at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:371)
	at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:417)
	at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
	at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
	at com.avvillas.soi.manejoidentidad.wsba_manejoidentidad_autenticar.binding.WSBA_ManejoIdentidad_autenticarStub.autenticar(WSBA_ManejoIdentidad_autenticarStub.java:181)
	at com.avvillas.soi.manejoidentidad.wsba_manejoidentidad_autenticar.binding.ClienteServicioAVVillas.main(ClienteServicioAVVillas.java:65)

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,
"http://XXX.XXX.X.XXX/PFBA_ManejoIdentidad01/sca/WSBA_ManejoIdentidad_autenticar");
			ServiceClient client = stub._getServiceClient();
			client.engageModule("rampart");
			
			RampartConfig rampartConfig = new RampartConfig();
			rampartConfig.setUser("clienteautenticationavvillas");
			rampartConfig.setPwCbClass("com.avvillas.soi.manejoidentidad.wsba_manejoidentidad_autenticar.binding.PWCallBackHandler");

			CryptoConfig sigCrypto = new CryptoConfig();
			sigCrypto.setProvider("org.apache.ws.security.components.crypto.Merlin");
	
			Properties props = new Properties();
			props.setProperty("org.apache.ws.security.crypto.merlin.keystore.type", "JKS");
			props.setProperty("org.apache.ws.security.crypto.merlin.file","C:\\Documents and Setting\\epena\\ClienteAutenticacionAVVillas");
			props.setProperty("org.apache.ws.security.crypto.merlin.keystore.password", "ClaveIT2010");
	
			sigCrypto.setProp(props);
			rampartConfig.setSigCryptoConfig(sigCrypto);
	
			Policy policy = new Policy();
			policy.addAssertion(rampartConfig);
			
			client.getAxisService().getPolicyInclude().addPolicyElement(PolicyInclude.AXIS_SERVICE_POLICY,
policy);
			
			Autenticar autenticar0 = new Autenticar();
			Oe_Autenticacion param = new Oe_Autenticacion();
			param.setStrUsuario("84452308");
			param.setStrContrasena("password");
			autenticar0.setOe_entrada(param);
			AutenticarResponse response = new AutenticarResponse();
			response = stub.autenticar(autenticar0);
			System.out.println("Resultado del servicio: "+response.getOs_salida().toString());
		} catch (AxisFault e) {
			e.printStackTrace();
		} catch (RemoteException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

	}

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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


Mime
View raw message