Merge branch_C02_2025 on master

This commit is contained in:
vincenzofariello
2025-02-25 09:43:58 +01:00
26 changed files with 3224 additions and 57 deletions

View File

@@ -0,0 +1,3 @@
############### Middleware Modernization 2024: Servizi GISP lotto7 - BEGIN - #################
ESO_RETRIEVE_REST_POST_ENABLED = 0
ESO_RETRIEVE_REST_POST_URL = "URL_WS_ESO"

View File

@@ -27,8 +27,12 @@ public class UltimoProcesso {
this.processo = processo; this.processo = processo;
} }
//MNP_RU_645 R1C-19-0635-100134 Accordo Quadro MNP OLO Gateway Unico WIN3 di C5 2020
public String getCodiceOperatoreRec() { public String getCodiceOperatoreRec() {
return codiceOperatoreRec; if(codiceOperatoreRec.equalsIgnoreCase("WIND") || codiceOperatoreRec.equalsIgnoreCase("H3GI"))
return "WIN3";
else
return codiceOperatoreRec;
} }
public void setCodiceOperatoreRec(String codiceOperatoreRec) { public void setCodiceOperatoreRec(String codiceOperatoreRec) {

View File

@@ -4,6 +4,7 @@ import com.google.gson.Gson;
import com.google.gson.GsonBuilder; import com.google.gson.GsonBuilder;
import com.google.gson.reflect.TypeToken; import com.google.gson.reflect.TypeToken;
import mnp.database.hb.dto.MnpGinoRetrieveOut; import mnp.database.hb.dto.MnpGinoRetrieveOut;
import mnp.database.hb.dto.MnpGispRetrieveOut;
import mnp.database.hb.dto.MnpSdpRetrieveOut; import mnp.database.hb.dto.MnpSdpRetrieveOut;
import mnp.log.ProcessLogger; import mnp.log.ProcessLogger;
import mnp.proxy.ws.fetrcs.*; import mnp.proxy.ws.fetrcs.*;
@@ -13,8 +14,10 @@ import mnp.utility.Resources;
import org.apache.http.Header; import org.apache.http.Header;
import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet; import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.conn.ssl.NoopHostnameVerifier; import org.apache.http.conn.ssl.NoopHostnameVerifier;
import org.apache.http.conn.ssl.SSLConnectionSocketFactory; import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients; import org.apache.http.impl.client.HttpClients;
import org.apache.http.message.BasicHeader; import org.apache.http.message.BasicHeader;
@@ -45,6 +48,47 @@ public class WSRestHandler extends GenericHandler {
this.log = log; this.log = log;
} }
private String restPost(String url, Header[] headers, String json, ProcessLogger log) throws Exception{
CloseableHttpClient client = null;
CloseableHttpResponse response = null;
StringBuilder jsonString = new StringBuilder();
try {
StringEntity postingString = new StringEntity(json);
SSLContext sslContext = createSSLContext(); //verificare WSUtils
SSLConnectionSocketFactory scf = new SSLConnectionSocketFactory(sslContext, NoopHostnameVerifier.INSTANCE);
//client = HttpClients.custom().useSystemProperties().build();
client = HttpClients.custom().useSystemProperties().setSSLSocketFactory(scf).build();
HttpPost post = new HttpPost(url);
post.setEntity(postingString);
post.setHeaders(headers);
response = client.execute(post);
BufferedReader rd = new BufferedReader(new InputStreamReader(response.getEntity().getContent()));
String line;
while ((line = rd.readLine()) != null) {
jsonString.append(line).append('\n');
}
client.close();
response.close();
} catch (Exception ex) {
log.write("2512","ERRORE POST response");
throw ex;
} finally {
try {
if (client != null) {
client.close();
}
if (response != null) {
response.close();
}
} catch (Exception e) {
e.printStackTrace();
}
}
return jsonString.toString();
}
private String restGet(String url, Header[] headers) throws Exception { private String restGet(String url, Header[] headers) throws Exception {
CloseableHttpClient client = null; CloseableHttpClient client = null;
CloseableHttpResponse response = null; CloseableHttpResponse response = null;
@@ -281,6 +325,22 @@ public class WSRestHandler extends GenericHandler {
} }
} }
public String retrieveESORestPost(String requestSdpJson) throws Exception {
logWrite("9999", "retrieveESORestPost: INIZIO CHIAMATA SERVIZIO REST");
String risposta = "";
try {
Header[] headers = setHeader("retriverGispXML");
String url = Resources.getESO_RETRIEVE_REST_POST_URL();
risposta = restPost(url,headers,requestSdpJson,log);
logWrite("9999", "retrieveESORestPost: url chiamato: "+url);
logWrite("9999", "retrieveESORestPost: FINE CHIAMATA SERVIZIO REST");
} catch (Exception ex) {
logWrite("9999", "retrieveESORestPost: ECCEZIONE NELLA CHIAMATA REST:" + " Message: " +ex.getMessage() +" Cause: "+ex.getCause());
throw ex;
}
return risposta;
}
private Header[] setHeader(String restService) { private Header[] setHeader(String restService) {
Date now = new Date(); Date now = new Date();
TID tid = new TID(); TID tid = new TID();

View File

@@ -0,0 +1,490 @@
/*
* API retrieve
* API relative al servizio di Retrieve esposto ai sistemi
*
* OpenAPI spec version: BOZZA
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package mnp.proxy.ws.sdp.client;
import com.google.gson.annotations.SerializedName;
import java.io.Serializable;
/**
* Attributi
*/
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2024-10-18T09:59:42.779692356Z[GMT]")
public class Attributi implements Serializable {
@SerializedName("PSD2")
private String psD2 = null;
@SerializedName("tecnologia")
private String tecnologia = null;
@SerializedName("usage")
private AttributiUsage usage = null;
@SerializedName("prepagato")
private String prepagato = null;
@SerializedName("stato")
private String stato = null;
@SerializedName("dettaglio_stato")
private AttributiDettaglioStato dettaglioStato = null;
@SerializedName("esp")
private String esp = null;
@SerializedName("profilo")
private String profilo = null;
@SerializedName("descrizione_profilo")
private String descrizioneProfilo = null;
@SerializedName("tipologia")
private String tipologia = null;
@SerializedName("convergente")
private String convergente = null;
@SerializedName("blocco")
private AttributiBlocco blocco = null;
@SerializedName("blocco_direttrici")
private AttributiBloccoDirettrici bloccoDirettrici = null;
@SerializedName("can_attivazione")
private String canAttivazione = null;
@SerializedName("livello_rischio")
private String livelloRischio = null;
@SerializedName("Blocco_finecredito")
private String bloccoFinecredito = null;
@SerializedName("Data_prima_attivazione")
private String dataPrimaAttivazione = null;
@SerializedName("Data_Ultima_Operazione")
private String dataUltimaOperazione = null;
@SerializedName("imsi")
private String imsi = null;
@SerializedName("flag_vas")
private String flagVas = null;
@SerializedName("dati_commerciali")
private AttributiDatiCommerciali datiCommerciali = null;
public Attributi psD2(String psD2) {
this.psD2 = psD2;
return this;
}
/**
* Get psD2
* @return psD2
**/
public String getPsD2() {
return psD2;
}
public void setPsD2(String psD2) {
this.psD2 = psD2;
}
public Attributi tecnologia(String tecnologia) {
this.tecnologia = tecnologia;
return this;
}
/**
* Get tecnologia
* @return tecnologia
**/
public String getTecnologia() {
return tecnologia;
}
public void setTecnologia(String tecnologia) {
this.tecnologia = tecnologia;
}
public Attributi usage(AttributiUsage usage) {
this.usage = usage;
return this;
}
/**
* Get usage
* @return usage
**/
public AttributiUsage getUsage() {
return usage;
}
public void setUsage(AttributiUsage usage) {
this.usage = usage;
}
public Attributi prepagato(String prepagato) {
this.prepagato = prepagato;
return this;
}
/**
* Get prepagato
* @return prepagato
**/
public String getPrepagato() {
return prepagato;
}
public void setPrepagato(String prepagato) {
this.prepagato = prepagato;
}
public Attributi stato(String stato) {
this.stato = stato;
return this;
}
/**
* Get stato
* @return stato
**/
public String getStato() {
return stato;
}
public void setStato(String stato) {
this.stato = stato;
}
public Attributi dettaglioStato(AttributiDettaglioStato dettaglioStato) {
this.dettaglioStato = dettaglioStato;
return this;
}
/**
* Get dettaglioStato
* @return dettaglioStato
**/
public AttributiDettaglioStato getDettaglioStato() {
return dettaglioStato;
}
public void setDettaglioStato(AttributiDettaglioStato dettaglioStato) {
this.dettaglioStato = dettaglioStato;
}
public Attributi esp(String esp) {
this.esp = esp;
return this;
}
/**
* Get esp
* @return esp
**/
public String getEsp() {
return esp;
}
public void setEsp(String esp) {
this.esp = esp;
}
public Attributi profilo(String profilo) {
this.profilo = profilo;
return this;
}
/**
* Get profilo
* @return profilo
**/
public String getProfilo() {
return profilo;
}
public void setProfilo(String profilo) {
this.profilo = profilo;
}
public Attributi descrizioneProfilo(String descrizioneProfilo) {
this.descrizioneProfilo = descrizioneProfilo;
return this;
}
/**
* Get descrizioneProfilo
* @return descrizioneProfilo
**/
public String getDescrizioneProfilo() {
return descrizioneProfilo;
}
public void setDescrizioneProfilo(String descrizioneProfilo) {
this.descrizioneProfilo = descrizioneProfilo;
}
public Attributi tipologia(String tipologia) {
this.tipologia = tipologia;
return this;
}
/**
* Get tipologia
* @return tipologia
**/
public String getTipologia() {
return tipologia;
}
public void setTipologia(String tipologia) {
this.tipologia = tipologia;
}
public Attributi convergente(String convergente) {
this.convergente = convergente;
return this;
}
/**
* Get convergente
* @return convergente
**/
public String getConvergente() {
return convergente;
}
public void setConvergente(String convergente) {
this.convergente = convergente;
}
public Attributi blocco(AttributiBlocco blocco) {
this.blocco = blocco;
return this;
}
/**
* Get blocco
* @return blocco
**/
public AttributiBlocco getBlocco() {
return blocco;
}
public void setBlocco(AttributiBlocco blocco) {
this.blocco = blocco;
}
public Attributi bloccoDirettrici(AttributiBloccoDirettrici bloccoDirettrici) {
this.bloccoDirettrici = bloccoDirettrici;
return this;
}
/**
* Get bloccoDirettrici
* @return bloccoDirettrici
**/
public AttributiBloccoDirettrici getBloccoDirettrici() {
return bloccoDirettrici;
}
public void setBloccoDirettrici(AttributiBloccoDirettrici bloccoDirettrici) {
this.bloccoDirettrici = bloccoDirettrici;
}
public Attributi canAttivazione(String canAttivazione) {
this.canAttivazione = canAttivazione;
return this;
}
/**
* Get canAttivazione
* @return canAttivazione
**/
public String getCanAttivazione() {
return canAttivazione;
}
public void setCanAttivazione(String canAttivazione) {
this.canAttivazione = canAttivazione;
}
public Attributi livelloRischio(String livelloRischio) {
this.livelloRischio = livelloRischio;
return this;
}
/**
* Get livelloRischio
* @return livelloRischio
**/
public String getLivelloRischio() {
return livelloRischio;
}
public void setLivelloRischio(String livelloRischio) {
this.livelloRischio = livelloRischio;
}
public Attributi bloccoFinecredito(String bloccoFinecredito) {
this.bloccoFinecredito = bloccoFinecredito;
return this;
}
/**
* Get bloccoFinecredito
* @return bloccoFinecredito
**/
public String getBloccoFinecredito() {
return bloccoFinecredito;
}
public void setBloccoFinecredito(String bloccoFinecredito) {
this.bloccoFinecredito = bloccoFinecredito;
}
public Attributi dataPrimaAttivazione(String dataPrimaAttivazione) {
this.dataPrimaAttivazione = dataPrimaAttivazione;
return this;
}
/**
* Get dataPrimaAttivazione
* @return dataPrimaAttivazione
**/
public String getDataPrimaAttivazione() {
return dataPrimaAttivazione;
}
public void setDataPrimaAttivazione(String dataPrimaAttivazione) {
this.dataPrimaAttivazione = dataPrimaAttivazione;
}
public Attributi dataUltimaOperazione(String dataUltimaOperazione) {
this.dataUltimaOperazione = dataUltimaOperazione;
return this;
}
/**
* Get dataUltimaOperazione
* @return dataUltimaOperazione
**/
public String getDataUltimaOperazione() {
return dataUltimaOperazione;
}
public void setDataUltimaOperazione(String dataUltimaOperazione) {
this.dataUltimaOperazione = dataUltimaOperazione;
}
public Attributi imsi(String imsi) {
this.imsi = imsi;
return this;
}
/**
* Get imsi
* @return imsi
**/
public String getImsi() {
return imsi;
}
public void setImsi(String imsi) {
this.imsi = imsi;
}
public Attributi flagVas(String flagVas) {
this.flagVas = flagVas;
return this;
}
/**
* Get flagVas
* @return flagVas
**/
public String getFlagVas() {
return flagVas;
}
public void setFlagVas(String flagVas) {
this.flagVas = flagVas;
}
public Attributi datiCommerciali(AttributiDatiCommerciali datiCommerciali) {
this.datiCommerciali = datiCommerciali;
return this;
}
/**
* Get datiCommerciali
* @return datiCommerciali
**/
public AttributiDatiCommerciali getDatiCommerciali() {
return datiCommerciali;
}
public void setDatiCommerciali(AttributiDatiCommerciali datiCommerciali) {
this.datiCommerciali = datiCommerciali;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Attributi {\n");
sb.append(" psD2: ").append(toIndentedString(psD2)).append("\n");
sb.append(" tecnologia: ").append(toIndentedString(tecnologia)).append("\n");
sb.append(" usage: ").append(toIndentedString(usage)).append("\n");
sb.append(" prepagato: ").append(toIndentedString(prepagato)).append("\n");
sb.append(" stato: ").append(toIndentedString(stato)).append("\n");
sb.append(" dettaglioStato: ").append(toIndentedString(dettaglioStato)).append("\n");
sb.append(" esp: ").append(toIndentedString(esp)).append("\n");
sb.append(" profilo: ").append(toIndentedString(profilo)).append("\n");
sb.append(" descrizioneProfilo: ").append(toIndentedString(descrizioneProfilo)).append("\n");
sb.append(" tipologia: ").append(toIndentedString(tipologia)).append("\n");
sb.append(" convergente: ").append(toIndentedString(convergente)).append("\n");
sb.append(" blocco: ").append(toIndentedString(blocco)).append("\n");
sb.append(" bloccoDirettrici: ").append(toIndentedString(bloccoDirettrici)).append("\n");
sb.append(" canAttivazione: ").append(toIndentedString(canAttivazione)).append("\n");
sb.append(" livelloRischio: ").append(toIndentedString(livelloRischio)).append("\n");
sb.append(" bloccoFinecredito: ").append(toIndentedString(bloccoFinecredito)).append("\n");
sb.append(" dataPrimaAttivazione: ").append(toIndentedString(dataPrimaAttivazione)).append("\n");
sb.append(" dataUltimaOperazione: ").append(toIndentedString(dataUltimaOperazione)).append("\n");
sb.append(" imsi: ").append(toIndentedString(imsi)).append("\n");
sb.append(" flagVas: ").append(toIndentedString(flagVas)).append("\n");
sb.append(" datiCommerciali: ").append(toIndentedString(datiCommerciali)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -0,0 +1,238 @@
/*
* API retrieve
* API relative al servizio di Retrieve esposto ai sistemi
*
* OpenAPI spec version: BOZZA
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package mnp.proxy.ws.sdp.client;
import com.google.gson.annotations.SerializedName;
import java.io.Serializable;
/**
* AttributiBlocco
*/
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2024-10-18T09:59:42.779692356Z[GMT]")
public class AttributiBlocco implements Serializable {
@SerializedName("fs")
private String fs = null;
@SerializedName("mor")
private String mor = null;
@SerializedName("fraud")
private String fraud = null;
@SerializedName("anagr")
private String anagr = null;
@SerializedName("vm18")
private String vm18 = null;
@SerializedName("dec434")
private String dec434 = null;
@SerializedName("dec467")
private String dec467 = null;
@SerializedName("dec489")
private String dec489 = null;
@SerializedName("charity")
private String charity = null;
public AttributiBlocco fs(String fs) {
this.fs = fs;
return this;
}
/**
* Get fs
* @return fs
**/
public String getFs() {
return fs;
}
public void setFs(String fs) {
this.fs = fs;
}
public AttributiBlocco mor(String mor) {
this.mor = mor;
return this;
}
/**
* Get mor
* @return mor
**/
public String getMor() {
return mor;
}
public void setMor(String mor) {
this.mor = mor;
}
public AttributiBlocco fraud(String fraud) {
this.fraud = fraud;
return this;
}
/**
* Get fraud
* @return fraud
**/
public String getFraud() {
return fraud;
}
public void setFraud(String fraud) {
this.fraud = fraud;
}
public AttributiBlocco anagr(String anagr) {
this.anagr = anagr;
return this;
}
/**
* Get anagr
* @return anagr
**/
public String getAnagr() {
return anagr;
}
public void setAnagr(String anagr) {
this.anagr = anagr;
}
public AttributiBlocco vm18(String vm18) {
this.vm18 = vm18;
return this;
}
/**
* Get vm18
* @return vm18
**/
public String getVm18() {
return vm18;
}
public void setVm18(String vm18) {
this.vm18 = vm18;
}
public AttributiBlocco dec434(String dec434) {
this.dec434 = dec434;
return this;
}
/**
* Get dec434
* @return dec434
**/
public String getDec434() {
return dec434;
}
public void setDec434(String dec434) {
this.dec434 = dec434;
}
public AttributiBlocco dec467(String dec467) {
this.dec467 = dec467;
return this;
}
/**
* Get dec467
* @return dec467
**/
public String getDec467() {
return dec467;
}
public void setDec467(String dec467) {
this.dec467 = dec467;
}
public AttributiBlocco dec489(String dec489) {
this.dec489 = dec489;
return this;
}
/**
* Get dec489
* @return dec489
**/
public String getDec489() {
return dec489;
}
public void setDec489(String dec489) {
this.dec489 = dec489;
}
public AttributiBlocco charity(String charity) {
this.charity = charity;
return this;
}
/**
* Get charity
* @return charity
**/
public String getCharity() {
return charity;
}
public void setCharity(String charity) {
this.charity = charity;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AttributiBlocco {\n");
sb.append(" fs: ").append(toIndentedString(fs)).append("\n");
sb.append(" mor: ").append(toIndentedString(mor)).append("\n");
sb.append(" fraud: ").append(toIndentedString(fraud)).append("\n");
sb.append(" anagr: ").append(toIndentedString(anagr)).append("\n");
sb.append(" vm18: ").append(toIndentedString(vm18)).append("\n");
sb.append(" dec434: ").append(toIndentedString(dec434)).append("\n");
sb.append(" dec467: ").append(toIndentedString(dec467)).append("\n");
sb.append(" dec489: ").append(toIndentedString(dec489)).append("\n");
sb.append(" charity: ").append(toIndentedString(charity)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -0,0 +1,215 @@
/*
* API retrieve
* API relative al servizio di Retrieve esposto ai sistemi
*
* OpenAPI spec version: BOZZA
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package mnp.proxy.ws.sdp.client;
import com.google.gson.annotations.SerializedName;
import java.io.Serializable;
/**
* AttributiBloccoDirettrici
*/
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2024-10-18T09:59:42.779692356Z[GMT]")
public class AttributiBloccoDirettrici implements Serializable {
@SerializedName("smo")
private String smo = null;
@SerializedName("smt")
private String smt = null;
@SerializedName("roaming_GPRS")
private String roamingGPRS = null;
@SerializedName("roaming_GSM_GPRS")
private String roamingGSMGPRS = null;
@SerializedName("itz")
private String itz = null;
@SerializedName("b166")
private String b166 = null;
@SerializedName("soglia_fvf")
private String sogliaFvf = null;
@SerializedName("soglia_gprs")
private String sogliaGprs = null;
public AttributiBloccoDirettrici smo(String smo) {
this.smo = smo;
return this;
}
/**
* Get smo
* @return smo
**/
public String getSmo() {
return smo;
}
public void setSmo(String smo) {
this.smo = smo;
}
public AttributiBloccoDirettrici smt(String smt) {
this.smt = smt;
return this;
}
/**
* Get smt
* @return smt
**/
public String getSmt() {
return smt;
}
public void setSmt(String smt) {
this.smt = smt;
}
public AttributiBloccoDirettrici roamingGPRS(String roamingGPRS) {
this.roamingGPRS = roamingGPRS;
return this;
}
/**
* Get roamingGPRS
* @return roamingGPRS
**/
public String getRoamingGPRS() {
return roamingGPRS;
}
public void setRoamingGPRS(String roamingGPRS) {
this.roamingGPRS = roamingGPRS;
}
public AttributiBloccoDirettrici roamingGSMGPRS(String roamingGSMGPRS) {
this.roamingGSMGPRS = roamingGSMGPRS;
return this;
}
/**
* Get roamingGSMGPRS
* @return roamingGSMGPRS
**/
public String getRoamingGSMGPRS() {
return roamingGSMGPRS;
}
public void setRoamingGSMGPRS(String roamingGSMGPRS) {
this.roamingGSMGPRS = roamingGSMGPRS;
}
public AttributiBloccoDirettrici itz(String itz) {
this.itz = itz;
return this;
}
/**
* Get itz
* @return itz
**/
public String getItz() {
return itz;
}
public void setItz(String itz) {
this.itz = itz;
}
public AttributiBloccoDirettrici b166(String b166) {
this.b166 = b166;
return this;
}
/**
* Get b166
* @return b166
**/
public String getB166() {
return b166;
}
public void setB166(String b166) {
this.b166 = b166;
}
public AttributiBloccoDirettrici sogliaFvf(String sogliaFvf) {
this.sogliaFvf = sogliaFvf;
return this;
}
/**
* Get sogliaFvf
* @return sogliaFvf
**/
public String getSogliaFvf() {
return sogliaFvf;
}
public void setSogliaFvf(String sogliaFvf) {
this.sogliaFvf = sogliaFvf;
}
public AttributiBloccoDirettrici sogliaGprs(String sogliaGprs) {
this.sogliaGprs = sogliaGprs;
return this;
}
/**
* Get sogliaGprs
* @return sogliaGprs
**/
public String getSogliaGprs() {
return sogliaGprs;
}
public void setSogliaGprs(String sogliaGprs) {
this.sogliaGprs = sogliaGprs;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AttributiBloccoDirettrici {\n");
sb.append(" smo: ").append(toIndentedString(smo)).append("\n");
sb.append(" smt: ").append(toIndentedString(smt)).append("\n");
sb.append(" roamingGPRS: ").append(toIndentedString(roamingGPRS)).append("\n");
sb.append(" roamingGSMGPRS: ").append(toIndentedString(roamingGSMGPRS)).append("\n");
sb.append(" itz: ").append(toIndentedString(itz)).append("\n");
sb.append(" b166: ").append(toIndentedString(b166)).append("\n");
sb.append(" sogliaFvf: ").append(toIndentedString(sogliaFvf)).append("\n");
sb.append(" sogliaGprs: ").append(toIndentedString(sogliaGprs)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -0,0 +1,151 @@
/*
* API retrieve
* API relative al servizio di Retrieve esposto ai sistemi
*
* OpenAPI spec version: BOZZA
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package mnp.proxy.ws.sdp.client;
import com.google.gson.annotations.SerializedName;
import java.io.Serializable;
/**
* AttributiDatiCommerciali
*/
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2024-10-18T09:59:42.779692356Z[GMT]")
public class AttributiDatiCommerciali implements Serializable {
@SerializedName("contratto")
private String contratto = null;
@SerializedName("accordo_quadro")
private String accordoQuadro = null;
@SerializedName("cliente")
private String cliente = null;
@SerializedName("marcaggio_cliente")
private String marcaggioCliente = null;
@SerializedName("denominazione_cliente")
private String denominazioneCliente = null;
public AttributiDatiCommerciali contratto(String contratto) {
this.contratto = contratto;
return this;
}
/**
* Get contratto
* @return contratto
**/
public String getContratto() {
return contratto;
}
public void setContratto(String contratto) {
this.contratto = contratto;
}
public AttributiDatiCommerciali accordoQuadro(String accordoQuadro) {
this.accordoQuadro = accordoQuadro;
return this;
}
/**
* Get accordoQuadro
* @return accordoQuadro
**/
public String getAccordoQuadro() {
return accordoQuadro;
}
public void setAccordoQuadro(String accordoQuadro) {
this.accordoQuadro = accordoQuadro;
}
public AttributiDatiCommerciali cliente(String cliente) {
this.cliente = cliente;
return this;
}
/**
* Get cliente
* @return cliente
**/
public String getCliente() {
return cliente;
}
public void setCliente(String cliente) {
this.cliente = cliente;
}
public AttributiDatiCommerciali marcaggioCliente(String marcaggioCliente) {
this.marcaggioCliente = marcaggioCliente;
return this;
}
/**
* Get marcaggioCliente
* @return marcaggioCliente
**/
public String getMarcaggioCliente() {
return marcaggioCliente;
}
public void setMarcaggioCliente(String marcaggioCliente) {
this.marcaggioCliente = marcaggioCliente;
}
public AttributiDatiCommerciali denominazioneCliente(String denominazioneCliente) {
this.denominazioneCliente = denominazioneCliente;
return this;
}
/**
* Get denominazioneCliente
* @return denominazioneCliente
**/
public String getDenominazioneCliente() {
return denominazioneCliente;
}
public void setDenominazioneCliente(String denominazioneCliente) {
this.denominazioneCliente = denominazioneCliente;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AttributiDatiCommerciali {\n");
sb.append(" contratto: ").append(toIndentedString(contratto)).append("\n");
sb.append(" accordoQuadro: ").append(toIndentedString(accordoQuadro)).append("\n");
sb.append(" cliente: ").append(toIndentedString(cliente)).append("\n");
sb.append(" marcaggioCliente: ").append(toIndentedString(marcaggioCliente)).append("\n");
sb.append(" denominazioneCliente: ").append(toIndentedString(denominazioneCliente)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -0,0 +1,110 @@
/*
* API retrieve
* API relative al servizio di Retrieve esposto ai sistemi
*
* OpenAPI spec version: BOZZA
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package mnp.proxy.ws.sdp.client;
import com.google.gson.annotations.SerializedName;
import java.io.Serializable;
/**
* AttributiDettaglioStato
*/
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2024-10-18T09:59:42.779692356Z[GMT]")
public class AttributiDettaglioStato implements Serializable {
@SerializedName("predisconnesso")
private String predisconnesso = null;
@SerializedName("cessazione_volontaria")
private String cessazioneVolontaria = null;
@SerializedName("cessazione_mnp")
private String cessazioneMnp = null;
public AttributiDettaglioStato predisconnesso(String predisconnesso) {
this.predisconnesso = predisconnesso;
return this;
}
/**
* Get predisconnesso
* @return predisconnesso
**/
public String getPredisconnesso() {
return predisconnesso;
}
public void setPredisconnesso(String predisconnesso) {
this.predisconnesso = predisconnesso;
}
public AttributiDettaglioStato cessazioneVolontaria(String cessazioneVolontaria) {
this.cessazioneVolontaria = cessazioneVolontaria;
return this;
}
/**
* Get cessazioneVolontaria
* @return cessazioneVolontaria
**/
public String getCessazioneVolontaria() {
return cessazioneVolontaria;
}
public void setCessazioneVolontaria(String cessazioneVolontaria) {
this.cessazioneVolontaria = cessazioneVolontaria;
}
public AttributiDettaglioStato cessazioneMnp(String cessazioneMnp) {
this.cessazioneMnp = cessazioneMnp;
return this;
}
/**
* Get cessazioneMnp
* @return cessazioneMnp
**/
public String getCessazioneMnp() {
return cessazioneMnp;
}
public void setCessazioneMnp(String cessazioneMnp) {
this.cessazioneMnp = cessazioneMnp;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AttributiDettaglioStato {\n");
sb.append(" predisconnesso: ").append(toIndentedString(predisconnesso)).append("\n");
sb.append(" cessazioneVolontaria: ").append(toIndentedString(cessazioneVolontaria)).append("\n");
sb.append(" cessazioneMnp: ").append(toIndentedString(cessazioneMnp)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -0,0 +1,89 @@
/*
* API retrieve
* API relative al servizio di Retrieve esposto ai sistemi
*
* OpenAPI spec version: BOZZA
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package mnp.proxy.ws.sdp.client;
import com.google.gson.annotations.SerializedName;
import java.io.Serializable;
/**
* AttributiUsage
*/
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2024-10-18T09:59:42.779692356Z[GMT]")
public class AttributiUsage implements Serializable {
@SerializedName("value")
private String value = "";
@SerializedName("main_msisdn")
private String mainMsisdn = "";
public AttributiUsage value(String value) {
this.value = value;
return this;
}
/**
* >- può assumere i seguenti valori MAIN, AMSISDN
* @return value
**/
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public AttributiUsage mainMsisdn(String mainMsisdn) {
this.mainMsisdn = mainMsisdn;
return this;
}
/**
* Get mainMsisdn
* @return mainMsisdn
**/
public String getMainMsisdn() {
return mainMsisdn;
}
public void setMainMsisdn(String mainMsisdn) {
this.mainMsisdn = mainMsisdn;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AttributiUsage {\n");
sb.append(" value: ").append(toIndentedString(value)).append("\n");
sb.append(" mainMsisdn: ").append(toIndentedString(mainMsisdn)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -0,0 +1,215 @@
/*
* API retrieve
* API relative al servizio di Retrieve esposto ai sistemi
*
* OpenAPI spec version: BOZZA
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package mnp.proxy.ws.sdp.client;
import com.google.gson.annotations.SerializedName;
import java.io.Serializable;
/**
* Carta
*/
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2024-10-18T09:59:42.779692356Z[GMT]")
public class Carta implements Serializable {
@SerializedName("icc-id20")
private String iccId20 = null;
@SerializedName("icc-id")
private String iccId = null;
@SerializedName("digit4")
private CartarrDigit4 digit4 = null;
@SerializedName("ac-5cifre")
private String ac5cifre = null;
@SerializedName("hlr")
private String hlr = null;
@SerializedName("numeroprimario")
private String numeroprimario = null;
@SerializedName("pin2")
private String pin2 = null;
@SerializedName("puk2")
private String puk2 = null;
public Carta iccId20(String iccId20) {
this.iccId20 = iccId20;
return this;
}
/**
* Get iccId20
* @return iccId20
**/
public String getIccId20() {
return iccId20;
}
public void setIccId20(String iccId20) {
this.iccId20 = iccId20;
}
public Carta iccId(String iccId) {
this.iccId = iccId;
return this;
}
/**
* Get iccId
* @return iccId
**/
public String getIccId() {
return iccId;
}
public void setIccId(String iccId) {
this.iccId = iccId;
}
public Carta digit4(CartarrDigit4 digit4) {
this.digit4 = digit4;
return this;
}
/**
* Get digit4
* @return digit4
**/
public CartarrDigit4 getDigit4() {
return digit4;
}
public void setDigit4(CartarrDigit4 digit4) {
this.digit4 = digit4;
}
public Carta ac5cifre(String ac5cifre) {
this.ac5cifre = ac5cifre;
return this;
}
/**
* Get ac5cifre
* @return ac5cifre
**/
public String getAc5cifre() {
return ac5cifre;
}
public void setAc5cifre(String ac5cifre) {
this.ac5cifre = ac5cifre;
}
public Carta hlr(String hlr) {
this.hlr = hlr;
return this;
}
/**
* Get hlr
* @return hlr
**/
public String getHlr() {
return hlr;
}
public void setHlr(String hlr) {
this.hlr = hlr;
}
public Carta numeroprimario(String numeroprimario) {
this.numeroprimario = numeroprimario;
return this;
}
/**
* Get numeroprimario
* @return numeroprimario
**/
public String getNumeroprimario() {
return numeroprimario;
}
public void setNumeroprimario(String numeroprimario) {
this.numeroprimario = numeroprimario;
}
public Carta pin2(String pin2) {
this.pin2 = pin2;
return this;
}
/**
* Get pin2
* @return pin2
**/
public String getPin2() {
return pin2;
}
public void setPin2(String pin2) {
this.pin2 = pin2;
}
public Carta puk2(String puk2) {
this.puk2 = puk2;
return this;
}
/**
* Get puk2
* @return puk2
**/
public String getPuk2() {
return puk2;
}
public void setPuk2(String puk2) {
this.puk2 = puk2;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Carta {\n");
sb.append(" iccId20: ").append(toIndentedString(iccId20)).append("\n");
sb.append(" iccId: ").append(toIndentedString(iccId)).append("\n");
sb.append(" digit4: ").append(toIndentedString(digit4)).append("\n");
sb.append(" ac5cifre: ").append(toIndentedString(ac5cifre)).append("\n");
sb.append(" hlr: ").append(toIndentedString(hlr)).append("\n");
sb.append(" numeroprimario: ").append(toIndentedString(numeroprimario)).append("\n");
sb.append(" pin2: ").append(toIndentedString(pin2)).append("\n");
sb.append(" puk2: ").append(toIndentedString(puk2)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -0,0 +1,173 @@
/*
* API retrieve
* API relative al servizio di Retrieve esposto ai sistemi
*
* OpenAPI spec version: BOZZA
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package mnp.proxy.ws.sdp.client;
import com.google.gson.annotations.SerializedName;
import java.io.Serializable;
/**
* CartaRr
*/
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2024-10-18T09:59:42.779692356Z[GMT]")
public class CartaRr implements Serializable {
@SerializedName("imsi")
private String imsi = null;
@SerializedName("digit4")
private CartarrDigit4 digit4 = null;
@SerializedName("ac-5cifre")
private String ac5cifre = null;
@SerializedName("hlr")
private String hlr = null;
@SerializedName("pin2")
private String pin2 = null;
@SerializedName("puk2")
private String puk2 = null;
public CartaRr imsi(String imsi) {
this.imsi = imsi;
return this;
}
/**
* Get imsi
* @return imsi
**/
public String getImsi() {
return imsi;
}
public void setImsi(String imsi) {
this.imsi = imsi;
}
public CartaRr digit4(CartarrDigit4 digit4) {
this.digit4 = digit4;
return this;
}
/**
* Get digit4
* @return digit4
**/
public CartarrDigit4 getDigit4() {
return digit4;
}
public void setDigit4(CartarrDigit4 digit4) {
this.digit4 = digit4;
}
public CartaRr ac5cifre(String ac5cifre) {
this.ac5cifre = ac5cifre;
return this;
}
/**
* Get ac5cifre
* @return ac5cifre
**/
public String getAc5cifre() {
return ac5cifre;
}
public void setAc5cifre(String ac5cifre) {
this.ac5cifre = ac5cifre;
}
public CartaRr hlr(String hlr) {
this.hlr = hlr;
return this;
}
/**
* Get hlr
* @return hlr
**/
public String getHlr() {
return hlr;
}
public void setHlr(String hlr) {
this.hlr = hlr;
}
public CartaRr pin2(String pin2) {
this.pin2 = pin2;
return this;
}
/**
* Get pin2
* @return pin2
**/
public String getPin2() {
return pin2;
}
public void setPin2(String pin2) {
this.pin2 = pin2;
}
public CartaRr puk2(String puk2) {
this.puk2 = puk2;
return this;
}
/**
* Get puk2
* @return puk2
**/
public String getPuk2() {
return puk2;
}
public void setPuk2(String puk2) {
this.puk2 = puk2;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CartaRr {\n");
sb.append(" imsi: ").append(toIndentedString(imsi)).append("\n");
sb.append(" digit4: ").append(toIndentedString(digit4)).append("\n");
sb.append(" ac5cifre: ").append(toIndentedString(ac5cifre)).append("\n");
sb.append(" hlr: ").append(toIndentedString(hlr)).append("\n");
sb.append(" pin2: ").append(toIndentedString(pin2)).append("\n");
sb.append(" puk2: ").append(toIndentedString(puk2)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -0,0 +1,132 @@
/*
* API retrieve
* API relative al servizio di Retrieve esposto ai sistemi
*
* OpenAPI spec version: BOZZA
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package mnp.proxy.ws.sdp.client;
import com.google.gson.annotations.SerializedName;
import java.io.Serializable;
/**
* CartarrDigit4
*/
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2024-10-18T09:59:42.779692356Z[GMT]")
public class CartarrDigit4 implements Serializable {
@SerializedName("memoria")
private String memoria = null;
@SerializedName("voltaggio")
private String voltaggio = null;
@SerializedName("applicazione")
private String applicazione = null;
@SerializedName("produttore")
private String produttore = null;
public CartarrDigit4 memoria(String memoria) {
this.memoria = memoria;
return this;
}
/**
* Get memoria
* @return memoria
**/
public String getMemoria() {
return memoria;
}
public void setMemoria(String memoria) {
this.memoria = memoria;
}
public CartarrDigit4 voltaggio(String voltaggio) {
this.voltaggio = voltaggio;
return this;
}
/**
* Get voltaggio
* @return voltaggio
**/
public String getVoltaggio() {
return voltaggio;
}
public void setVoltaggio(String voltaggio) {
this.voltaggio = voltaggio;
}
public CartarrDigit4 applicazione(String applicazione) {
this.applicazione = applicazione;
return this;
}
/**
* Get applicazione
* @return applicazione
**/
public String getApplicazione() {
return applicazione;
}
public void setApplicazione(String applicazione) {
this.applicazione = applicazione;
}
public CartarrDigit4 produttore(String produttore) {
this.produttore = produttore;
return this;
}
/**
* Get produttore
* @return produttore
**/
public String getProduttore() {
return produttore;
}
public void setProduttore(String produttore) {
this.produttore = produttore;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CartarrDigit4 {\n");
sb.append(" memoria: ").append(toIndentedString(memoria)).append("\n");
sb.append(" voltaggio: ").append(toIndentedString(voltaggio)).append("\n");
sb.append(" applicazione: ").append(toIndentedString(applicazione)).append("\n");
sb.append(" produttore: ").append(toIndentedString(produttore)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -0,0 +1,89 @@
/*
* API retrieve
* API relative al servizio di Retrieve esposto ai sistemi
*
* OpenAPI spec version: BOZZA
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package mnp.proxy.ws.sdp.client;
import com.google.gson.annotations.SerializedName;
import java.io.Serializable;
/**
* Info
*/
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2024-10-18T09:59:42.779692356Z[GMT]")
public class Info implements Serializable {
@SerializedName("code")
private String code = null;
@SerializedName("msg")
private String msg = null;
public Info code(String code) {
this.code = code;
return this;
}
/**
* Get code
* @return code
**/
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public Info msg(String msg) {
this.msg = msg;
return this;
}
/**
* Get msg
* @return msg
**/
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Info {\n");
sb.append(" code: ").append(toIndentedString(code)).append("\n");
sb.append(" msg: ").append(toIndentedString(msg)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -0,0 +1,90 @@
/*
* API retrieve
* API relative al servizio di Retrieve esposto ai sistemi
*
* OpenAPI spec version: BOZZA
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package mnp.proxy.ws.sdp.client;
import com.google.gson.annotations.SerializedName;
import java.io.Serializable;
/**
* Request
*/
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2024-10-18T09:59:42.779692356Z[GMT]")
public class Request implements Serializable {
@SerializedName("input")
private RequestInput input = null;
@SerializedName("output")
private RequestOutput output = null;
public Request input(RequestInput input) {
this.input = input;
return this;
}
/**
* Get input
* @return input
**/
public RequestInput getInput() {
return input;
}
public void setInput(RequestInput input) {
this.input = input;
}
public Request output(RequestOutput output) {
this.output = output;
return this;
}
/**
* Get output
* @return output
**/
public RequestOutput getOutput() {
return output;
}
public void setOutput(RequestOutput output) {
this.output = output;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Request {\n");
sb.append(" input: ").append(toIndentedString(input)).append("\n");
sb.append(" output: ").append(toIndentedString(output)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -0,0 +1,109 @@
/*
* API retrieve
* API relative al servizio di Retrieve esposto ai sistemi
*
* OpenAPI spec version: BOZZA
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package mnp.proxy.ws.sdp.client;
import com.google.gson.annotations.SerializedName;
import java.io.Serializable;
/**
* contiene la risorsa su cui si richiedono i dati
*/
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2024-10-18T09:59:42.779692356Z[GMT]")
public class RequestInput implements Serializable {
@SerializedName("msisdn")
private String msisdn = null;
@SerializedName("imsi")
private String imsi = null;
@SerializedName("icc-id")
private String iccId = null;
public RequestInput msisdn(String msisdn) {
this.msisdn = msisdn;
return this;
}
/**
* Get msisdn
* @return msisdn
**/
public String getMsisdn() {
return msisdn;
}
public void setMsisdn(String msisdn) {
this.msisdn = msisdn;
}
public RequestInput imsi(String imsi) {
this.imsi = imsi;
return this;
}
/**
* Get imsi
* @return imsi
**/
public String getImsi() {
return imsi;
}
public void setImsi(String imsi) {
this.imsi = imsi;
}
public RequestInput iccId(String iccId) {
this.iccId = iccId;
return this;
}
/**
* Get iccId
* @return iccId
**/
public String getIccId() {
return iccId;
}
public void setIccId(String iccId) {
this.iccId = iccId;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class RequestInput {\n");
sb.append(" msisdn: ").append(toIndentedString(msisdn)).append("\n");
sb.append(" imsi: ").append(toIndentedString(imsi)).append("\n");
sb.append(" iccId: ").append(toIndentedString(iccId)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -0,0 +1,153 @@
/*
* API retrieve
* API relative al servizio di Retrieve esposto ai sistemi
*
* OpenAPI spec version: BOZZA
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package mnp.proxy.ws.sdp.client;
import com.google.gson.annotations.SerializedName;
import java.io.Serializable;
/**
* RequestOutput
*/
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2024-10-18T09:59:42.779692356Z[GMT]")
public class RequestOutput implements Serializable {
@SerializedName("attributi")
private Attributi attributi = null;
@SerializedName("servizi")
private Servizi servizi = null;
@SerializedName("carta")
private Carta carta = null;
@SerializedName("carta-rr")
private CartaRr cartaRr = null;
@SerializedName("risorse_rete")
private RisorseRete risorseRete = null;
public RequestOutput attributi(Attributi attributi) {
this.attributi = attributi;
return this;
}
/**
* Get attributi
* @return attributi
**/
public Attributi getAttributi() {
return attributi;
}
public void setAttributi(Attributi attributi) {
this.attributi = attributi;
}
public RequestOutput servizi(Servizi servizi) {
this.servizi = servizi;
return this;
}
/**
* Get servizi
* @return servizi
**/
public Servizi getServizi() {
return servizi;
}
public void setServizi(Servizi servizi) {
this.servizi = servizi;
}
public RequestOutput carta(Carta carta) {
this.carta = carta;
return this;
}
/**
* Get carta
* @return carta
**/
public Carta getCarta() {
return carta;
}
public void setCarta(Carta carta) {
this.carta = carta;
}
public RequestOutput cartaRr(CartaRr cartaRr) {
this.cartaRr = cartaRr;
return this;
}
/**
* Get cartaRr
* @return cartaRr
**/
public CartaRr getCartaRr() {
return cartaRr;
}
public void setCartaRr(CartaRr cartaRr) {
this.cartaRr = cartaRr;
}
public RequestOutput risorseRete(RisorseRete risorseRete) {
this.risorseRete = risorseRete;
return this;
}
/**
* Get risorseRete
* @return risorseRete
**/
public RisorseRete getRisorseRete() {
return risorseRete;
}
public void setRisorseRete(RisorseRete risorseRete) {
this.risorseRete = risorseRete;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class RequestOutput {\n");
sb.append(" attributi: ").append(toIndentedString(attributi)).append("\n");
sb.append(" servizi: ").append(toIndentedString(servizi)).append("\n");
sb.append(" carta: ").append(toIndentedString(carta)).append("\n");
sb.append(" cartaRr: ").append(toIndentedString(cartaRr)).append("\n");
sb.append(" risorseRete: ").append(toIndentedString(risorseRete)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -0,0 +1,236 @@
/*
* API retrieve
* API relative al servizio di Retrieve esposto ai sistemi
*
* OpenAPI spec version: BOZZA
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package mnp.proxy.ws.sdp.client;
import com.google.gson.annotations.SerializedName;
import java.io.Serializable;
/**
* Response
*/
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2024-10-18T09:59:42.779692356Z[GMT]")
public class Response implements Serializable {
@SerializedName("msisdn")
private String msisdn = null;
@SerializedName("imsi")
private String imsi = null;
@SerializedName("icc-id")
private String iccId = null;
@SerializedName("info")
private Info info = null;
@SerializedName("attributi")
private Attributi attributi = null;
@SerializedName("servizi")
private Servizi servizi = null;
@SerializedName("carta")
private Carta carta = null;
@SerializedName("carta-rr")
private CartaRr cartaRr = null;
@SerializedName("risorse_rete")
private RisorseRete risorseRete = null;
public Response msisdn(String msisdn) {
this.msisdn = msisdn;
return this;
}
/**
* Get msisdn
* @return msisdn
**/
public String getMsisdn() {
return msisdn;
}
public void setMsisdn(String msisdn) {
this.msisdn = msisdn;
}
public Response imsi(String imsi) {
this.imsi = imsi;
return this;
}
/**
* Get imsi
* @return imsi
**/
public String getImsi() {
return imsi;
}
public void setImsi(String imsi) {
this.imsi = imsi;
}
public Response iccId(String iccId) {
this.iccId = iccId;
return this;
}
/**
* Get iccId
* @return iccId
**/
public String getIccId() {
return iccId;
}
public void setIccId(String iccId) {
this.iccId = iccId;
}
public Response info(Info info) {
this.info = info;
return this;
}
/**
* Get info
* @return info
**/
public Info getInfo() {
return info;
}
public void setInfo(Info info) {
this.info = info;
}
public Response attributi(Attributi attributi) {
this.attributi = attributi;
return this;
}
/**
* Get attributi
* @return attributi
**/
public Attributi getAttributi() {
return attributi;
}
public void setAttributi(Attributi attributi) {
this.attributi = attributi;
}
public Response servizi(Servizi servizi) {
this.servizi = servizi;
return this;
}
/**
* Get servizi
* @return servizi
**/
public Servizi getServizi() {
return servizi;
}
public void setServizi(Servizi servizi) {
this.servizi = servizi;
}
public Response carta(Carta carta) {
this.carta = carta;
return this;
}
/**
* Get carta
* @return carta
**/
public Carta getCarta() {
return carta;
}
public void setCarta(Carta carta) {
this.carta = carta;
}
public Response cartaRr(CartaRr cartaRr) {
this.cartaRr = cartaRr;
return this;
}
/**
* Get cartaRr
* @return cartaRr
**/
public CartaRr getCartaRr() {
return cartaRr;
}
public void setCartaRr(CartaRr cartaRr) {
this.cartaRr = cartaRr;
}
public Response risorseRete(RisorseRete risorseRete) {
this.risorseRete = risorseRete;
return this;
}
/**
* Get risorseRete
* @return risorseRete
**/
public RisorseRete getRisorseRete() {
return risorseRete;
}
public void setRisorseRete(RisorseRete risorseRete) {
this.risorseRete = risorseRete;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Response {\n");
sb.append(" msisdn: ").append(toIndentedString(msisdn)).append("\n");
sb.append(" imsi: ").append(toIndentedString(imsi)).append("\n");
sb.append(" iccId: ").append(toIndentedString(iccId)).append("\n");
sb.append(" info: ").append(toIndentedString(info)).append("\n");
sb.append(" attributi: ").append(toIndentedString(attributi)).append("\n");
sb.append(" servizi: ").append(toIndentedString(servizi)).append("\n");
sb.append(" carta: ").append(toIndentedString(carta)).append("\n");
sb.append(" cartaRr: ").append(toIndentedString(cartaRr)).append("\n");
sb.append(" risorseRete: ").append(toIndentedString(risorseRete)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -0,0 +1,110 @@
/*
* API retrieve
* API relative al servizio di Retrieve esposto ai sistemi
*
* OpenAPI spec version: BOZZA
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package mnp.proxy.ws.sdp.client;
import com.google.gson.annotations.SerializedName;
import java.io.Serializable;
/**
* RisorseRete
*/
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2024-10-18T09:59:42.779692356Z[GMT]")
public class RisorseRete implements Serializable {
@SerializedName("stato")
private String stato = null;
@SerializedName("tipologia")
private String tipologia = null;
@SerializedName("Data_ultima_operazione")
private String dataUltimaOperazione = null;
public RisorseRete stato(String stato) {
this.stato = stato;
return this;
}
/**
* Get stato
* @return stato
**/
public String getStato() {
return stato;
}
public void setStato(String stato) {
this.stato = stato;
}
public RisorseRete tipologia(String tipologia) {
this.tipologia = tipologia;
return this;
}
/**
* Get tipologia
* @return tipologia
**/
public String getTipologia() {
return tipologia;
}
public void setTipologia(String tipologia) {
this.tipologia = tipologia;
}
public RisorseRete dataUltimaOperazione(String dataUltimaOperazione) {
this.dataUltimaOperazione = dataUltimaOperazione;
return this;
}
/**
* Get dataUltimaOperazione
* @return dataUltimaOperazione
**/
public String getDataUltimaOperazione() {
return dataUltimaOperazione;
}
public void setDataUltimaOperazione(String dataUltimaOperazione) {
this.dataUltimaOperazione = dataUltimaOperazione;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class RisorseRete {\n");
sb.append(" stato: ").append(toIndentedString(stato)).append("\n");
sb.append(" tipologia: ").append(toIndentedString(tipologia)).append("\n");
sb.append(" dataUltimaOperazione: ").append(toIndentedString(dataUltimaOperazione)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -0,0 +1,79 @@
/*
* API retrieve
* API relative al servizio di Retrieve esposto ai sistemi
*
* OpenAPI spec version: BOZZA
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package mnp.proxy.ws.sdp.client;
import com.google.gson.annotations.SerializedName;
import mnp.xml.dao.gisp.response.Servizio;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
/**
* Servizi
*/
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2024-10-18T09:59:42.779692356Z[GMT]")
public class Servizi implements Serializable {
@SerializedName("servizio")
private List<ServiziServizio> servizio = null;
public Servizi servizio(List<ServiziServizio> servizio) {
this.servizio = servizio;
return this;
}
public Servizi addServizioItem(ServiziServizio servizioItem) {
if (this.servizio == null) {
this.servizio = new ArrayList<ServiziServizio>();
}
this.servizio.add(servizioItem);
return this;
}
/**
* Get servizio
* @return servizio
**/
public mnp.proxy.ws.sdp.client.ServiziServizio[] getServizio() {
mnp.proxy.ws.sdp.client.ServiziServizio[] array = new mnp.proxy.ws.sdp.client.ServiziServizio[0];
return ( mnp.proxy.ws.sdp.client.ServiziServizio[])((mnp.proxy.ws.sdp.client.ServiziServizio[])this.servizio.toArray(array));
}
public void setServizio(List<ServiziServizio> servizio) {
this.servizio = servizio;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Servizi {\n");
sb.append(" servizio: ").append(toIndentedString(servizio)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -0,0 +1,110 @@
/*
* API retrieve
* API relative al servizio di Retrieve esposto ai sistemi
*
* OpenAPI spec version: BOZZA
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package mnp.proxy.ws.sdp.client;
import com.google.gson.annotations.SerializedName;
import java.io.Serializable;
/**
* ServiziAttributiServizio
*/
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2024-10-18T09:59:42.779692356Z[GMT]")
public class ServiziAttributiServizio implements Serializable {
@SerializedName("sottoservizio")
private String sottoservizio = null;
@SerializedName("additional")
private String additional = null;
@SerializedName("imsi_twin")
private String imsiTwin = null;
public ServiziAttributiServizio sottoservizio(String sottoservizio) {
this.sottoservizio = sottoservizio;
return this;
}
/**
* Get sottoservizio
* @return sottoservizio
**/
public String getSottoservizio() {
return sottoservizio;
}
public void setSottoservizio(String sottoservizio) {
this.sottoservizio = sottoservizio;
}
public ServiziAttributiServizio additional(String additional) {
this.additional = additional;
return this;
}
/**
* Get additional
* @return additional
**/
public String getAdditional() {
return additional;
}
public void setAdditional(String additional) {
this.additional = additional;
}
public ServiziAttributiServizio imsiTwin(String imsiTwin) {
this.imsiTwin = imsiTwin;
return this;
}
/**
* Get imsiTwin
* @return imsiTwin
**/
public String getImsiTwin() {
return imsiTwin;
}
public void setImsiTwin(String imsiTwin) {
this.imsiTwin = imsiTwin;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ServiziAttributiServizio {\n");
sb.append(" sottoservizio: ").append(toIndentedString(sottoservizio)).append("\n");
sb.append(" additional: ").append(toIndentedString(additional)).append("\n");
sb.append(" imsiTwin: ").append(toIndentedString(imsiTwin)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -0,0 +1,89 @@
/*
* API retrieve
* API relative al servizio di Retrieve esposto ai sistemi
*
* OpenAPI spec version: BOZZA
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package mnp.proxy.ws.sdp.client;
import com.google.gson.annotations.SerializedName;
import java.io.Serializable;
/**
* ServiziServizio
*/
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2024-10-18T09:59:42.779692356Z[GMT]")
public class ServiziServizio implements Serializable {
@SerializedName("name")
private String name = null;
@SerializedName("attributi_servizio")
private ServiziAttributiServizio attributiServizio = null;
public ServiziServizio name(String name) {
this.name = name;
return this;
}
/**
* Get name
* @return name
**/
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public ServiziServizio attributiServizio(ServiziAttributiServizio attributiServizio) {
this.attributiServizio = attributiServizio;
return this;
}
/**
* Get attributiServizio
* @return attributiServizio
**/
public ServiziAttributiServizio getAttributiServizio() {
return attributiServizio;
}
public void setAttributiServizio(ServiziAttributiServizio attributiServizio) {
this.attributiServizio = attributiServizio;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ServiziServizio {\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" attributiServizio: ").append(toIndentedString(attributiServizio)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -92,20 +92,42 @@ public class GispRetrieveDonorFormatController {
return RetrieveGispXAO.getRetrieveGispFromXmlResponse(tracciato); return RetrieveGispXAO.getRetrieveGispFromXmlResponse(tracciato);
} }
/**
* A partire dal tracciato di response ritorna il dto RetrieveGisp relativo
* alla comunicazione con SDP/ESO
* @param tracciato String
* @throws Exception
* @return RetrieveGisp
*/
public MnpGispRetrieveOut formatEsoDTO(String tracciato) throws Exception {
return RetrieveGispXAO.getRetrieveESOFromXmlResponse(tracciato);
}
/** /**
* A partire dall'oggetto passato in input ritorna la stringa rappresentante il file xml da * A partire dall'oggetto passato in input ritorna la stringa rappresentante il file json da
* inviare a Gisp * inviare a SDP/ESO (ex Gisp)
* @param retrieveGisp * @param retrieveGisp
* Oggetto che mappa la tabella di uscita per Gisp * Oggetto che mappa la tabella di uscita per SDP-ESO
* @return String * @return String
* Stringa che rappresenta il file xml da inviare * Stringa che rappresenta il file json da inviare
* @throws Exception * @throws Exception
*/ */
public String getTracciato(MnpGispRetrieveOut retrieveGisp) throws Exception { public String getTracciatoForReqESORest(MnpGispRetrieveOut retrieveGisp) throws Exception {
return RetrieveGispXAO.getXmlFromRetrieveGisp(retrieveGisp); return RetrieveGispXAO.getJsonFromRetrieveESO(retrieveGisp);
} }
/**
* A partire dall'oggetto passato in input ritorna la stringa rappresentante il file xml da
* inviare a Gisp
* @param retrieveGisp
* Oggetto che mappa la tabella di uscita per Gisp
* @return String
* Stringa che rappresenta il file xml da inviare
* @throws Exception
*/
public String getTracciato(MnpGispRetrieveOut retrieveGisp) throws Exception {
return RetrieveGispXAO.getXmlFromRetrieveGisp(retrieveGisp);
}
/** /**
* A partire dal dto relativo ad una richiesta Donor Virtuale ritorna il dto RetrieveGisp relativo * A partire dal dto relativo ad una richiesta Donor Virtuale ritorna il dto RetrieveGisp relativo

View File

@@ -20,6 +20,7 @@ import mnp.objects.*;
import mnp.objects.map.GispMap; import mnp.objects.map.GispMap;
import mnp.proxy.ToWTC.InfobusHandler; import mnp.proxy.ToWTC.InfobusHandler;
import mnp.proxy.ToWTC.InfobusHandlerException; import mnp.proxy.ToWTC.InfobusHandlerException;
import mnp.proxy.ws.WSRestHandler;
import mnp.proxy.ws.dbss.client.CustomerQueryClient; import mnp.proxy.ws.dbss.client.CustomerQueryClient;
import mnp.proxy.ws.dbss.service.CustomerQueryService; import mnp.proxy.ws.dbss.service.CustomerQueryService;
import mnp.systemcontroller.eventhandler.AbstractEventHandler; import mnp.systemcontroller.eventhandler.AbstractEventHandler;
@@ -104,36 +105,64 @@ public class GispRetrieveEventHandler extends AbstractEventHandler{
//carico la richiesta di business a partire dall'id richiesta //carico la richiesta di business a partire dall'id richiesta
RequestIF request = BoFactory.getBusinessRequest(retrieveGisp.getIdRichiesta()); RequestIF request = BoFactory.getBusinessRequest(retrieveGisp.getIdRichiesta());
if (checkRequestForRetrieve(request)) { if (checkRequestForRetrieve(request)) {
xml = formatter.getTracciato(retrieveGisp); //new REST Middleware Modernization: Servizi GISP Lotto 7 - item 311728 - R58-24-1170
handler = new InfobusHandler(); if("1".equals(Resources.getESO_RETRIEVE_REST_POST_ENABLED())){
try { //la variabile si chiama xml, ma in questo caso è json
xmlResponse = handler.notificaRetrieveGISP(xml, retrieveGisp.getIdRichiesta()); xml = formatter.getTracciatoForReqESORest(retrieveGisp);
// N - MESSAGGIO INVIATO VIA INFOBUS log.write("9999", "REQUEST json da inviare SDP/ESO :[" + xml + "]");
log.write("0012", "GISP XML :[" + xml + "]"); try{
WSRestHandler wsRestHandler = new WSRestHandler(log);
xmlResponse = wsRestHandler.retrieveESORestPost(xml);
}catch (Exception ex){
log.write("9999", "ERRORE invio rest SDP/ESO JSON :[" + xml + "]");
throw ex;
}
log.write("9999", "RESPONSE rest SDP/ESO JSON :[" + xmlResponse + "]");
// unmarshall della risposta ESO
try {
retrieveGispResponse = formatter.formatEsoDTO(xmlResponse);
retrieveGispResponse.setMsisdnType(retrieveGisp.getMsisdnType());
}catch (Exception ex){
log.write("9999", "ERRORE UNMARSHAL risposta SDP/ESO JSON :[" + xmlResponse + "]");
throw ex;
}
log.write("9999", "RESPONSE MnpGispRetrieveOut rest SDP/ESO :[" + Func.getFieldDescription(retrieveGispResponse) + "]");
} }
catch (IBSendException ibse) { else {
// C - RAGGIUNTO NUMERO MASSIMO DI INVII //old InfoBus
log.write("0014", "GISP XML :[" + xml + "]"); xml = formatter.getTracciato(retrieveGisp);
throw ibse; handler = new InfobusHandler();
}
catch (InfobusHandlerException e) { try {
// C - ERRORE DI INVIO VIA INFOBUS xmlResponse = handler.notificaRetrieveGISP(xml, retrieveGisp.getIdRichiesta());
log.write("0010", "GISP XML :[" + xml + "]"); // N - MESSAGGIO INVIATO VIA INFOBUS
throw e; log.write("0012", "GISP XML :[" + xml + "]");
} }
catch (Exception e) { catch (IBSendException ibse) {
log.write("9999", "ERRORE GISP XML :[" + xml + "]"); // C - RAGGIUNTO NUMERO MASSIMO DI INVII
throw e; log.write("0014", "GISP XML :[" + xml + "]");
} throw ibse;
log.write("9999", "RICEVUTO RISPOSTA TRACCIATO XML :[" + xmlResponse + "]"); }
try { catch (InfobusHandlerException e) {
retrieveGispResponse = formatter.formatDTO(xmlResponse); // C - ERRORE DI INVIO VIA INFOBUS
retrieveGispResponse.setMsisdnType(retrieveGisp.getMsisdnType()); log.write("0010", "GISP XML :[" + xml + "]");
} throw e;
catch (NotValidXMLException ex) { }
log.write("9999", "RISPOSTA XML NON VALIDA:" + ex.toString()); catch (Exception e) {
throw ex; log.write("9999", "ERRORE GISP XML :[" + xml + "]");
throw e;
}
log.write("9999", "RICEVUTO RISPOSTA TRACCIATO XML :[" + xmlResponse + "]");
try {
retrieveGispResponse = formatter.formatDTO(xmlResponse);
retrieveGispResponse.setMsisdnType(retrieveGisp.getMsisdnType());
}
catch (NotValidXMLException ex) {
log.write("9999", "RISPOSTA XML NON VALIDA:" + ex.toString());
throw ex;
}
} }
//setto nella response l'utenza mediante la quale ho fatto la retrieve. //setto nella response l'utenza mediante la quale ho fatto la retrieve.
retrieveGispResponse.setMsisdn(retrieveGisp.getMsisdn()); retrieveGispResponse.setMsisdn(retrieveGisp.getMsisdn());
//scarto per codice //scarto per codice

View File

@@ -2505,4 +2505,14 @@ public class Resources {
} }
*/ */
public static String getESO_RETRIEVE_REST_POST_ENABLED() {
init();
return trim(props.getProperty("ESO_RETRIEVE_REST_POST_ENABLED"));
}
public static String getESO_RETRIEVE_REST_POST_URL() {
init();
return trim(props.getProperty("ESO_RETRIEVE_REST_POST_URL"));
}
} }

View File

@@ -1,5 +1,7 @@
package mnp.xml.dao; package mnp.xml.dao;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import mnp.database.hb.dto.MnpGispRetrieveOut; import mnp.database.hb.dto.MnpGispRetrieveOut;
import mnp.database.hb.dto.homezone.HzGispRetrieveOut; import mnp.database.hb.dto.homezone.HzGispRetrieveOut;
import mnp.exception.xml.NotValidXMLException; import mnp.exception.xml.NotValidXMLException;
@@ -142,8 +144,82 @@ public class RetrieveGispXAO {
xml = XmlUtility.getXmlStringFromCastorXmlObject(retrive,true); xml = XmlUtility.getXmlStringFromCastorXmlObject(retrive,true);
return xml; return xml;
} }
/**
/**
* Costriusce Json di notifica a SDP/ESO per la retrive request su base utenza mobile
* @param retrieveGisp RetrieveGisp
* @return String
*/
public static String getJsonFromRetrieveESO(MnpGispRetrieveOut retrieveGisp) throws Exception{
mnp.proxy.ws.sdp.client.Request request = new mnp.proxy.ws.sdp.client.Request();
mnp.proxy.ws.sdp.client.RequestInput input = new mnp.proxy.ws.sdp.client.RequestInput();
mnp.proxy.ws.sdp.client.RequestOutput output = new mnp.proxy.ws.sdp.client.RequestOutput();
mnp.proxy.ws.sdp.client.Attributi attributi = new mnp.proxy.ws.sdp.client.Attributi();
mnp.proxy.ws.sdp.client.Servizi servizi = new mnp.proxy.ws.sdp.client.Servizi();
mnp.proxy.ws.sdp.client.Carta carta = new mnp.proxy.ws.sdp.client.Carta();
mnp.proxy.ws.sdp.client.RisorseRete risorseRete = new mnp.proxy.ws.sdp.client.RisorseRete();
/******* Input -> msisdn *******/
input.setMsisdn(retrieveGisp.getMsisdn());
/******* Attributi *******/
//Attributi -> stato
attributi.setStato("");
//AttributiDettaglioStato -> cessazione_mnp
mnp.proxy.ws.sdp.client.AttributiDettaglioStato dettaglioStato= new mnp.proxy.ws.sdp.client.AttributiDettaglioStato();
dettaglioStato.setCessazioneMnp("");
//Attributi -> prepagato
attributi.setPrepagato("");
//Attributi -> usage
attributi.setUsage(new mnp.proxy.ws.sdp.client.AttributiUsage());
//Attributi -> esp
attributi.setEsp("");
//Attributi -> profilo
attributi.setProfilo("");
//Attributi -> descrizioneProfilo
attributi.setDescrizioneProfilo("");
//Attributi -> tipologia
attributi.setTipologia("");
//Attributi -> blocco -> fs
mnp.proxy.ws.sdp.client.AttributiBlocco blocco = new mnp.proxy.ws.sdp.client.AttributiBlocco();
blocco.setFs("");
blocco.setFraud("");
blocco.setAnagr("");
//Attributi -> dati_commerciali -> cliente
mnp.proxy.ws.sdp.client.AttributiDatiCommerciali datiCommerciali = new mnp.proxy.ws.sdp.client.AttributiDatiCommerciali();
datiCommerciali.setCliente("");
datiCommerciali.setMarcaggioCliente("");
/******* Servizi *******/
mnp.proxy.ws.sdp.client.ServiziServizio servizioBear = new mnp.proxy.ws.sdp.client.ServiziServizio();
servizioBear.name(GispMap.SERVIZIO_BEAR);
/******* Carta *******/
carta.setIccId20("");
/******* Risorse Rete *******/
risorseRete.setStato("");
risorseRete.setTipologia("");
risorseRete.setDataUltimaOperazione("");
/******* assegnazioni *******/
attributi.setDettaglioStato(dettaglioStato);
attributi.blocco(blocco);
attributi.datiCommerciali(datiCommerciali);
output.setAttributi(attributi);
servizi.addServizioItem(servizioBear);
output.setServizi(servizi);
output.setCarta(carta);
output.setRisorseRete(risorseRete);
request.setInput(input);
request.setOutput(output);
return new Gson().toJson(request);
}
/**
* Costriusce XML di notifica a GISP per la retrive su base utenza fissa * Costriusce XML di notifica a GISP per la retrive su base utenza fissa
* @param hzGispRetrieveOut * @param hzGispRetrieveOut
* @return String * @return String
@@ -187,7 +263,7 @@ public class RetrieveGispXAO {
return XmlUtility.getXmlStringFromCastorXmlObject(retrieve,true); return XmlUtility.getXmlStringFromCastorXmlObject(retrieve,true);
} }
/** /**
* Costriusce XML di notifica a GISP * Costriusce XML di notifica a GISP
* @param retrieveGisp MnpGispRetrieveOut * @param retrieveGisp MnpGispRetrieveOut
@@ -205,8 +281,8 @@ public class RetrieveGispXAO {
if ( (response.getData() != null) && if ( (response.getData() != null) &&
(response.getData().getMsisdn() != null) && (response.getData().getMsisdn() != null) &&
(response.getData().getMsisdn().getMsisdnTypeSequence() != null)) { (response.getData().getMsisdn().getMsisdnTypeSequence() != null)) {
//TAG ATTRIBUTI //TAG ATTRIBUTI
if (response.getData().getMsisdn().getMsisdnTypeSequence().getAttributi() != null) { if (response.getData().getMsisdn().getMsisdnTypeSequence().getAttributi() != null) {
mnp.xml.dao.gisp.response.Attributi attributi = response.getData().getMsisdn().getMsisdnTypeSequence().getAttributi(); mnp.xml.dao.gisp.response.Attributi attributi = response.getData().getMsisdn().getMsisdnTypeSequence().getAttributi();
retrieveGisp.setStato(attributi.getStato()); retrieveGisp.setStato(attributi.getStato());
@@ -233,9 +309,9 @@ public class RetrieveGispXAO {
retrieveGisp.setRespPrepagato(attributi.getPrepagato()); retrieveGisp.setRespPrepagato(attributi.getPrepagato());
retrieveGisp.setRespFs(attributi.getBlocco().getFs()); retrieveGisp.setRespFs(attributi.getBlocco().getFs());
retrieveGisp.setRespFraud(attributi.getBlocco().getFraud()); retrieveGisp.setRespFraud(attributi.getBlocco().getFraud());
}//chiude if attributi }//chiude if attributi
//TAG HOME ZONE //TAG HOME ZONE
if (response.getData().getMsisdn().getMsisdnTypeSequence().getHomeZone() != null) { if (response.getData().getMsisdn().getMsisdnTypeSequence().getHomeZone() != null) {
//D.S. Kit Dicembre 07 //D.S. Kit Dicembre 07
@@ -244,14 +320,14 @@ public class RetrieveGispXAO {
retrieveGisp.setStatoSlaveHZ(homeZone.getStatoSlave()); retrieveGisp.setStatoSlaveHZ(homeZone.getStatoSlave());
//D.S. Fine //D.S. Fine
} //chiude tag home zone } //chiude tag home zone
//TAG CARTA //TAG CARTA
if (response.getData().getMsisdn().getMsisdnTypeSequence().getCarta() != null) { if (response.getData().getMsisdn().getMsisdnTypeSequence().getCarta() != null) {
mnp.xml.dao.gisp.response.Carta carta = response.getData().getMsisdn().getMsisdnTypeSequence().getCarta(); mnp.xml.dao.gisp.response.Carta carta = response.getData().getMsisdn().getMsisdnTypeSequence().getCarta();
retrieveGisp.setIccid(carta.getIccId20()); retrieveGisp.setIccid(carta.getIccId20());
} //chiude il tag carta } //chiude il tag carta
//TAG SERVIZI //TAG SERVIZI
if (response.getData().getMsisdn().getMsisdnTypeSequence().getServizi() != null) { if (response.getData().getMsisdn().getMsisdnTypeSequence().getServizi() != null) {
mnp.xml.dao.gisp.response.Servizi servizi = response.getData().getMsisdn().getMsisdnTypeSequence().getServizi(); mnp.xml.dao.gisp.response.Servizi servizi = response.getData().getMsisdn().getMsisdnTypeSequence().getServizi();
mnp.xml.dao.gisp.response.Servizio[] elencoServizi = servizi.getServizio(); mnp.xml.dao.gisp.response.Servizio[] elencoServizi = servizi.getServizio();
@@ -262,22 +338,22 @@ public class RetrieveGispXAO {
mnp.xml.dao.gisp.response.Attributi_servizi[] attributiServizi = elencoServizi[0].getAttributi_servizi(); mnp.xml.dao.gisp.response.Attributi_servizi[] attributiServizi = elencoServizi[0].getAttributi_servizi();
//ciclo sull'elenco degli attributi-servizi //ciclo sull'elenco degli attributi-servizi
for (int i=0; i<attributiServizi.length; i++) { for (int i=0; i<attributiServizi.length; i++) {
//prendo per ogni attributo-servizio l'elenco degli attributi //prendo per ogni attributo-servizio l'elenco degli attributi
mnp.xml.dao.gisp.response.Attributo[] elencoAttributi = attributiServizi[i].getAttributo(); mnp.xml.dao.gisp.response.Attributo[] elencoAttributi = attributiServizi[i].getAttributo();
//ciclo sull'elenco degli attributi //ciclo sull'elenco degli attributi
for (int j=0; j<elencoAttributi.length; j++) { for (int j=0; j<elencoAttributi.length; j++) {
if (elencoAttributi[j].getName().equals(ATTRIBUTO_SERVIZI_ADDITONAL)) { if (elencoAttributi[j].getName().equals(ATTRIBUTO_SERVIZI_ADDITONAL)) {
retrieveGisp.setRespAdditional(elencoAttributi[j].getContent()); retrieveGisp.setRespAdditional(elencoAttributi[j].getContent());
}//kit lulgio 09 salviamo il nome del sotto servizio che per il servizio BEAR ha valori multipli }//kit lulgio 09 salviamo il nome del sotto servizio che per il servizio BEAR ha valori multipli
else if (elencoAttributi[j].getName().equals(ATTRIBUTO_SERVIZI_SOTTOSERVIZIO)) { else if (elencoAttributi[j].getName().equals(ATTRIBUTO_SERVIZI_SOTTOSERVIZIO)) {
retrieveGisp.setRespSottoservizio(elencoAttributi[j].getContent()); retrieveGisp.setRespSottoservizio(elencoAttributi[j].getContent());
} }
} }
} }
retrieveGisp.setRespAdditional(elencoServizi[0].getAttributi_servizi()[0].getAttributo(1).getContent()); retrieveGisp.setRespAdditional(elencoServizi[0].getAttributi_servizi()[0].getAttributo(1).getContent());
} }
} //chiudi if servizi } //chiudi if servizi
//TAG RISORSE RETE - kit luglio 09 //TAG RISORSE RETE - kit luglio 09
if (response.getData().getMsisdn().getMsisdnTypeSequence().getRisorse_rete() != null) { if (response.getData().getMsisdn().getMsisdnTypeSequence().getRisorse_rete() != null) {
mnp.xml.dao.gisp.response.Risorse_rete risorseRete = response.getData().getMsisdn().getMsisdnTypeSequence().getRisorse_rete(); mnp.xml.dao.gisp.response.Risorse_rete risorseRete = response.getData().getMsisdn().getMsisdnTypeSequence().getRisorse_rete();
@@ -286,16 +362,16 @@ public class RetrieveGispXAO {
retrieveGisp.setRespReteDataUltimaOper(risorseRete.getData_ultima_operazione()); retrieveGisp.setRespReteDataUltimaOper(risorseRete.getData_ultima_operazione());
} }
//chiudi if risorse rete //chiudi if risorse rete
}//chiude if msisdn }//chiude if msisdn
}//chiude if isValid }//chiude if isValid
else { else {
throw new NotValidXMLException("XML response is not valid"); throw new NotValidXMLException("XML response is not valid");
} }
} }
catch (ValidationException ex) { catch (ValidationException ex) {
ex.printStackTrace(); ex.printStackTrace();
throw new NotValidXMLException(ex.toString()); throw new NotValidXMLException(ex.toString());
@@ -310,8 +386,93 @@ public class RetrieveGispXAO {
} }
return retrieveGisp; return retrieveGisp;
} }
/** /**
* Costriusce l'oggetto MnpGispRetrieveOut dalla response di SDP/ESO
* @param xmlResponse String
* @return String
*/
public static MnpGispRetrieveOut getRetrieveESOFromXmlResponse(String xmlResponse) throws Exception{
MnpGispRetrieveOut retrieveGisp= new MnpGispRetrieveOut();
try {
// databinding con validazione
// UnMarshal
Gson gson = new GsonBuilder().create();
mnp.proxy.ws.sdp.client.Response response = gson.fromJson(xmlResponse, mnp.proxy.ws.sdp.client.Response.class);
retrieveGisp.setRespCode(response.getInfo().getCode());
retrieveGisp.setRespMSG(response.getInfo().getMsg());
//TAG ATTRIBUTI
if (response.getAttributi() != null) {
mnp.proxy.ws.sdp.client.Attributi attributi = response.getAttributi();
retrieveGisp.setStato(attributi.getStato());
//cessazione_mnp
retrieveGisp.setRespCessazioneMnp(attributi.getDettaglioStato().getCessazioneMnp());
//operatore_virtuale
retrieveGisp.setRespOperatoreInterno(attributi.getEsp());
// Descrizione profilo
retrieveGisp.setDescProfilo(attributi.getDescrizioneProfilo());
//profilo
retrieveGisp.setProfilo(attributi.getProfilo());
//blocco
retrieveGisp.setAnagr(attributi.getBlocco().getAnagr());
retrieveGisp.setRespFs(attributi.getBlocco().getFs());
retrieveGisp.setRespFraud(attributi.getBlocco().getFraud());
retrieveGisp.setRespTipologia(attributi.getTipologia());
retrieveGisp.setRespValueUsage(attributi.getUsage().getValue());
if (!retrieveGisp.getRespValueUsage().equals(GispMap.MAIN_USAGE)
|| !retrieveGisp.getRespValueUsage().equals(GispMap.TCB_PADRE_USAGE)){
retrieveGisp.setRespMainMsisdn(attributi.getUsage().getMainMsisdn());
}
//dati commerciali
retrieveGisp.setRespCfPiva(attributi.getDatiCommerciali().getCliente());
retrieveGisp.setRespMarcaggio(attributi.getDatiCommerciali().getMarcaggioCliente());
retrieveGisp.setRespPrepagato(attributi.getPrepagato());
}//chiude if attributi
//TAG CARTA
if (response.getCarta() != null) {
mnp.proxy.ws.sdp.client.Carta carta = response.getCarta();
retrieveGisp.setIccid(carta.getIccId20());
} //chiude il tag carta
//TAG SERVIZI
if (response.getServizi() != null) {
mnp.proxy.ws.sdp.client.Servizi servizi = response.getServizi();
mnp.proxy.ws.sdp.client.ServiziServizio[] elencoServizi = servizi.getServizio();
if (elencoServizi != null && elencoServizi.length > 0) {
//prendo solo il primo essendo i 3 servizi mutualmente esclusivi
retrieveGisp.setRespServizioAttivo(elencoServizi[0].getName());
//prendo l'elenco degli attributi del servizio (i sottoservizi possono essere più di uno)
mnp.proxy.ws.sdp.client.ServiziAttributiServizio attributiServizi = elencoServizi[0].getAttributiServizio();
retrieveGisp.setRespAdditional(attributiServizi.getAdditional());
retrieveGisp.setRespSottoservizio(attributiServizi.getSottoservizio());
// retrieveGisp.setRespAdditional(elencoServizi[0].getAttributi_servizi()[0].getAttributo(1).getContent());
}
} //chiudi if servizi
//TAG RISORSE RETE
if (response.getRisorseRete() != null) {
mnp.proxy.ws.sdp.client.RisorseRete risorseRete = response.getRisorseRete();
retrieveGisp.setRespReteStato(risorseRete.getStato());
retrieveGisp.setRespReteTipologia(risorseRete.getTipologia());
retrieveGisp.setRespReteDataUltimaOper(risorseRete.getDataUltimaOperazione());
}
}
catch (Exception ex) {
ex.printStackTrace();
throw ex;
}
return retrieveGisp;
}
/**
* Ritorna un HzGispRetrieveOut contenente i dati della response * Ritorna un HzGispRetrieveOut contenente i dati della response
* @param xmlResponse * @param xmlResponse
* @return * @return