MNP_SM_2459 - settaggio del parametro obbligatorio session_Id

This commit is contained in:
manuelstefanile
2024-12-11 17:09:19 +01:00
parent cfcb966633
commit cf29bf810e
11 changed files with 94 additions and 34 deletions

View File

@@ -28,7 +28,7 @@ import it.telecomitalia.soa.soap.soapheader.x20230406.holders.HeaderTypeHolder;
@WLHttpTransport(contextPath="wsgispesito",serviceUri="EsitoCessMnp",portName="EsitoCessMnp")
public class EsitoCessMnpPortTypeImpl implements EsitoCessMnpPortType, Loggable {
private final String codiceLog = "ZF";
private final String codiceLog = "HB";
private String versione = "1.0";
private ProcessLogger log = null;
@@ -82,20 +82,20 @@ public class EsitoCessMnpPortTypeImpl implements EsitoCessMnpPortType, Loggable
private void logInput(HeaderTypeHolder header, EsitoCessMnpRequest 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", "EsitoCessMnpRequest Header:");
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", "getChannel = " + header.value.getChannel());
log.write("9999", "getTransactionID = " + header.value.getTransactionID());
log.write("9999", "getInteractionDate = " + header.value.getInteractionDate());
log.write("9999", "getEventType = " + header.value.getEventType());
log.write("9999", "getSessionID = " + header.value.getSessionID());
}
if (body != null) {
log.write("9999", "EsitoCessMnpRequest Body:");
log.write("9999", "Nome_Richiesta = " + body.getNOME_RICHIESTA() + ", EsitoCas = " + body.getESITO_CAS() + ", DescrizioneEsito = " + body.getDESCRIZIONE_ESITO());
}
}

View File

@@ -16,6 +16,7 @@ import mnp.objects.LogInfo;
import mnp.objects.LogProcess;
import mnp.objects.map.GispMap;
import mnp.utility.DateUtils;
import mnp.utility.Func;
import mnp.utility.Resources;
import javax.xml.rpc.Stub;
import it.telecomitalia.soa.soap.soapheader.InteractionDateType;
@@ -104,15 +105,17 @@ public class GISPClient implements Loggable {
header.setEventType(eventType);
header.setBusinessID(new TID().toString());
//MNP_SM_2459 - settaggio del parametro obbligatorio sessionID
header.setSessionID(new TID().toString());
header.setTransactionID(new TID().toString());
header.setMessageID(new TID().toString());
body.setHeader(header);
/*
if (requestHeader != null) {
header.setBusinessID(requestHeader.getBusinessId());
header.setTransactionID(requestHeader.getTransactionId());
}*/
System.out.println("Request Header iBK50RichiestaCessazioneLineaDonor: "+ Func.getFieldDescription(body.getHeader()));
System.out.println("Request Body iBK50RichiestaCessazioneLineaDonor:");
for(com.tibco.tns.bw.json.x1698392386014.RequestParameters req: body.getMessage().getRequestParameters()){
System.out.println(Func.getFieldDescription(req));
}
IBK50ResponseElementType response = endPoint.iBK50RichiestaCessazioneLineaDonor(body);

View File

@@ -29,7 +29,7 @@ import weblogic.transaction.UserTransaction;
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 final String codiceLog = "HB";
private String versione = "1.0";
private ProcessLogger log = null;
public EsitoRicMvnoPortTypeImpl() {
@@ -99,20 +99,20 @@ public class EsitoRicMvnoPortTypeImpl implements EsitoRicMvnoPortType, Loggable
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", "EsitoRicMvnoRequest Header:");
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", "getChannel = " + header.value.getChannel());
log.write("9999", "getTransactionID = " + header.value.getTransactionID());
log.write("9999", "getInteractionDate = " + header.value.getInteractionDate());
log.write("9999", "getEventType = " + header.value.getEventType());
log.write("9999", "getSessionID = " + header.value.getSessionID());
}
if (body != null) {
log.write("9999", "EsitoRicMvnoRequest Body:");
log.write("9999", "Nome_Richiesta = " + body.getNOME_RICHIESTA() + ", EsitoCas = " + body.getCAS() + ", DescrizioneEsito = " + body.getDESCRIZIONE_ESITO());
}
}

View File

@@ -15,6 +15,7 @@ import mnp.objects.LogInfo;
import mnp.objects.LogProcess;
import mnp.utility.DateUtils;
import mnp.utility.Func;
import mnp.utility.Resources;
import org.example.ibk61_responseresource.IBK61_ResponseElementType;
import tim.infobus.data.TID;
@@ -178,7 +179,7 @@ public class IBK61Client implements Loggable {
/**
* Creazione Request servizio richiestaAttivaztioneCessazioneLinea esposto da O2C
* per richieste di attivazione (DISATMNPG)
* per richieste di cessazione (DISATMNPG)
*
* @param MnpGispCessOut oggetto legato al dao che referenzia la tabella MNP_GISP_CESS_OUT
* @return oggetto di tipo IBK61_RequestElementType
@@ -274,9 +275,10 @@ public class IBK61Client implements Loggable {
header.setEventType(eventType);
header.setBusinessID(new TID().toString());
//MNP_SM_2459 - settaggio del parametro obbligatorio sessionID
header.setSessionID(new TID().toString());
header.setTransactionID(new TID().toString());
header.setMessageID(new TID().toString());
//in uniformità alla IBK50 non mettiamo SessionID
body.setHeader(header);

View File

@@ -20,11 +20,11 @@ public class IBK61SOAPHandler extends GenericHandler {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
try {
System.out.println("[IBK61SOAPHandler] - Inizio Log Invio Notifica");
System.out.println("[IBK61SOAPHandler] - Inizio Log Request");
System.out.println("----------------------------------------------------------------------------------------------");
soapMsgCtx.getMessage().writeTo(baos);
System.out.println(baos.toString());
System.out.println("[IBK61SOAPHandler] - Fine Log Invio Notifica");
System.out.println("[IBK61SOAPHandler] - Fine Log Request");
} catch (Exception ex) {
ex.printStackTrace();
return false;
@@ -37,11 +37,11 @@ public class IBK61SOAPHandler extends GenericHandler {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
try {
System.out.println("[IBK61SOAPHandler] - Inizio Log Errore Invio Notifica");
System.out.println("[IBK61SOAPHandler] - Inizio Log Errore");
System.out.println("----------------------------------------------------------------------------------------------");
soapMsgCtx.getMessage().writeTo(baos);
System.out.println(baos.toString());
System.out.println("[IBK61SOAPHandler] - Fine Log Errore Invio Notifica");
System.out.println("[IBK61SOAPHandler] - Fine Log Errore");
} catch (Exception ex) {
ex.printStackTrace();
return false;
@@ -49,4 +49,21 @@ public class IBK61SOAPHandler extends GenericHandler {
return true;
}
public boolean handleResponse(MessageContext context) {
SOAPMessageContext soapMsgCtx = (SOAPMessageContext) context;
ByteArrayOutputStream baos = new ByteArrayOutputStream();
try {
System.out.println("[IBK61SOAPHandler] - Inizio Log Response");
System.out.println("----------------------------------------------------------------------------------------------");
soapMsgCtx.getMessage().writeTo(baos);
System.out.println(baos.toString());
System.out.println("[IBK61SOAPHandler] - Fine Log Response");
} catch (Exception ex) {
ex.printStackTrace();
return false;
}
return true;
}
}

View File

@@ -12,6 +12,7 @@ import mnp.log.Loggable;
import mnp.log.ProcessLogger;
import mnp.objects.LogInfo;
import mnp.objects.LogProcess;
import mnp.utility.Func;
import mnp.utility.Resources;
import org.example.ibk63_responseresource.IBK63_ResponseElementType;
@@ -191,9 +192,10 @@ public class IBK63Client implements Loggable {
header.setEventType(eventType);
header.setBusinessID(new TID().toString());
//MNP_SM_2459 - settaggio del parametro obbligatorio sessionID
header.setSessionID(new TID().toString());
header.setTransactionID(new TID().toString());
header.setMessageID(new TID().toString());
//in uniformità alla IBK50 non mettiamo SessionID
body.setHeader(header);

View File

@@ -20,11 +20,11 @@ public class IBK63SOAPHandler extends GenericHandler {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
try {
System.out.println("[IBK63SOAPHandler] - Inizio Log Invio Notifica");
System.out.println("[IBK63SOAPHandler] - Inizio Log Request");
System.out.println("----------------------------------------------------------------------------------------------");
soapMsgCtx.getMessage().writeTo(baos);
System.out.println(baos.toString());
System.out.println("[IBK63SOAPHandler] - Fine Log Invio Notifica");
System.out.println("[IBK63SOAPHandler] - Fine Log Request");
} catch (Exception ex) {
ex.printStackTrace();
return false;
@@ -37,11 +37,28 @@ public class IBK63SOAPHandler extends GenericHandler {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
try {
System.out.println("[IBK63SOAPHandler] - Inizio Log Errore Invio Notifica");
System.out.println("[IBK63SOAPHandler] - Inizio Log Errore");
System.out.println("----------------------------------------------------------------------------------------------");
soapMsgCtx.getMessage().writeTo(baos);
System.out.println(baos.toString());
System.out.println("[IBK63SOAPHandler] - Fine Log Errore Invio Notifica");
System.out.println("[IBK63SOAPHandler] - Fine Log Errore");
} catch (Exception ex) {
ex.printStackTrace();
return false;
}
return true;
}
public boolean handleResponse(MessageContext context) {
SOAPMessageContext soapMsgCtx = (SOAPMessageContext) context;
ByteArrayOutputStream baos = new ByteArrayOutputStream();
try {
System.out.println("[IBK63SOAPHandler] - Inizio Log Response");
System.out.println("----------------------------------------------------------------------------------------------");
soapMsgCtx.getMessage().writeTo(baos);
System.out.println(baos.toString());
System.out.println("[IBK63SOAPHandler] - Fine Log Response");
} catch (Exception ex) {
ex.printStackTrace();
return false;

View File

@@ -11,6 +11,7 @@ import mnp.log.Loggable;
import mnp.log.ProcessLogger;
import mnp.objects.LogInfo;
import mnp.objects.LogProcess;
import mnp.utility.Func;
import mnp.utility.Resources;
import org.example.ibk65_responseresource.IBK65_ResponseElementType;
import tim.infobus.data.TID;
@@ -141,7 +142,6 @@ public class IBK65Client implements Loggable {
message.setRequestParameters(array_param);
richiestaRestituzione.setMessage(message);
return richiestaRestituzione;
}
@@ -172,9 +172,10 @@ public class IBK65Client implements Loggable {
header.setEventType(eventType);
header.setBusinessID(new TID().toString());
//MNP_SM_2459 - settaggio del parametro obbligatorio sessionID
header.setSessionID(new TID().toString());
header.setTransactionID(new TID().toString());
header.setMessageID(new TID().toString());
//in uniformità alla IBK50 non mettiamo SessionID
body.setHeader(header);

View File

@@ -20,11 +20,11 @@ public class IBK65SOAPHandler extends GenericHandler {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
try {
System.out.println("[IBK65SOAPHandler] - Inizio Log Invio Notifica");
System.out.println("[IBK65SOAPHandler] - Inizio Log Request");
System.out.println("----------------------------------------------------------------------------------------------");
soapMsgCtx.getMessage().writeTo(baos);
System.out.println(baos.toString());
System.out.println("[IBK65SOAPHandler] - Fine Log Invio Notifica");
System.out.println("[IBK65SOAPHandler] - Fine Log Request");
} catch (Exception ex) {
ex.printStackTrace();
return false;
@@ -37,11 +37,29 @@ public class IBK65SOAPHandler extends GenericHandler {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
try {
System.out.println("[IBK65SOAPHandler] - Inizio Log Errore Invio Notifica");
System.out.println("[IBK65SOAPHandler] - Inizio Log Errore");
System.out.println("----------------------------------------------------------------------------------------------");
soapMsgCtx.getMessage().writeTo(baos);
System.out.println(baos.toString());
System.out.println("[IBK65SOAPHandler] - Fine Log Errore Invio Notifica");
System.out.println("[IBK65SOAPHandler] - Fine Log Errore");
} catch (Exception ex) {
ex.printStackTrace();
return false;
}
return true;
}
public boolean handleResponse(MessageContext context) {
SOAPMessageContext soapMsgCtx = (SOAPMessageContext) context;
ByteArrayOutputStream baos = new ByteArrayOutputStream();
try {
System.out.println("[IBK65SOAPHandler] - Inizio Log Response");
System.out.println("----------------------------------------------------------------------------------------------");
soapMsgCtx.getMessage().writeTo(baos);
System.out.println(baos.toString());
System.out.println("[IBK65SOAPHandler] - Fine Log Response");
} catch (Exception ex) {
ex.printStackTrace();
return false;

View File

@@ -5,6 +5,6 @@
<handler>
<j2ee:handler-name>IBK63SOAPHandler</j2ee:handler-name>
<j2ee:handler-class>mnp.proxy.ws.o2c.client.IBK63SOAPHandler</j2ee:handler-class>
<j2ee:handler-class>mnp.proxy.ws.o2c.client.IBK63.IBK63SOAPHandler</j2ee:handler-class>
</handler>
</weblogic-wsee-clientHandlerChain>

View File

@@ -5,6 +5,6 @@
<handler>
<j2ee:handler-name>IBK65SOAPHandler</j2ee:handler-name>
<j2ee:handler-class>mnp.proxy.ws.o2c.client.IBK65SOAPHandler</j2ee:handler-class>
<j2ee:handler-class>mnp.proxy.ws.o2c.client.IBK65.IBK65SOAPHandler</j2ee:handler-class>
</handler>
</weblogic-wsee-clientHandlerChain>