Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejava
import es.aragon.svcd.core.ws.IIdentityVerificationService;

public class ClienteSVCD {
  // se importa por ejemplo el servicio de verificación de identidad pero podría importarse cualquier otro
  private IIdentityVerificationService identityVerificationWS;
  
  public IdentityVerificationOut identityVerificationQuery() {

    IdentityVerificationRequest identityVerificationRequest = new IdentityVerificationRequest();

    IdentificationData identificacionData = new IdentificationData();
    identificacionData.setDocumentNumber("30000260A");
    identificacionData.setDocumentType("NIF");

    SpecificIdentificationData specificIdentificationData = new SpecificIdentificationData();
    specificIdentificationData.setSupportNumber("AAA013521");

    UserData userData = new UserData();
    userData.setName("JUAN");
    userData.setSurname1("GARCÍA");
    userData.setSurname2("SOTO");

    PurposeData purposeData = new PurposeData();
    purposeData.setFileNumber("001");
    purposeData.setProcedureNumber("466");
    purposeData.setPurposeText("PruebaVerificacionIdentidad");
    purposeData.setConsent("Si");

    UserSpecificDataVI userSpecificDataVI = new UserSpecificDataVI();
    userSpecificDataVI.setGender("M");

    identityVerificationRequest.setIdentificationData(identificacionData);
    identityVerificationRequest.setSpecificIdentificationData(specificIdentificationData);
    identityVerificationRequest.setPurposeData(purposeData);
    identityVerificationRequest.setUserSpecificDataVI(userSpecificDataVI);
    identityVerificationRequest.setUserData(userData);

    IdentityVerificationIn identityVerificationIn = new IdentityVerificationIn();
    identityVerificationIn.setIdentityVerificationRequest(identityVerificationRequest);
   
    // Código con el que la aplicación integradora se ha dado de alta en PAU
    identityVerificationIn.setApplicationId("APP_CODE");
    identityVerificationIn.setOrganismCode("ORG07458");
    identityVerificationIn.setUserCode("00000000T");

    IdentityVerificationOut identityVerificationOut = null;
    try {

      identityVerificationOut = identityVerificationWS.identityVerification(identityVerificationIn);
    } catch(Throwable e) {
      // Gestionar error
    }
  }

} 


6.3.-

...

Databinding soportado

...

Se adjunta un ejemplo de como configurar la invocación a los clientes de los servicios de SVCD. SVCD no soporta el databinding de aegis.

Code Block
languagexml
<bean id="sexualCrimeServiceFactory"
		class="org.apache.cxf.frontend.ClientProxyFactoryBean">
		<property name="serviceClass"
			value="es.aragon.svcd.core.ws.ISexualCrimeService" />
		<property name="address"
			value="https://preaplicaciones.aragon.es/svcd_core/services/SexualCrime" />			
		<!-- El que no funciona -->
		<!-- <property name="dataBinding"> -->
		<!-- <bean class="org.apache.cxf.aegis.databinding.AegisDatabinding" -->
		<!-- scope="prototype" /> -->
		<!-- </property> -->
		<!-- El que si funciona -->
		<property name="dataBinding">
			<bean class="org.apache.cxf.jaxb.JAXBDataBinding"
				scope="prototype" />
		</property>
		<!-- Por defecto es null pilla el databinding que tenga configurado el
			sistema -->
		<!-- <property name="dataBinding"> -->
		<!-- <null /> -->
		<!-- </property> -->
	</bean>