MNP_RU_638 - Middleware Modernization 2024: Servizi GISP lotto5 (DROP 1 - R58-24-0029 - 296987)

This commit is contained in:
manuelstefanile
2024-06-21 10:00:00 +02:00
parent 5b5720cb7e
commit 044efe150b
6 changed files with 147 additions and 78 deletions

View File

@@ -1,12 +1,12 @@
# SWITCH TIPO COMUNICAZIONE DA GISP AD O2C (VALORI: 0 = COMUNICAZIONE INFOBUS, 1 = COMUNICAZIONE SOAP O2C)
SOAP_O2C_RICH_ATTIVGSM_ENABLED=0
TIMEOUT_WS_O2C_ATTIVGSM_DONOR=30000
URL_WS_O2C_ATTIVGSM_DONOR={URL O2C WS IBK61}
# SWITCH TIPO COMUNICAZIONE DA GISP AD O2C (VALORI: 0 = COMUNICAZIONE INFOBUS, 1 = COMUNICAZIONE SOAP O2C)
SOAP_O2C_RICH_DISATMNPG_ENABLED=0
TIMEOUT_WS_O2C_DISATMNPG_DONOR=30000
URL_WS_O2C_DISATMNPG_DONOR={URL O2C WS IBK61}
# PROPERTIES IN COMUNE ATTIVGSM/DISATMNPG
TIMEOUT_WS_O2C_DISATMNPG_ATTIVGSM_DONOR=30000
URL_WS_O2C_DISATMNPG_ATTIVGSM_DONOR={URL O2C WS IBK61}
# SWITCH TIPO COMUNICAZIONE DA GISP AD O2C (VALORI: 0 = COMUNICAZIONE INFOBUS, 1 = COMUNICAZIONE SOAP O2C)
SOAP_O2C_RICH_RESTITUZIONE_ENABLED=0

View File

@@ -304,6 +304,7 @@
<file name="Castor-AomDataBinding.jar"/>
<file name="Castor-GispRestTP.jar"/>
<file name="WSIBK50client.jar"/>
<file name="WSO2CIBK61Client.jar"/>
<file name="WSEsitoCessMnpCommon.jar"/>
<file name="WSEsitoRicMvnoCommon.jar"/>
<file name="Castor-GispCessTP.jar"/>

View File

@@ -49,9 +49,10 @@
<property name="wsdev.wsdl.gisp.path" value="${wsdev.wsdl.home}/gisp" />
<property name="wsdev.gisp.building.path" value="${wsdev.home}/gisp/building" />
<!-- Per sviluppo Middleware Modernization 2024: Servizi GISP lotto5 WS esposti ad O2C -->
<!-- MNP_RU_638: Middleware Modernization 2024 - Servizi GISP lotto5 WS O2C -->
<property name="wsdev.wsdl.o2c.path" value="${wsdev.wsdl.home}/o2c" />
<property name="wsdev.o2c.building.path" value="${wsdev.home}/o2c/building" />
<property name="wsdev.o2c.client.path" value="${wsdev.home}/o2c/client" />
<!-- Per sviluppo client WS DBSS -->
<property name="wsdbss.clientdev.home" value="${project.home}/mnp/wsdbss" />
@@ -677,6 +678,33 @@ dest="${wsdev.dbss.building.path}/temp" /> -->
</jar>
<delete dir="${wsdev.gisp.client.path}/temp" />
</target>
<!--
***********************************************************************
TARGET CREAZIONE ARTEFATTI CLIENT PER WS IBK61 VERSO O2C
***********************************************************************
-->
<target name="WSO2CIBK61ClientGen" depends="">
<mkdir dir="${wsdev.o2c.client.path}/IBK61/tmp" />
<!-- Nel file handlerClientIBK61.config.xml definire la classe mnp.proxy.ws.o2c.client.IBK61SOAPHandler.java di log -->
<clientgen
wsdl="${wsdev.wsdl.o2c.path}/IBK61/IBK61_Concrete.wsdl"
destDir="${wsdev.o2c.client.path}/IBK61/tmp"
handlerChainFile="${wsdev.wsdl.o2c.path}/IBK61/handlerClientIBK61.config.xml"
packageName="it.valueteam.mnp.ws.o2c.client"
type="JAXRPC"
/>
<!-- Compila i sorgenti e impacchetta le classi in un jar allo scopo di utilizzarlo con Eclipse -->
<javac includeantruntime="false" srcdir="${wsdev.o2c.client.path}/IBK61/tmp" includes="**/*.java">
<classpath refid="ws.gen.all.classpath"/>
</javac>
<jar destfile="${wsdev.o2c.client.path}/IBK61/WSO2CIBK61Client.jar">
<fileset dir="${wsdev.o2c.client.path}/IBK61/tmp"/>
</jar>
<copy todir="${mnp.ear.path}/APP-INF/lib" file="${wsdev.o2c.client.path}/IBK61/WSO2CIBK61Client.jar"/>
<delete dir="${wsdev.o2c.client.path}/IBK61/tmp" />
</target>
</project>

View File

@@ -6,6 +6,7 @@ import java.util.List;
import javax.transaction.UserTransaction;
import com.tibco.tns.bw.json.x1718779962104.IBK61_RequestElementType;
import mnp.bo.BoFactory;
import mnp.bo.RequestIF;
import mnp.bo.recipient.RichiestaRecipientBO;
@@ -20,11 +21,14 @@ import mnp.objects.UniqueIdNotificationMessage;
import mnp.objects.dao.RichiestaRecipient;
import mnp.proxy.ToWTC.InfobusHandler;
import mnp.proxy.ToWTC.InfobusHandlerException;
import mnp.proxy.ws.o2c.client.IBK61Client;
import mnp.systemcontroller.eventhandler.AbstractEventHandler;
import mnp.systemcontroller.gisp.formatcontroller.GispRequestAttOutFormatController;
import mnp.database.hb.dto.MnpGestRichRecVirt;
import mnp.database.hb.dto.MnpGispAttOut;
import mnp.database.hb.dao.MnpGispAttOutDAO;
import mnp.utility.Resources;
import org.example.ibk61_responseresource.IBK61_ResponseElementType;
/**
* <p>Title: Handler per la gestione delle richieste di attivazione recipient a GISP</p>
@@ -98,19 +102,15 @@ public class GispRequestAttOutEventHandler extends AbstractEventHandler {
richiestaRecipientVirt.avanzaStatoInAttivazione(log);
}
dao.flush();
//invio la notifica
/** switch in base alla properties ed invia a o2c
* if(!Resources.SOAP_GISP_RICH_ATT_ENABLED()) {
* if(sendToIB(mnpGispAttOut)) {
* requestSent = true;
* }
* } else {
* if(sendToO2C(mnpGispAttOut)) {
* requestSent = true;
* }
* }
* **/
sendToIB(mnpGispAttOut);
//MNP_RU_638 - Middleware Modernization 2024: Servizi GISP lotto5 (drop 1)
// introdotta variabile di properties da Gisp ad O2C
if(!Resources.SOAP_O2C_RICH_ATTIVGSM_ENABLED()) {
sendToIB(mnpGispAttOut);
}
else {
sendToO2C(mnpGispAttOut);
}
}
break;
default:
@@ -365,31 +365,27 @@ public class GispRequestAttOutEventHandler extends AbstractEventHandler {
}
/**
* Metodo utilizzato per inviare la richiesta di attivazione ad O2C utilizzando il Client IBK61.
* NOTA: eventType = "lineeMobili_gestioneMNPMVNOAttiv"
*
*
* public boolean sendToO2C(MnpGispAttOut MnpGispAttOut) throws Exception {
*
* GISPClient client = new GISPClient();
* RequestType requesto2c = client.createRequest(MnpGispAttOut);
*
* iBK61RichiestaAttivazioneResponseElementType response;
*
* boolean esito = false;
* try {
* response = client.iBK61RichiestaAttivazioneLineaDonor(requesto2c, "lineeMobili_gestioneMNPMVNOAttiv");
* log.write("9999", "Response ricevuta OK: " + (response != null && response.getResponse() != null ?
* response.getResponse().getReturnCode() : ""));
* esito = true;
* } catch(Exception e) {
* log.write("9999", "Eccezione ricevuta su ibk50RichiestaCessazioneLineaDonor" + e.getMessage());
* throw e;
* }
*
* return esito;
* }
* **/
* @param MnpGispAttOut
* @throws Exception
*/
public void sendToO2C(MnpGispAttOut MnpGispAttOut) throws Exception {
IBK61Client client = new IBK61Client();
IBK61_RequestElementType requesto2c = client.createRequest(MnpGispAttOut);
IBK61_ResponseElementType response;
try {
response = client.iBK61RichiestaAttivazioneLineaDonor(requesto2c, "lineeMobili_gestioneMNPMVNOAttiv");
log.write("9999", "Response ricevuta OK: " + (response != null && response.getResponse() != null ?
response.getResponse().getReturnCode() : ""));
} catch(Exception e) {
log.write("9999", "Eccezione ricevuta su iBK61RichiestaAttivazioneLineaDonor" + e.getMessage());
throw e;
}
}
}

View File

@@ -3,20 +3,25 @@ package mnp.systemcontroller.gisp.handler;
import java.util.*;
import javax.transaction.*;
import com.tibco.tns.bw.json.x1718779962104.IBK61_RequestElementType;
import mnp.bo.*;
import mnp.bo.donor.*;
import mnp.bo.virtuale.recipient.RichiestaRecipientVirtualeBO;
import mnp.database.*;
import mnp.database.hb.dao.*;
import mnp.database.hb.dto.MnpGispAttOut;
import mnp.exception.infobus.*;
import mnp.log.*;
import mnp.objects.*;
import mnp.proxy.ToWTC.*;
import mnp.proxy.ws.o2c.client.IBK61Client;
import mnp.systemcontroller.eventhandler.*;
import mnp.systemcontroller.gisp.formatcontroller.*;
import mnp.objects.dao.RichiestaDonorGui;
import mnp.database.hb.dto.MnpGestioneRichiesta;
import mnp.database.hb.dto.MnpGispCessOut;
import mnp.utility.Resources;
import org.example.ibk61_responseresource.IBK61_ResponseElementType;
/**
* <p>Title: DBC</p>
@@ -151,18 +156,12 @@ public class GispRequestCessOutEventHandler extends AbstractEventHandler {
richiestaRecVirtBO.avanzaStatoInCessazione(log);
}
dao.flush();
/** switch in base alla properties ed invia a o2c
* if(!Resources.SOAP_GISP_RICH_DISATMNPG_ENABLED()()) {
* if(sendToIB(mnpGispCessOut)) {
* requestSent = true;
* }
* } else {
* if(sendToO2C(mnpGispCessOut)) {
* requestSent = true;
* }
* }
* **/
sendToIB(mnpGispCessOut);
//MNP_RU_638 - Middleware Modernization 2024: Servizi GISP lotto5 (drop 1)
// introdotta variabile di properties da Gisp ad O2C
if(!Resources.SOAP_O2C_RICH_DISATMNPG_ENABLED())
sendToIB(mnpGispCessOut);
else
sendToO2C(mnpGispCessOut);
}
break;
default:
@@ -337,10 +336,12 @@ public class GispRequestCessOutEventHandler extends AbstractEventHandler {
}
}
/**
* invia la notifica
/** Invia la notifica
*
* @param mnpGispRicCessOut MnpGispRicCessOut
* @param mnpGispCessOut
* @throws IBSendException
* @throws InfobusHandlerException
* @throws Exception
*/
private void sendToIB(MnpGispCessOut mnpGispCessOut) throws
IBSendException, InfobusHandlerException, Exception {
@@ -372,30 +373,31 @@ public class GispRequestCessOutEventHandler extends AbstractEventHandler {
}
/**
/** Metodo utilizzato per inviare la richiesta di cessazione a O2C
* utilizzando il Client IBK61.
* NOTA: eventType = lineeMobili_gestioneMNPMVNODisat
*
*
* public boolean sendToO2C(MnpGispCessOut mnpGispCessOut) throws Exception {
*
* GISPClient client = new GISPClient();
* RequestType requesto2c = client.createRequest(mnpGispCessOut);
*
* iBK61RichiestaCessazioneResponseElementType response;
*
* boolean esito = false;
* try {
* response = client.iBK61RichiestaCessazioneLineaDonor(requesto2c, "lineeMobili_gestioneMNPMVNODisat");
* log.write("9999", "Response ricevuta OK: " + (response != null && response.getResponse() != null ?
* response.getResponse().getReturnCode() : ""));
* esito = true;
* } catch(Exception e) {
* log.write("9999", "Eccezione ricevuta su ibk50RichiestaCessazioneLineaDonor" + e.getMessage());
* throw e;
* }
*
* return esito;
* }
* **/
* @param mnpGispCessOut
* @throws Exception
*/
public void sendToO2C(MnpGispCessOut mnpGispCessOut) throws Exception {
IBK61Client client = new IBK61Client();
IBK61_RequestElementType requesto2c = client.createRequest(mnpGispCessOut);
IBK61_ResponseElementType response;
try {
response = client.iBK61RichiestaCessazioneLineaDonor(requesto2c, "lineeMobili_gestioneMNPMVNODisat");
log.write("9999", "Response ricevuta OK: " + (response != null && response.getResponse() != null ?
response.getResponse().getReturnCode() : ""));
} catch(Exception e) {
log.write("9999", "Eccezione ricevuta su iBK61RichiestaCessazioneLineaDonor" + e.getMessage());
throw e;
}
}

View File

@@ -2434,31 +2434,73 @@ public class Resources {
return trim(props.getProperty("URL_WS_GISP_CESS_DONOR"));
}
/************* Properties di ATTIVAZIONE ********************/
public static Boolean SOAP_O2C_RICH_ATTIVGSM_ENABLED() {
init();
String valoreProp = trim(props.getProperty("SOAP_O2C_RICH_ATTIVGSM_ENABLED"));
return ("1".equalsIgnoreCase(valoreProp));
}
/************* Properties di DISATTIVAZIONE ********************/
public static Boolean SOAP_O2C_RICH_DISATMNPG_ENABLED() {
init();
String valoreProp = trim(props.getProperty("SOAP_O2C_RICH_DISATMNPG_ENABLED"));
return ("1".equalsIgnoreCase(valoreProp));
}
/************* Properties di ATTIVAZOINE/DISATTIVAZIONE ********************/
public static String getURL_WS_O2C_DISATMNPG_ATTIVGSM_DONOR() {
init();
return trim(props.getProperty("URL_WS_O2C_DISATMNPG_ATTIVGSM_DONOR"));
}
public static String getTIMEOUT_WS_O2C_DISATMNPG_ATTIVGSM_DONOR() {
init();
return trim(props.getProperty("TIMEOUT_WS_O2C_DISATMNPG_ATTIVGSM_DONOR"));
}
/************* Properties di RESTITUZIONE ********************/
public static Boolean SOAP_O2C_RICH_RESTITUZIONE_ENABLED() {
init();
String valoreProp = trim(props.getProperty("SOAP_O2C_RICH_RESTITUZIONE_ENABLED"));
return ("1".equalsIgnoreCase(valoreProp));
}
public static String getURL_WS_O2C_RESTITUZIONE_DONOR() {
init();
return trim(props.getProperty("URL_WS_O2C_RESTITUZIONE_DONOR"));
}
public static String getTIMEOUT_WS_O2C_RESTITUZIONE_DONOR() {
init();
return trim(props.getProperty("TIMEOUT_WS_O2C_RESTITUZIONE_DONOR"));
}
/************* Properties di TERZEPARTI ********************/
public static Boolean SOAP_O2C_RICH_TERZEPARTI_ENABLED() {
init();
String valoreProp = trim(props.getProperty("SOAP_O2C_RICH_TERZEPARTI_ENABLED"));
return ("1".equalsIgnoreCase(valoreProp));
}
public static String getURL_WS_O2C_TERZEPARTI_DONOR() {
init();
return trim(props.getProperty("URL_WS_O2C_TERZEPARTI_DONOR"));
}
public static String getTIMEOUT_WS_O2C_TERZEPARTI_DONOR() {
init();
return trim(props.getProperty("TIMEOUT_WS_O2C_TERZEPARTI_DONOR"));
}
/************* Properties di DISATMNP_CO ********************/
public static Boolean SOAP_O2C_RICH_DISATMNPG_CO_ENABLED() {
init();
String valoreProp = trim(props.getProperty("SOAP_O2C_RICH_DISATMNPG_CO_ENABLED"));
return ("1".equalsIgnoreCase(valoreProp));
}
public static String getURL_WS_O2C_DISATMNPG_CO_DONOR() {
init();
return trim(props.getProperty("URL_WS_O2C_DISATMNPG_CO_DONOR"));
}
public static String getTIMEOUT_WS_O2C_DISATMNPG_CO_DONOR() {
init();
return trim(props.getProperty("TIMEOUT_WS_O2C_DISATMNPG_CO_DONOR"));
}
}