MNP_RU_638 - Middleware Modernization 2024 (Lotto 5): implement ESITRICMVNO
This commit is contained in:
@@ -80,6 +80,10 @@
|
||||
<property name="wsdev.esitoCessMnp.war.name" value="esitoCessMnp.war"/>
|
||||
<property name="wsdev.cessLineaDonor.war.name" value="IBK50richiestaCessazioneLineaDonor.war"/>
|
||||
|
||||
<!-- Configurazione per le classi dei WS da O2C -->
|
||||
<property name="wsdev.o2c.building.path" value="${wsdev.home}/o2c/building" />
|
||||
<property name="wsdev.esitoRicMvno.war.name" value="esitoRicMvno.war"/>
|
||||
|
||||
<!-- define a mapper for Home to DAO -->
|
||||
<mapper id="DAOMapper" type="glob" from="*Home.java" to="*DAO.java"/>
|
||||
|
||||
@@ -301,6 +305,7 @@
|
||||
<file name="Castor-GispRestTP.jar"/>
|
||||
<file name="WSIBK50client.jar"/>
|
||||
<file name="WSEsitoCessMnpCommon.jar"/>
|
||||
<file name="WSEsitoRicMvnoCommon.jar"/>
|
||||
<file name="Castor-GispCessTP.jar"/>
|
||||
<file name="Castor-CrmcPortDataBinding.jar"/>
|
||||
<!-- wsdl -->
|
||||
@@ -751,7 +756,7 @@ Compiling MNP
|
||||
</jar>
|
||||
</target>
|
||||
|
||||
<target name="ear" depends="jar,war,jar_ejb,jar_ejb_client,buildDBssService,buildLastPortService,buildNotifyGispEventService,buildEsitoCessMnpService">
|
||||
<target name="ear" depends="jar,war,jar_ejb,jar_ejb_client,buildDBssService,buildLastPortService,buildNotifyGispEventService,buildEsitoCessMnpService,buildEsitoRicMvnoService">
|
||||
|
||||
<copy todir="${building.path}/mnp-ear">
|
||||
<fileset dir="${mnp.ear.path}">
|
||||
@@ -1054,4 +1059,25 @@ Renaming Hibernate DAO
|
||||
<copy todir="${building.path}/mnp-ear" file="${wsdev.gisp.building.path}/esito/${wsdev.esitoCessMnp.war.name}"/>
|
||||
</target>
|
||||
|
||||
<target name="buildEsitoRicMvnoService" depends="init">
|
||||
<echo>
|
||||
-------------
|
||||
|
||||
-------------
|
||||
</echo>
|
||||
<jwsc
|
||||
srcdir="${wsdev.wssrc.path}"
|
||||
destdir="${wsdev.o2c.building.path}/esitoRicMvno"
|
||||
keepGenerated="true"
|
||||
classpathref="all.classpath"
|
||||
debug="on"
|
||||
>
|
||||
<module name="esitoRicMvno">
|
||||
<jws file="mnp/proxy/ws/o2c/EsitoRicMvnoPortTypeImpl.java" compiledWsdl="${mnp.ear.path}/APP-INF/lib/WSEsitoRicMvnoCommon.jar"/>
|
||||
</module>
|
||||
</jwsc>
|
||||
|
||||
<copy todir="${building.path}/mnp-ear" file="${wsdev.o2c.building.path}/esitoRicMvno/${wsdev.esitoRicMvno.war.name}"/>
|
||||
</target>
|
||||
|
||||
</project>
|
||||
|
||||
8
dbcmnpsrc/FE/mnpdev/build/build_EsitoRicMvno.cmd
Normal file
8
dbcmnpsrc/FE/mnpdev/build/build_EsitoRicMvno.cmd
Normal file
@@ -0,0 +1,8 @@
|
||||
@set ANT_HOME=apache-ant-1.9.2
|
||||
@set JAVA_HOME=C:\jdk1.6.0_45
|
||||
@set PATH=%ANT_HOME%/bin;%JAVA_HOME%/bin
|
||||
@set ANT_OPTS=-Xms512m -Xmx512m
|
||||
|
||||
@call ant -buildfile build.xml buildEsitoRicMvnoService
|
||||
|
||||
@pause
|
||||
8
dbcmnpsrc/FE/mnpdev/build/build_WS_EsitoRicMvno.cmd
Normal file
8
dbcmnpsrc/FE/mnpdev/build/build_WS_EsitoRicMvno.cmd
Normal file
@@ -0,0 +1,8 @@
|
||||
@set ANT_HOME=apache-ant-1.9.2
|
||||
@set JAVA_HOME=C:\jdk1.6.0_45
|
||||
@set PATH=%ANT_HOME%/bin;%JAVA_HOME%/bin
|
||||
@set ANT_OPTS=-Xms512m -Xmx512m
|
||||
|
||||
@call ant -buildfile build_ws.xml ESITORICMVNOWS
|
||||
|
||||
@pause
|
||||
@@ -49,7 +49,11 @@
|
||||
<property name="wsdev.wsdl.gisp.path" value="${wsdev.wsdl.home}/gisp" />
|
||||
<property name="wsdev.gisp.building.path" value="${wsdev.home}/gisp/building" />
|
||||
|
||||
<!-- Per sviluppo client WS DBSS -->
|
||||
<!-- Per sviluppo Middleware Modernization 2024: Servizi GISP lotto5 WS esposti ad O2C -->
|
||||
<property name="wsdev.wsdl.o2c.path" value="${wsdev.wsdl.home}/o2c" />
|
||||
<property name="wsdev.o2c.building.path" value="${wsdev.home}/o2c/building" />
|
||||
|
||||
<!-- Per sviluppo client WS DBSS -->
|
||||
<property name="wsdbss.clientdev.home" value="${project.home}/mnp/wsdbss" />
|
||||
<property name="wsdbss.client.wsdl.position" value="${wsdbss.clientdev.home}/client" />
|
||||
<property name="wsdbss.client.wsdl.file" value="${wsdbss.client.wsdl.position}/MobileNumberPortabilityMgmt.wsdl" />
|
||||
@@ -369,6 +373,32 @@ nt.jar" todir="${dbcfx.ear.path}/res/APP-INF/lib"/>
|
||||
<copy todir="${mnp.ear.path}/APP-INF/lib" file="${wsdev.gisp.building.path}/esito/WSEsitoCessMnpCommon.jar"/>
|
||||
<delete dir="${wsdev.gisp.building.path}/esito/temp" />
|
||||
</target>
|
||||
|
||||
<target name="ESITORICMVNOWS" depends="init">
|
||||
<echo>
|
||||
**************************************************************
|
||||
Build ESITORICMVNOWS
|
||||
************************************************** ************
|
||||
</echo>
|
||||
<delete file="${wsdev.o2c.building.path}/esitoRicMvno/EsitoRicMvno_wsdl.jar"/>
|
||||
<wsdlc
|
||||
srcWsdl="${wsdev.wsdl.o2c.path}/esitoRicMvno.wsdl"
|
||||
destJwsDir="${wsdev.o2c.building.path}/esitoRicMvno"
|
||||
destImplDir="${wsdev.wssrc.path}"
|
||||
packageName="mnp.proxy.ws.o2c"/>
|
||||
|
||||
<!-- Compila i sorgenti e impacchetta le classi in un jar allo scopo di utilizzarlo con Eclipse -->
|
||||
<mkdir dir="${wsdev.o2c.building.path}/esitoRicMvno/temp" />
|
||||
<unzip src="${wsdev.o2c.building.path}/esitoRicMvno/EsitoRicMvno_wsdl.jar" dest="${wsdev.o2c.building.path}/esitoRicMvno/temp" />
|
||||
<javac includeantruntime="false" srcdir="${wsdev.o2c.building.path}/esitoRicMvno/temp" includes="**/*.java">
|
||||
<classpath refid="ws.gen.all.classpath"/>
|
||||
</javac>
|
||||
<jar destfile="${wsdev.o2c.building.path}/esitoRicMvno/WSEsitoRicMvnoCommon.jar">
|
||||
<fileset dir="${wsdev.o2c.building.path}/esitoRicMvno/temp"/>
|
||||
</jar>
|
||||
<copy todir="${mnp.ear.path}/APP-INF/lib" file="${wsdev.o2c.building.path}/esitoRicMvno/WSEsitoRicMvnoCommon.jar"/>
|
||||
<delete dir="${wsdev.o2c.building.path}/esitoRicMvno/temp" />
|
||||
</target>
|
||||
|
||||
<!-- **********************************************************
|
||||
INIZIO TARGET CREAZIONE ARTEFATTI SERVER PER WS VERSO DBSS
|
||||
|
||||
BIN
dbcmnpsrc/FE/mnpdev/mnp/ear/APP-INF/lib/WSEsitoRicMvnoCommon.jar
Normal file
BIN
dbcmnpsrc/FE/mnpdev/mnp/ear/APP-INF/lib/WSEsitoRicMvnoCommon.jar
Normal file
Binary file not shown.
@@ -44,9 +44,15 @@
|
||||
</web>
|
||||
</module>
|
||||
<module>
|
||||
<web>
|
||||
<web-uri>esitoCessMnp.war</web-uri>
|
||||
<context-root>/wsgispesito</context-root>
|
||||
</web>
|
||||
</module>
|
||||
<web>
|
||||
<web-uri>esitoCessMnp.war</web-uri>
|
||||
<context-root>/wsgispesito</context-root>
|
||||
</web>
|
||||
</module>
|
||||
<module>
|
||||
<web>
|
||||
<web-uri>esitoRicMvno.war</web-uri>
|
||||
<context-root>/wso2cesitricmvno</context-root>
|
||||
</web>
|
||||
</module>
|
||||
</application>
|
||||
|
||||
@@ -0,0 +1,130 @@
|
||||
package mnp.proxy.ws.o2c;
|
||||
|
||||
import javax.jws.WebService;
|
||||
import javax.xml.namespace.QName;
|
||||
|
||||
|
||||
import dbcmnp.soa.esitoricmvno.x20240605.EsitoRicMvnoRequest;
|
||||
import dbcmnp.soa.esitoricmvno.x20240605.EsitoRicMvnoResponse;
|
||||
import it.telecomitalia.soa.soap.soapheader.x20240605.holders.HeaderTypeHolder;
|
||||
import mnp.database.UserTransactionUtility;
|
||||
import mnp.log.Loggable;
|
||||
import mnp.log.ProcessLogger;
|
||||
import mnp.objects.LogInfo;
|
||||
import mnp.objects.LogProcess;
|
||||
import mnp.systemcontroller.gisp.handler.GispAttCessInEventHandler;
|
||||
import mnp.utility.Resources;
|
||||
import mnp.utility.XmlUtility;
|
||||
import weblogic.jws.*;
|
||||
import weblogic.transaction.UserTransaction;
|
||||
|
||||
/**
|
||||
* EsitoRicMvnoPortTypeImpl class implements web service endpoint interface EsitoRicMvnoPortType */
|
||||
|
||||
@WebService(
|
||||
serviceName="EsitoRicMvno",
|
||||
targetNamespace="http://dbcmnp/SOA/EsitoRicMvno",
|
||||
endpointInterface="mnp.proxy.ws.o2c.EsitoRicMvnoPortType")
|
||||
@WLHttpTransport(contextPath="wso2cesitricmvno",serviceUri="EsitoRicMvno",portName="EsitoRicMvno")
|
||||
public class EsitoRicMvnoPortTypeImpl implements EsitoRicMvnoPortType, Loggable {
|
||||
/**Implemento anche loggable per poter implementare i metodi di loggable e tenere traccia
|
||||
* dei log*/
|
||||
private final String codiceLog = "ZF";
|
||||
private String versione = "1.0";
|
||||
private ProcessLogger log = null;
|
||||
public EsitoRicMvnoPortTypeImpl() {
|
||||
|
||||
/** ProcessLogger utilizzato per stampare i log*/
|
||||
try {
|
||||
LogProcess logProcess = new LogProcess();
|
||||
logProcess.setCodice(codiceLog);
|
||||
logProcess.setProcess(this);
|
||||
log = new ProcessLogger(logProcess);
|
||||
} catch (Exception ex) {
|
||||
System.out.println("Errore nella creazione del ProcessLogger per EsitoRicMvnoPortTypeImpl:" + ex.getMessage());
|
||||
}
|
||||
System.out.println("Created WS for EsitoRicMvnoPortTypeImpl");
|
||||
|
||||
}
|
||||
|
||||
public EsitoRicMvnoResponse esitoRicMvno(HeaderTypeHolder Header, EsitoRicMvnoRequest body)
|
||||
|
||||
{
|
||||
|
||||
EsitoRicMvnoResponse response = new EsitoRicMvnoResponse();
|
||||
UserTransaction uTX = null;
|
||||
try {
|
||||
uTX = (UserTransaction) UserTransactionUtility.beginUserTransaction();
|
||||
log.write("0001", "Start EsitoRicMvno");
|
||||
logInput(Header, body);
|
||||
String tracciato;
|
||||
try{
|
||||
/** converto l'oggetto request in stringa*/
|
||||
tracciato = XmlUtility.getXmlStringFromCastorXmlObject(body,true);
|
||||
}catch (Exception e){
|
||||
/** rispondo con un ko e la descrizione è la descrizione dell'errore che manda in eccezione*/
|
||||
if (uTX!=null)
|
||||
UserTransactionUtility.endUserTransaction(uTX, false);
|
||||
response.setCODICE_ACK("KO");
|
||||
response.setDESCRIZIONE_ACK(e.getMessage());
|
||||
log.write("0003", "richiesta in ingresso non valida per Nome_Richiesta: " + body.getNOME_RICHIESTA());
|
||||
return response;
|
||||
}
|
||||
|
||||
/** stesso Handler di esitoCessMnpPortType ossia di DBC_DISATMNPG in Ingresso, quindi IN
|
||||
* per questo il Controller è IN ed anche l' Handler. Risali al percorso dalla classe
|
||||
* GispMap*/
|
||||
|
||||
GispAttCessInEventHandler handler = new GispAttCessInEventHandler(log);
|
||||
response = handler.processAcqSoapEvent(body, tracciato);
|
||||
UserTransactionUtility.endUserTransaction(uTX, true);
|
||||
|
||||
} catch (Exception ex) {
|
||||
if (uTX != null) {
|
||||
try {
|
||||
UserTransactionUtility.endUserTransaction(uTX, false);
|
||||
} catch (Exception e) {
|
||||
log.error("Exception generica " + e.getMessage());
|
||||
}
|
||||
}
|
||||
log.error("Exception generica " + ex.getMessage());
|
||||
|
||||
//non viene usato. cosa faccio ??
|
||||
//QName qname = new QName("http://dbcmnp/SOA/EsitoCessMnp/2023-03-30/", "Server");
|
||||
//throw new SOAPFaultException(qname, "Exception generica:" + ex.getMessage(), "GISP", null);
|
||||
}
|
||||
return response;
|
||||
}
|
||||
|
||||
|
||||
private void logInput(HeaderTypeHolder header, EsitoRicMvnoRequest body) {
|
||||
|
||||
log.write("9999", "richiesta in ingresso header= " + header);
|
||||
log.write("9999", "richiesta in ingresso body= " + body);
|
||||
|
||||
if (header != null && header.value != null) {
|
||||
log.write("9999", "getBusinessID = " + header.value.getBusinessID());
|
||||
log.write("9999", "getMessageID = " + header.value.getMessageID());
|
||||
log.write("9999", "getSourceSystem = " + header.value.getSourceSystem());
|
||||
log.write("9999", "getSourceSystem = " + header.value.getChannel());
|
||||
log.write("9999", "getTransactionID = " + header.value.getTransactionID());
|
||||
log.write("9999", "getInteractionDate = " + header.value.getInteractionDate());
|
||||
log.write("9999", "getEventType = " + header.value.getEventType());
|
||||
}
|
||||
|
||||
if (body != null) {
|
||||
log.write("9999", "Nome_Richiesta = " + body.getNOME_RICHIESTA() + ", EsitoCas = " + body.getCAS() + ", DescrizioneEsito = " + body.getDESCRIZIONE_ESITO());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public LogInfo getLogInfo() throws Exception {
|
||||
LogInfo logInfo = new LogInfo();
|
||||
logInfo.setProcess(getClass().getName());
|
||||
logInfo.setLogPath(Resources.getLogPath());
|
||||
logInfo.setTypeInfo(Resources.getTypeInfo());
|
||||
logInfo.setTypeDebug(Resources.getTypeDebug());
|
||||
logInfo.setTypeError(Resources.getTypeError());
|
||||
return logInfo;
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,7 @@ import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import dbcmnp.soa.esitocessmnp.x20230406.EsitoCessMnpRequest;
|
||||
import dbcmnp.soa.esitoricmvno.x20240605.EsitoRicMvnoRequest;
|
||||
import mnp.bo.BoFactory;
|
||||
import mnp.bo.RequestIF;
|
||||
import mnp.bo.donor.*;
|
||||
@@ -219,6 +220,97 @@ public class GispAttCessInFormatController extends FormatController {
|
||||
}
|
||||
|
||||
}
|
||||
/** Creo un metodo per gli esiti delle richieste di ATTIVAZIONE MVNO **/
|
||||
public int checkTracciatoSoapAtt(EsitoRicMvnoRequest esitoRicMvnoRequest, String tracciato, ProcessLogger log) {
|
||||
try {
|
||||
if(!checkMandatory(esitoRicMvnoRequest)) {
|
||||
mnpGispScartoAttCessIn = new MnpGispScartoAttCessIn(truncString(tracciato, MAX_LENGTH_RECORD), GispMap.GISP_SCARTO_CAMPO_OBBLIGATORIO);
|
||||
return ESITO_KO;
|
||||
}
|
||||
|
||||
/** Creo un metodo che possa gestire anche le richieste di Attivazione **/
|
||||
mnpGispAttCessIn = createMnpGispAttInFromSoapReq(esitoRicMvnoRequest);
|
||||
|
||||
//mnpGispAttCessIn = GispAttCessInXAO.getMnpGispAttCessInByXml(tracciato);
|
||||
log.debug("estratta MnpGispAttCessIn con NOME_RICHIESTA: " + mnpGispAttCessIn.getNomeRichiesta());
|
||||
|
||||
/** QUESTI CONTROLLI VENGONO FATTI INDIPENDENTEMENTE DALL' ESITO DI attivazione o cessazione
|
||||
* (creo un metodo generale? se si, modificare anche checkTracciatoSoap in modo che richiami il nuovo
|
||||
* metodo di controlli generale) **/
|
||||
if (mnpGispAttCessIn.getNomeRichiesta().equals(GispMap.GISP_ATT_TIPO_RICHIESTA)) {
|
||||
try {
|
||||
List processList = new ArrayList();
|
||||
processList.add(ProcessMapper.proc_RECIPIENT);
|
||||
processList.add(ProcessMapper.proc_RECIPIENT_VIRT);
|
||||
RequestIF request_if = BoFactory.getBusinessRequest(mnpGispAttCessIn.getCodiceRiproposizione(),processList);
|
||||
//se non ho eccezioni la richiesta esiste
|
||||
request_if = null;
|
||||
processList = null;
|
||||
return ESITO_OK;
|
||||
} catch (NonExistantRequestException e) {
|
||||
//non esiste la richiesta, scarto
|
||||
log.error(e.getMessage());
|
||||
mnpGispScartoAttCessIn = new MnpGispScartoAttCessIn(truncString(tracciato, MAX_LENGTH_RECORD),
|
||||
GispMap.GISP_SCARTO_RICHIESTA_INESISTENTE);
|
||||
return ESITO_KO;
|
||||
}
|
||||
}
|
||||
//se si tratta di una risposta di cessazione, verifico se esiste la richiesta donor o recipient virtuale
|
||||
else if (mnpGispAttCessIn.getNomeRichiesta().equals(GispMap.GISP_CESS_TIPO_RICHIESTA)
|
||||
||mnpGispAttCessIn.getNomeRichiesta().equals(GispMap.GISP_CESS_TIPO_RICHIESTA_PP)
|
||||
||mnpGispAttCessIn.getNomeRichiesta().equals(GispMap.GISP_CESS_TIPO_RICHIESTA_COABB)
|
||||
||mnpGispAttCessIn.getNomeRichiesta().equals(GispMap.GISP_CESS_TIPO_RICHIESTA_BUABB)) {
|
||||
try {
|
||||
List processList = new ArrayList();
|
||||
processList.add(ProcessMapper.proc_DONOR);
|
||||
processList.add(ProcessMapper.proc_RECIPIENT_VIRT);
|
||||
RequestIF request_if = BoFactory.getBusinessRequest(mnpGispAttCessIn.getCodiceRiproposizione(),processList);
|
||||
//se non ho eccezioni la richiesta esiste
|
||||
request_if = null;
|
||||
processList = null;
|
||||
return ESITO_OK;
|
||||
} catch (NonExistantRequestException e) {
|
||||
//non esiste la richiesta, scarto
|
||||
log.error(e.getMessage());
|
||||
mnpGispScartoAttCessIn = new MnpGispScartoAttCessIn(truncString(tracciato, MAX_LENGTH_RECORD),
|
||||
GispMap.GISP_SCARTO_RICHIESTA_INESISTENTE);
|
||||
return ESITO_KO;
|
||||
}
|
||||
} else if (mnpGispAttCessIn.getNomeRichiesta().equals(GispMap.GISP_CESS_TIPO_RICHIESTA_RESTITUZIONE)||
|
||||
mnpGispAttCessIn.getNomeRichiesta().equals(GispMap.GISP_CESS_TIPO_RICHIESTA_TP)){
|
||||
try {
|
||||
if (mnpGispAttCessIn.getNomeRichiesta().equals(GispMap.GISP_CESS_TIPO_RICHIESTA_RESTITUZIONE)){
|
||||
RichiestaCessazioneDAO dao = new RichiestaCessazioneDAO();
|
||||
RichiestaCessazione ric = dao.getRichiestaByID(mnpGispAttCessIn.getCodiceRiproposizione());
|
||||
if(ric==null) throw new NonExistantRequestException();
|
||||
} else if(mnpGispAttCessIn.getNomeRichiesta().equals(GispMap.GISP_CESS_TIPO_RICHIESTA_TP)){
|
||||
RichiestaPortingDAO dao= new RichiestaPortingDAO();
|
||||
RichiestaPorting ric = dao.getRichiestaByID(mnpGispAttCessIn.getCodiceRiproposizione());
|
||||
if(ric==null) throw new NonExistantRequestException();
|
||||
}
|
||||
return ESITO_OK;
|
||||
} catch (NonExistantRequestException e) {
|
||||
log.error(e.getMessage());
|
||||
//non esiste la richiesta, scarto
|
||||
mnpGispScartoAttCessIn = new MnpGispScartoAttCessIn(truncString(tracciato, MAX_LENGTH_RECORD),
|
||||
GispMap.GISP_SCARTO_RICHIESTA_INESISTENTE);
|
||||
return ESITO_KO;
|
||||
}
|
||||
}
|
||||
else {
|
||||
//non dovrei mai raggiungere questo punto perchè se gli esiti sono errati ottengo un errore
|
||||
//in fase di parsing
|
||||
throw new Exception("Esito non previsto:" +mnpGispAttCessIn.getNomeRichiesta());
|
||||
}
|
||||
|
||||
} catch (Exception ex) {
|
||||
// Un'eccezione presa qui indicare un errore di parse della risposta
|
||||
log.error(ex.getMessage());
|
||||
mnpGispScartoAttCessIn = new MnpGispScartoAttCessIn(truncString(tracciato, MAX_LENGTH_RECORD), GispMap.GISP_SCARTO_RISP_PARSE);
|
||||
return ESITO_KO;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private MnpGispAttCessIn createMnpGispAttCessInFromSoapReq(EsitoCessMnpRequest esitoCessMnpRequest) throws Exception {
|
||||
MnpGispAttCessIn attCessIn = new MnpGispAttCessIn();
|
||||
@@ -234,10 +326,33 @@ public class GispAttCessInFormatController extends FormatController {
|
||||
return attCessIn;
|
||||
}
|
||||
|
||||
/** metodo che crea un oggetto MnpGispAttCessIn da poter mappare in tabella.
|
||||
* prendendo come parametro formale un esito di richiesta ATTIVAZIONE EsitoRicMvnoRequest **/
|
||||
private MnpGispAttCessIn createMnpGispAttInFromSoapReq(EsitoRicMvnoRequest esitoRicMvnoMnpRequest) throws Exception {
|
||||
MnpGispAttCessIn attCessIn = new MnpGispAttCessIn();
|
||||
|
||||
attCessIn.setNomeRichiesta(esitoRicMvnoMnpRequest.getNOME_RICHIESTA());
|
||||
attCessIn.setCodiceRiproposizione(esitoRicMvnoMnpRequest.getCODICE_RIPROPOSIZIONE());
|
||||
if(!Func.isNull(esitoRicMvnoMnpRequest.getDATA_ESPLETAMENTO()))
|
||||
attCessIn.setDataEspletamento(DateUtils.toDateLocale(esitoRicMvnoMnpRequest.getDATA_ESPLETAMENTO(),GispMap.DATA_ESPL_FORMAT, Locale.ENGLISH));
|
||||
attCessIn.setDaScodare(0L);
|
||||
attCessIn.setEsitoCas(esitoRicMvnoMnpRequest.getCAS());
|
||||
attCessIn.setDescrizioneEsito(esitoRicMvnoMnpRequest.getDESCRIZIONE_ESITO());
|
||||
if(!Func.isNull(esitoRicMvnoMnpRequest.getDETTAGLIO_ESITO()))
|
||||
attCessIn.setDettaglioEsito(esitoRicMvnoMnpRequest.getDETTAGLIO_ESITO());
|
||||
|
||||
return attCessIn;
|
||||
}
|
||||
|
||||
private boolean checkMandatory(EsitoCessMnpRequest request) {
|
||||
return !Func.isNull(request.getNOME_RICHIESTA()) && !Func.isNull(request.getESITO_CAS()) && !Func.isNull(request.getDESCRIZIONE_ESITO()) /*&& !Func.isNull(request.getSysdate())*/;
|
||||
}
|
||||
|
||||
/** creo un CheckMandatory anche per gli esiti di ATTIVAZIONE MVNO**/
|
||||
private boolean checkMandatory(EsitoRicMvnoRequest request) {
|
||||
return !Func.isNull(request.getNOME_RICHIESTA()) && !Func.isNull(request.getCAS()) && !Func.isNull(request.getDESCRIZIONE_ESITO()) ;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Ritorna il dto che mappa la tabella di ingresso
|
||||
|
||||
@@ -8,6 +8,8 @@ import java.util.Map;
|
||||
|
||||
import dbcmnp.soa.esitocessmnp.x20230406.EsitoCessMnpRequest;
|
||||
import dbcmnp.soa.esitocessmnp.x20230406.EsitoCessMnpResponse;
|
||||
import dbcmnp.soa.esitoricmvno.x20240605.EsitoRicMvnoRequest;
|
||||
import dbcmnp.soa.esitoricmvno.x20240605.EsitoRicMvnoResponse;
|
||||
import mnp.bo.BoFactory;
|
||||
import mnp.bo.donor.RichiestaDonorBO;
|
||||
import mnp.bo.recipient.RichiestaRecipientBO;
|
||||
@@ -437,7 +439,6 @@ public class GispAttCessInEventHandler extends AbstractEventHandler {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public EsitoCessMnpResponse processAcqSoapEvent(EsitoCessMnpRequest body, String tracciato) throws Exception {
|
||||
GispAttCessInFormatController formatter = new GispAttCessInFormatController();
|
||||
EsitoCessMnpResponse response = new EsitoCessMnpResponse();
|
||||
@@ -481,6 +482,62 @@ public class GispAttCessInEventHandler extends AbstractEventHandler {
|
||||
return response;
|
||||
}
|
||||
|
||||
/** utilizzato per le richieste di ATTIVAZIONE. Crea un controller per le richieste di att/cess.
|
||||
* il checkTracciatoSoap va nella classe GispAttCessInFormatController per la gestione del processo di validazione
|
||||
* del tracciatO di attivazione donor/attivazione recipient in ingresso.
|
||||
* mi faccio tornare un tipo generico MnpGispAttCessIn, setto da scodare a 1
|
||||
* e salvo in tabella Mnp_Gisp_Att_Cess_In.
|
||||
* Creo una notifica che metto in coda
|
||||
* **/
|
||||
public EsitoRicMvnoResponse processAcqSoapEvent(EsitoRicMvnoRequest body, String tracciato) throws Exception {
|
||||
GispAttCessInFormatController formatter = new GispAttCessInFormatController();
|
||||
EsitoRicMvnoResponse response = new EsitoRicMvnoResponse();
|
||||
// esegue i controlli di consistenza e formali sul tracciato
|
||||
int esito = formatter.checkTracciatoSoapAtt(body, tracciato, log);
|
||||
if (esito == GispAttCessInFormatController.ESITO_OK) {
|
||||
MnpGispAttCessIn rispAttCess = formatter.getMnpGispAttCessIn();
|
||||
|
||||
|
||||
// da scodare a 1
|
||||
rispAttCess.setDaScodare(new Long(MSG_DA_SCODARE));
|
||||
//rispAttCess.setDaScodare(new Long(MSG_SCODATO));
|
||||
|
||||
|
||||
dao.save(rispAttCess);
|
||||
// N - RICHIESTA INSERITA NELLA TABELLA
|
||||
log.write("0095", "MNP_GISP_ATT_CESS_IN - UNIQUE_ID:" + rispAttCess.getUniqueId());
|
||||
String processType = getProcessType(rispAttCess);
|
||||
|
||||
// creo il messaggio di notifica
|
||||
NotificationMessage message = creaUniqueIdNotificationMessage(rispAttCess.getUniqueId(), NotificationMessageIF.NotificationType_Gisp_Att_Cess_In, NotificationMessageIF.SystemProvider_GISP, processType);
|
||||
|
||||
inserisciNotificaInCoda(message, getSelector(processType));
|
||||
// N - INSERIMENTO MESSAGGIO NELLA CODA
|
||||
log.write("0046", "MessageQueueGispIn - UNIQUE_ID:" + rispAttCess.getUniqueId());
|
||||
|
||||
response.setCODICE_ACK("OK");
|
||||
response.setDESCRIZIONE_ACK("");
|
||||
|
||||
//logIBA// security logction(ibFlowInWrapper.getTid(), ibFlowInWrapper.getIdSystem(), rispAttCess.getCodiceRiproposizione(), ActionLogMapping.RicezioneNotificaInfobus, true);
|
||||
} else if (esito == GispAttCessInFormatController.ESITO_KO) {
|
||||
log.write("9999", "RISPOSTA DI ATTIVAZIONE/CESSAZIONE DA GISP SCARTATA PER CONTROLLI FORMALI, TRACCIATO :" + tracciato);
|
||||
MnpGispScartoAttCessIn scartoAttCessIn = formatter.getMnpGispScartoAttCessIn();
|
||||
scartoDao.save(scartoAttCessIn);
|
||||
// N - RICHIESTA INSERITA NELLA TABELLA
|
||||
log.write("0095", "MNP_GISP_SCARTO_ATT_CESS_IN - UNIQUE_ID:" + scartoAttCessIn.getUniqueId());
|
||||
// security log
|
||||
//logIBAction(ibFlowInWrapper.getTid(), ibFlowInWrapper.getIdSystem(), null, ActionLogMapping.RicezioneNotificaInfobus, false);
|
||||
|
||||
//todo codici ko
|
||||
response.setCODICE_ACK("KO");
|
||||
response.setDESCRIZIONE_ACK("");
|
||||
} else {
|
||||
throw new Exception("Errore durante il processamento del tracciato di risposta di attivazione, esito inconsistente : " + esito);
|
||||
}
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
/*
|
||||
public void testDonor() throws Exception {
|
||||
MnpGispAttCessIn rispAttCess = new MnpGispAttCessIn();
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<application xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="5">
|
||||
<display-name>esitoRicMvno</display-name>
|
||||
<module>
|
||||
<web>
|
||||
<web-uri>esitoRicMvno.war</web-uri>
|
||||
<context-root>wso2cesitricmvno</context-root>
|
||||
</web>
|
||||
</module>
|
||||
</application>
|
||||
@@ -0,0 +1,2 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<weblogic-application xmlns="http://xmlns.oracle.com/weblogic/weblogic-application" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.oracle.com/weblogic/weblogic-application http://xmlns.oracle.com/weblogic/weblogic-application/1.3/weblogic-application.xsd"></weblogic-application>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
83
dbcmnpsrc/FE/mnpdev/wsdbc/wsdl/o2c/SOAPHeader_v1.1.xsd
Normal file
83
dbcmnpsrc/FE/mnpdev/wsdbc/wsdl/o2c/SOAPHeader_v1.1.xsd
Normal file
@@ -0,0 +1,83 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:h="http://telecomitalia.it/SOA/SOAP/SOAPHeader/2024-06-05" targetNamespace="http://telecomitalia.it/SOA/SOAP/SOAPHeader/2024-06-05" elementFormDefault="qualified" version="1.1">
|
||||
<!-- Start Types Definition -->
|
||||
<xs:complexType name="HeaderType">
|
||||
<xs:sequence>
|
||||
<xs:element name="sourceSystem" type="h:sourceSystemType"/>
|
||||
<xs:element name="channel" type="h:channelType"/>
|
||||
<xs:element name="interactionDate" type="h:interactionDateType"/>
|
||||
<xs:element name="sessionID" type="h:sessionIDType"/>
|
||||
<xs:element name="businessID" type="h:businessIDType"/>
|
||||
<xs:element name="transactionID" type="h:transactionIDType"/>
|
||||
<xs:element name="messageID" type="h:messageIDType" minOccurs="0"/>
|
||||
<xs:element name="eventType" type="h:eventType"/>
|
||||
<xs:element name="destinationSystem" type="h:destinationSystemType" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
<xs:simpleType name="dateType">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:pattern value="\d{4}-\d{2}-\d{2}"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
<xs:simpleType name="timeType">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:pattern value="\d{2}:\d{2}:\d{2}((Z)|(\.\d{1,}Z?)|((\+|-)\d{2}:\d{2}))?"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
<xs:simpleType name="sessionIDType">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:minLength value="1"/>
|
||||
<xs:maxLength value="24"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
<xs:simpleType name="businessIDType">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:minLength value="1"/>
|
||||
<xs:maxLength value="24"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
<xs:simpleType name="messageIDType">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:minLength value="1"/>
|
||||
<xs:maxLength value="24"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
<xs:simpleType name="sourceSystemType">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:minLength value="1"/>
|
||||
<xs:maxLength value="10"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
<xs:simpleType name="channelType">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:minLength value="1"/>
|
||||
<xs:maxLength value="10"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
<xs:simpleType name="transactionIDType">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:minLength value="1"/>
|
||||
<xs:maxLength value="24"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
<xs:simpleType name="eventType">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:minLength value="1"/>
|
||||
<xs:maxLength value="64"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
<xs:simpleType name="destinationSystemType">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:minLength value="1"/>
|
||||
<xs:maxLength value="10"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
<xs:complexType name="interactionDateType">
|
||||
<xs:sequence>
|
||||
<xs:element name="Date" type="h:dateType"/>
|
||||
<xs:element name="Time" type="h:timeType"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
<!-- End Types Definition -->
|
||||
<xs:element name="Header" type="h:HeaderType"/>
|
||||
</xs:schema>
|
||||
42
dbcmnpsrc/FE/mnpdev/wsdbc/wsdl/o2c/esitoRicMvno.wsdl
Normal file
42
dbcmnpsrc/FE/mnpdev/wsdbc/wsdl/o2c/esitoRicMvno.wsdl
Normal file
@@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<wsdl:definitions xmlns:nsSchema="http://dbcmnp/SOA/EsitoRicMvno/2024-06-05" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:head="http://telecomitalia.it/SOA/SOAP/SOAPHeader/2024-06-05" xmlns:tns="http://dbcmnp/SOA/EsitoRicMvno" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://dbcmnp/SOA/EsitoRicMvno">
|
||||
<wsdl:types>
|
||||
<xsd:schema targetNamespace="http://dbcmnp/SOA/EsitoRicMvno">
|
||||
<xsd:import namespace="http://dbcmnp/SOA/EsitoRicMvno/2024-06-05" schemaLocation="esitoRicMvno.xsd"/>
|
||||
<xsd:import namespace="http://telecomitalia.it/SOA/SOAP/SOAPHeader/2024-06-05" schemaLocation="SOAPHeader_v1.1.xsd"/>
|
||||
</xsd:schema>
|
||||
</wsdl:types>
|
||||
<wsdl:message name="esitoRicMvnoRequest">
|
||||
<wsdl:part name="Header" element="head:Header"/>
|
||||
<wsdl:part name="body" element="nsSchema:esitoRicMvnoRequest"/>
|
||||
</wsdl:message>
|
||||
<wsdl:message name="esitoRicMvnoResponse">
|
||||
<wsdl:part name="Header" element="head:Header"/>
|
||||
<wsdl:part name="body" element="nsSchema:esitoRicMvnoResponse"/>
|
||||
</wsdl:message>
|
||||
<wsdl:portType name="EsitoRicMvnoPortType">
|
||||
<wsdl:operation name="esitoRicMvno">
|
||||
<wsdl:input message="tns:esitoRicMvnoRequest"/>
|
||||
<wsdl:output message="tns:esitoRicMvnoResponse"/>
|
||||
</wsdl:operation>
|
||||
</wsdl:portType>
|
||||
<wsdl:binding name="EsitoRicMvnoBinding" type="tns:EsitoRicMvnoPortType">
|
||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
<wsdl:operation name="esitoRicMvno">
|
||||
<soap:operation soapAction="esitoRicMvno" style="document"/>
|
||||
<wsdl:input>
|
||||
<soap:body parts="body" use="literal"/>
|
||||
<soap:header message="tns:esitoRicMvnoRequest" part="Header" use="literal"/>
|
||||
</wsdl:input>
|
||||
<wsdl:output>
|
||||
<soap:body parts="body" use="literal"/>
|
||||
<soap:header message="tns:esitoRicMvnoResponse" part="Header" use="literal"/>
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
</wsdl:binding>
|
||||
<wsdl:service name="EsitoRicMvno">
|
||||
<wsdl:port name="EsitoRicMvno" binding="tns:EsitoRicMvnoBinding">
|
||||
<soap:address location="https://localhost:7502/wso2cesitricmvno/EsitoRicMvno"/>
|
||||
</wsdl:port>
|
||||
</wsdl:service>
|
||||
</wsdl:definitions>
|
||||
63
dbcmnpsrc/FE/mnpdev/wsdbc/wsdl/o2c/esitoRicMvno.xsd
Normal file
63
dbcmnpsrc/FE/mnpdev/wsdbc/wsdl/o2c/esitoRicMvno.xsd
Normal file
@@ -0,0 +1,63 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:sm="http://dbcmnp/SOA/EsitoRicMvno/2024-06-05" targetNamespace="http://dbcmnp/SOA/EsitoRicMvno/2024-06-05" elementFormDefault="qualified" version="1.0">
|
||||
<xs:element name="esitoRicMvnoRequest">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="NOME_RICHIESTA" type="sm:typeNOME_RICHIESTA"/>
|
||||
<xs:element name="CAS" type="sm:typeCAS"/>
|
||||
<xs:element name="DETTAGLIO_ESITO" type="sm:typeDETTAGLIO_ESITO" minOccurs="0"/>
|
||||
<xs:element name="DESCRIZIONE_ESITO" type="sm:typeDESCRIZIONE_ESITO"/>
|
||||
<xs:element name="DATA_ESPLETAMENTO" type="sm:dateTimeType" minOccurs="0"/>
|
||||
<xs:element name="CODICE_RIPROPOSIZIONE" type="sm:strLn23"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="esitoRicMvnoResponse">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="CODICE_ACK" type="sm:tipoAckTYPE"/>
|
||||
<xs:element name="DESCRIZIONE_ACK" type="sm:string255TYPE" minOccurs="0"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:simpleType name="typeNOME_RICHIESTA">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:pattern value="DBC_DISATMNPG|DBC_ATTIVGSM|DBC_DISATMNPG_PP|DBC_DISATMNPG_CO|DBC_DISATMNPG_BU"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
<xs:simpleType name="typeCAS">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:pattern value="001|002|003"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
<xs:simpleType name="typeDETTAGLIO_ESITO">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:length value="2"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
<xs:simpleType name="typeDESCRIZIONE_ESITO">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:maxLength value="48"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
<xs:simpleType name="dateTimeType">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:maxLength value="20"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
<xs:simpleType name="strLn23">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:maxLength value="23"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
<xs:simpleType name="string255TYPE">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:maxLength value="255"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
<xs:simpleType name="tipoAckTYPE">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:pattern value="OK|KO"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:schema>
|
||||
Reference in New Issue
Block a user