From ee07a54adf8559f2c45162a76c9005c99fd5b556 Mon Sep 17 00:00:00 2001 From: "andres.albarran" Date: Tue, 18 Nov 2025 22:51:57 +0100 Subject: [PATCH] initial commit --- .gitignore | 21 + AS400NaturalCustomerInAppSvc.jws | 53 + .../AS400NaturalCustomerInAppSvc.jpr | 198 ++++ ...alCustomerInAppSvc_createCustomer.pipeline | 217 ++++ ...AppSvc_createCustomer_CanonicalToInput.xqy | 186 ++++ ...AppSvc_createCustomer_InputToCanonical.xqy | 127 +++ ...NaturalCustomerInAppSvc_createCustomer.xsd | 273 +++++ ...AppSvc_createCustomerRelationship.pipeline | 703 +++++++++++++ ...eCustomerRelationship_CanonicalToInput.xqy | 234 +++++ ...eCustomerRelationship_InputToCanonical.xqy | 106 ++ ...merInAppSvc_createCustomerRelationship.xsd | 329 ++++++ ...AppSvc_deleteCustomerRelationship.pipeline | 214 ++++ ...eCustomerRelationship_CanonicalToInput.xqy | 197 ++++ ...eCustomerRelationship_InputToCanonical.xqy | 100 ++ ...merInAppSvc_deleteCustomerRelationship.xsd | 213 ++++ ...omerInAppSvc_deleteEmploymentData.pipeline | 214 ++++ ..._deleteEmploymentData_CanonicalToInput.xqy | 128 +++ ..._deleteEmploymentData_InputToCanonical.xqy | 100 ++ ...lCustomerInAppSvc_deleteEmploymentData.xsd | 200 ++++ ...CustomerInAppSvc_readCustomerData.pipeline | 215 ++++ ...pSvc_readCustomerData_CanonicalToInput.xqy | 105 ++ ...pSvc_readCustomerData_InputToCanonical.xqy | 978 ++++++++++++++++++ ...turalCustomerInAppSvc_readCustomerData.xsd | 421 ++++++++ ...merInAppSvc_readCustomerInterview.pipeline | 226 ++++ ...readCustomerInterview_CanonicalToInput.xqy | 118 +++ ...readCustomerInterview_InputToCanonical.xqy | 177 ++++ ...CustomerInAppSvc_readCustomerInterview.xsd | 325 ++++++ ...InAppSvc_readCustomerRelationship.pipeline | 700 +++++++++++++ ...dCustomerRelationship_CanonicalToInput.xqy | 78 ++ ...dCustomerRelationship_InputToCanonical.xqy | 430 ++++++++ ...tomerInAppSvc_readCustomerRelationship.xsd | 330 ++++++ ...InAppSvc_readCustomerRelationship_1122.xsd | 294 ++++++ ...stomerInAppSvc_updateCustomerData.pipeline | 736 +++++++++++++ ...vc_updateCustomerData_CanonicalToInput.xqy | 623 +++++++++++ ...vc_updateCustomerData_InputToCanonical.xqy | 173 ++++ ...ralCustomerInAppSvc_updateCustomerData.xsd | 325 ++++++ ...rInAppSvc_updateCustomerInterview.pipeline | 214 ++++ ...dateCustomerInterview_CanonicalToInput.xqy | 248 +++++ ...dateCustomerInterview_InputToCanonical.xqy | 190 ++++ ...stomerInAppSvc_updateCustomerInterview.xsd | 261 +++++ ...AppSvc_updateCustomerRelationship.pipeline | 214 ++++ ...eCustomerRelationship_CanonicalToInput.xqy | 234 +++++ ...eCustomerRelationship_InputToCanonical.xqy | 106 ++ ...merInAppSvc_updateCustomerRelationship.xsd | 331 ++++++ AS400NaturalCustomerInAppSvc/pom.xml | 20 + .../AS400NaturalCustomerInAppSvc.pipeline | 40 + .../proxy/AS400NaturalCustomerInAppSvc.proxy | 35 + .../servicebus.sboverview | 2 + .../wsdl/AS400NaturalCustomerInAppSvc.wsdl | 209 ++++ LICENSE | 0 pom.xml | 21 + 51 files changed, 12192 insertions(+) create mode 100644 AS400NaturalCustomerInAppSvc.jws create mode 100644 AS400NaturalCustomerInAppSvc/AS400NaturalCustomerInAppSvc.jpr create mode 100644 AS400NaturalCustomerInAppSvc/operations/createCustomer/proxy/AS400NaturalCustomerInAppSvc_createCustomer.pipeline create mode 100644 AS400NaturalCustomerInAppSvc/operations/createCustomer/xq/AS400NaturalCustomerInAppSvc_createCustomer_CanonicalToInput.xqy create mode 100644 AS400NaturalCustomerInAppSvc/operations/createCustomer/xq/AS400NaturalCustomerInAppSvc_createCustomer_InputToCanonical.xqy create mode 100644 AS400NaturalCustomerInAppSvc/operations/createCustomer/xsd/AS400NaturalCustomerInAppSvc_createCustomer.xsd create mode 100644 AS400NaturalCustomerInAppSvc/operations/createCustomerRelationship/proxy/AS400NaturalCustomerInAppSvc_createCustomerRelationship.pipeline create mode 100644 AS400NaturalCustomerInAppSvc/operations/createCustomerRelationship/xq/AS400NaturalCustomerInAppSvc_createCustomerRelationship_CanonicalToInput.xqy create mode 100644 AS400NaturalCustomerInAppSvc/operations/createCustomerRelationship/xq/AS400NaturalCustomerInAppSvc_createCustomerRelationship_InputToCanonical.xqy create mode 100644 AS400NaturalCustomerInAppSvc/operations/createCustomerRelationship/xsd/AS400NaturalCustomerInAppSvc_createCustomerRelationship.xsd create mode 100644 AS400NaturalCustomerInAppSvc/operations/deleteCustomerRelationship/proxy/AS400NaturalCustomerInAppSvc_deleteCustomerRelationship.pipeline create mode 100644 AS400NaturalCustomerInAppSvc/operations/deleteCustomerRelationship/xq/AS400NaturalCustomerInAppSvc_deleteCustomerRelationship_CanonicalToInput.xqy create mode 100644 AS400NaturalCustomerInAppSvc/operations/deleteCustomerRelationship/xq/AS400NaturalCustomerInAppSvc_deleteCustomerRelationship_InputToCanonical.xqy create mode 100644 AS400NaturalCustomerInAppSvc/operations/deleteCustomerRelationship/xsd/AS400NaturalCustomerInAppSvc_deleteCustomerRelationship.xsd create mode 100644 AS400NaturalCustomerInAppSvc/operations/deleteEmploymentData/proxy/AS400NaturalCustomerInAppSvc_deleteEmploymentData.pipeline create mode 100644 AS400NaturalCustomerInAppSvc/operations/deleteEmploymentData/xq/AS400NaturalCustomerInAppSvc_deleteEmploymentData_CanonicalToInput.xqy create mode 100644 AS400NaturalCustomerInAppSvc/operations/deleteEmploymentData/xq/AS400NaturalCustomerInAppSvc_deleteEmploymentData_InputToCanonical.xqy create mode 100644 AS400NaturalCustomerInAppSvc/operations/deleteEmploymentData/xsd/AS400NaturalCustomerInAppSvc_deleteEmploymentData.xsd create mode 100644 AS400NaturalCustomerInAppSvc/operations/readCustomerData/proxy/AS400NaturalCustomerInAppSvc_readCustomerData.pipeline create mode 100644 AS400NaturalCustomerInAppSvc/operations/readCustomerData/xq/AS400NaturalCustomerInAppSvc_readCustomerData_CanonicalToInput.xqy create mode 100644 AS400NaturalCustomerInAppSvc/operations/readCustomerData/xq/AS400NaturalCustomerInAppSvc_readCustomerData_InputToCanonical.xqy create mode 100644 AS400NaturalCustomerInAppSvc/operations/readCustomerData/xsd/AS400NaturalCustomerInAppSvc_readCustomerData.xsd create mode 100644 AS400NaturalCustomerInAppSvc/operations/readCustomerInterview/proxy/AS400NaturalCustomerInAppSvc_readCustomerInterview.pipeline create mode 100644 AS400NaturalCustomerInAppSvc/operations/readCustomerInterview/xq/AS400NaturalCustomerInAppSvc_readCustomerInterview_CanonicalToInput.xqy create mode 100644 AS400NaturalCustomerInAppSvc/operations/readCustomerInterview/xq/AS400NaturalCustomerInAppSvc_readCustomerInterview_InputToCanonical.xqy create mode 100644 AS400NaturalCustomerInAppSvc/operations/readCustomerInterview/xsd/AS400NaturalCustomerInAppSvc_readCustomerInterview.xsd create mode 100644 AS400NaturalCustomerInAppSvc/operations/readCustomerRelationship/proxy/AS400NaturalCustomerInAppSvc_readCustomerRelationship.pipeline create mode 100644 AS400NaturalCustomerInAppSvc/operations/readCustomerRelationship/xq/AS400NaturalCustomerInAppSvc_readCustomerRelationship_CanonicalToInput.xqy create mode 100644 AS400NaturalCustomerInAppSvc/operations/readCustomerRelationship/xq/AS400NaturalCustomerInAppSvc_readCustomerRelationship_InputToCanonical.xqy create mode 100644 AS400NaturalCustomerInAppSvc/operations/readCustomerRelationship/xsd/AS400NaturalCustomerInAppSvc_readCustomerRelationship.xsd create mode 100644 AS400NaturalCustomerInAppSvc/operations/readCustomerRelationship/xsd/AS400NaturalCustomerInAppSvc_readCustomerRelationship_1122.xsd create mode 100644 AS400NaturalCustomerInAppSvc/operations/updateCustomerData/proxy/AS400NaturalCustomerInAppSvc_updateCustomerData.pipeline create mode 100644 AS400NaturalCustomerInAppSvc/operations/updateCustomerData/xq/AS400NaturalCustomerInAppSvc_updateCustomerData_CanonicalToInput.xqy create mode 100644 AS400NaturalCustomerInAppSvc/operations/updateCustomerData/xq/AS400NaturalCustomerInAppSvc_updateCustomerData_InputToCanonical.xqy create mode 100644 AS400NaturalCustomerInAppSvc/operations/updateCustomerData/xsd/AS400NaturalCustomerInAppSvc_updateCustomerData.xsd create mode 100644 AS400NaturalCustomerInAppSvc/operations/updateCustomerInterview/proxy/AS400NaturalCustomerInAppSvc_updateCustomerInterview.pipeline create mode 100644 AS400NaturalCustomerInAppSvc/operations/updateCustomerInterview/xq/AS400NaturalCustomerInAppSvc_updateCustomerInterview_CanonicalToInput.xqy create mode 100644 AS400NaturalCustomerInAppSvc/operations/updateCustomerInterview/xq/AS400NaturalCustomerInAppSvc_updateCustomerInterview_InputToCanonical.xqy create mode 100644 AS400NaturalCustomerInAppSvc/operations/updateCustomerInterview/xsd/AS400NaturalCustomerInAppSvc_updateCustomerInterview.xsd create mode 100644 AS400NaturalCustomerInAppSvc/operations/updateCustomerRelationship/proxy/AS400NaturalCustomerInAppSvc_updateCustomerRelationship.pipeline create mode 100644 AS400NaturalCustomerInAppSvc/operations/updateCustomerRelationship/xq/AS400NaturalCustomerInAppSvc_updateCustomerRelationship_CanonicalToInput.xqy create mode 100644 AS400NaturalCustomerInAppSvc/operations/updateCustomerRelationship/xq/AS400NaturalCustomerInAppSvc_updateCustomerRelationship_InputToCanonical.xqy create mode 100644 AS400NaturalCustomerInAppSvc/operations/updateCustomerRelationship/xsd/AS400NaturalCustomerInAppSvc_updateCustomerRelationship.xsd create mode 100644 AS400NaturalCustomerInAppSvc/pom.xml create mode 100644 AS400NaturalCustomerInAppSvc/proxy/AS400NaturalCustomerInAppSvc.pipeline create mode 100644 AS400NaturalCustomerInAppSvc/proxy/AS400NaturalCustomerInAppSvc.proxy create mode 100644 AS400NaturalCustomerInAppSvc/servicebus.sboverview create mode 100644 AS400NaturalCustomerInAppSvc/wsdl/AS400NaturalCustomerInAppSvc.wsdl create mode 100644 LICENSE create mode 100644 pom.xml diff --git a/.gitignore b/.gitignore index cb4a18e..3acec03 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,24 @@ # Project-level settings /.tgitconfig +# Archivos temporales +*.tmp +*.bak +*.swp +*.log + +# Archivos de integración continua +/.settings/ +/.project +/.classpath +/.factorypath + +# Carpetas +.data/ +.git/ +System/ + + + + + diff --git a/AS400NaturalCustomerInAppSvc.jws b/AS400NaturalCustomerInAppSvc.jws new file mode 100644 index 0000000..df4599e --- /dev/null +++ b/AS400NaturalCustomerInAppSvc.jws @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/AS400NaturalCustomerInAppSvc/AS400NaturalCustomerInAppSvc.jpr b/AS400NaturalCustomerInAppSvc/AS400NaturalCustomerInAppSvc.jpr new file mode 100644 index 0000000..41d93ac --- /dev/null +++ b/AS400NaturalCustomerInAppSvc/AS400NaturalCustomerInAppSvc.jpr @@ -0,0 +1,198 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/AS400NaturalCustomerInAppSvc/operations/createCustomer/proxy/AS400NaturalCustomerInAppSvc_createCustomer.pipeline b/AS400NaturalCustomerInAppSvc/operations/createCustomer/proxy/AS400NaturalCustomerInAppSvc_createCustomer.pipeline new file mode 100644 index 0000000..9fd5a20 --- /dev/null +++ b/AS400NaturalCustomerInAppSvc/operations/createCustomer/proxy/AS400NaturalCustomerInAppSvc_createCustomer.pipeline @@ -0,0 +1,217 @@ + + + + + + + AS400NaturalCustomerInAppSvcSOAP + http://xmlns.banesco.com/ApplicationService/AS400NaturalCustomerInAppSvc + + + + + + + 1.0 + + + + + + + + nat:createCustomer_Rq + + ./nat:createCustomer_Rq + + + + + + + + + + + http://xmlns.banesco.com/Service/NaturalCustomerMgmtSvc + + + + + http://xmlns.banesco.com/Service/NaturalCustomerMgmtSvc + + + + + + nat:createCustomer_Rs + + ./nat:createCustomer_Rs + + + + + + + + + + + http://xmlns.banesco.com/Service/NaturalCustomerMgmtSvc + + + + + http://xmlns.banesco.com/Service/NaturalCustomerMgmtSvc + + + + + + + + + $backupBody/nat:createCustomer_Rq/nat:MsgRqHdr + + + + + + + + + + + + + + + + + $body/direct:EjecutaTRX + + + $backupBody/nat:createCustomer_Rq/nat:MsgRqHdr + + + + + + + + + + + + + + ejec:EjecutaTRX + + + + + + ejec:EjecutaTRXResponse + + + + + + + + + "DVM_RESPONSE_CODE" + + + "VC" + + + $body/direct:EjecutaTRXResponse/direct:EjecutaTRXResult/direct:TRXSResults/direct:Respuestas[1]/direct:Respuesta[1]/@NUMREG + + + $backupBody/nat:createCustomer_Rq/nat:MsgRqHdr + + + "AS400" + + + + + + + + + + + + "DVM_MESSAGE_ERROR" + + + "MESSAGE" + + + $errors + + + $backupBody/nat:createCustomer_Rq + + + "AS400" + + + + + + + + + + + + + + + + + $dvmResponse + + + $body/nat:createCustomer_Rq + + + + + + + + + + + + + + + + + data($backupBody/direct:createCustomer_Rq/direct:MsgRqHdr/msg:RequestId) + + + $body/direct:EjecutaTRXResponse + + + fn-bea:inlinedXML($dvm) + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/AS400NaturalCustomerInAppSvc/operations/createCustomer/xq/AS400NaturalCustomerInAppSvc_createCustomer_CanonicalToInput.xqy b/AS400NaturalCustomerInAppSvc/operations/createCustomer/xq/AS400NaturalCustomerInAppSvc_createCustomer_CanonicalToInput.xqy new file mode 100644 index 0000000..d4ce9c7 --- /dev/null +++ b/AS400NaturalCustomerInAppSvc/operations/createCustomer/xq/AS400NaturalCustomerInAppSvc_createCustomer_CanonicalToInput.xqy @@ -0,0 +1,186 @@ +xquery version "1.0"; +(:: OracleAnnotationVersion "1.0" ::) + +declare namespace ns6 = "http://Obi_Wan/EjecutaTRX"; +(:: import schema at "../xsd/AS400NaturalCustomerInAppSvc_createCustomer.xsd" ::) + +declare namespace ns30 = "http://xmlns.banesco.com/Service/NaturalCustomerMgmtSvc"; +(:: import schema at "../../../../BanescoCommonArtifacts/xsd/canonical/Services/NaturalCustomerMgmtSvc.xsd" ::) + +declare namespace ns29 = "http://xmlns.banesco.com/EnterpriseObjects/CustCrossReference"; +declare namespace ns25 = "http://xmlns.banesco.com/EnterpriseObjects/Addr"; +declare namespace ns26 = "http://xmlns.banesco.com/EnterpriseObjects/MsgRqHdr"; +declare namespace ns27 = "http://xmlns.banesco.com/EnterpriseObjects/Status"; +declare namespace ns28 = "http://xmlns.banesco.com/EnterpriseObjects/TradeRegistry"; +declare namespace ns21 = "http://xmlns.banesco.com/EnterpriseObjects/PersonInfo_v2.0"; +declare namespace ns22 = "http://xmlns.banesco.com/EnterpriseObjects/EmploymentData_v2.0"; +declare namespace ns23 = "http://xmlns.banesco.com/EnterpriseObjects/Addr_v2.0"; +declare namespace ns24 = "http://xmlns.banesco.com/EnterpriseObjects/Service"; +declare namespace ns20 = "http://xmlns.banesco.com/EnterpriseObjects/Taxes_v2.0"; +declare namespace xf = "http://tempuri.org/AS400NaturalCustomerInAppSvc/operations/createCustomer/xq/AS400NaturalCustomerInAppSvc_createCustomer_CanonicalToInput/"; +declare namespace ns16 = "http://xmlns.banesco.com/EnterpriseObjects/ContactInfo_v2.0"; +declare namespace ns17 = "http://xmlns.banesco.com/EnterpriseObjects/CommonComplexType"; +declare namespace ns14 = "http://xmlns.banesco.com/EnterpriseObjects/Product"; +declare namespace ns15 = "http://xmlns.banesco.com/EnterpriseObjects/PersonName"; +declare namespace ns18 = "http://xmlns.banesco.com/EnterpriseObjects/Banking"; +declare namespace ns19 = "http://xmlns.banesco.com/EnterpriseObjects/NaturalCustomer"; +declare namespace ns9 = "http://xmlns.banesco.com/EnterpriseObjects/Organization"; +declare namespace ns32 = "http://xmlns.banesco.com/EnterpriseObjects/PersonInfo"; +declare namespace ns33 = "http://xmlns.banesco.com/EnterpriseObjects/Score"; +declare namespace ns5 = "http://xmlns.banesco.com/EnterpriseObjects/Contact"; +declare namespace ns12 = "http://xmlns.banesco.com/EnterpriseObjects/Organization_v2.0"; +declare namespace ns31 = "http://xmlns.banesco.com/EnterpriseObjects/AffiliationSvc"; +declare namespace ns13 = "http://xmlns.banesco.com/EnterpriseObjects/Chk"; +declare namespace ns10 = "http://xmlns.banesco.com/EnterpriseObjects/Ref_v2.0"; +declare namespace ns7 = "http://xmlns.banesco.com/EnterpriseObjects/Risk"; +declare namespace ns11 = "http://xmlns.banesco.com/EnterpriseObjects/Loan"; +declare namespace ns8 = "http://xmlns.banesco.com/EnterpriseObjects/Investment"; +declare namespace ns2 = "http://xmlns.banesco.com/EnterpriseObjects/Fee"; +declare namespace ns1 = "http://xmlns.banesco.com/EnterpriseObjects/RegulatoryInfo"; +declare namespace ns4 = "http://xmlns.banesco.com/EnterpriseObjects/Bankinfo"; +declare namespace ns3 = "http://xmlns.banesco.com/EnterpriseObjects/FinancialInfo"; +declare namespace ns0 = "http://xmlns.banesco.com/EnterpriseObjects/CustVerificationList"; +declare namespace ns35 = "http://xmlns.banesco.com/Service/MessageEnrichUtilMgmtSvc"; + +import module namespace xqu="http://xmlns.banesco.com/xquey-functions" at "../../../../BanescoCommonArtifacts/xq/libraries/AS400Util.xqy", "../../../../BanescoCommonArtifacts/xq/libraries/dateTimeUtil.xqy"; + +declare function xf:AS400NaturalCustomerInAppSvc_createCustomer_CanonicalToInput($createCustomer_Rq1 as element(ns30:createCustomer_Rq),$readDVM_Rs1 as element(ns35:readDVM_Rs)) + as element(ns6:EjecutaTRX) { + + { data($createCustomer_Rq1/ns30:MsgRqHdr/ns26:RequestId) } + { data($createCustomer_Rq1/ns30:MsgRqHdr/ns26:OperatorCode) } + { data($createCustomer_Rq1/ns30:MsgRqHdr/ns26:NetworkTrnInfo[1]/ns26:AgencyCode) } + + { xqu:day-from-date-leftpadding(data($createCustomer_Rq1/ns30:MsgRqHdr/ns26:NetworkTrnInfo[1]/ns26:TransactionDate)) } + { xqu:month-from-date-leftpadding(data($createCustomer_Rq1/ns30:MsgRqHdr/ns26:NetworkTrnInfo[1]/ns26:TransactionDate)) } + { xqu:year-from-date-leftpadding(data($createCustomer_Rq1/ns30:MsgRqHdr/ns26:NetworkTrnInfo[1]/ns26:TransactionDate)) } + + + { xqu:hours-from-time-leftpadding(data($createCustomer_Rq1/ns30:MsgRqHdr/ns26:NetworkTrnInfo[1]/ns26:TransactionTime))} + { xqu:minutes-from-time-leftpadding(data($createCustomer_Rq1/ns30:MsgRqHdr/ns26:NetworkTrnInfo[1]/ns26:TransactionTime)) } + { xqu:seconds-from-time-leftpadding(data($createCustomer_Rq1/ns30:MsgRqHdr/ns26:NetworkTrnInfo[1]/ns26:TransactionTime)) } + + { data($readDVM_Rs1/ns35:Outputs/ns35:Output[1]/ns35:Attributes/ns35:Attribute[./ns35:Name='INDLINEA']/ns35:Value) } + { data($readDVM_Rs1/ns35:Outputs/ns35:Output[1]/ns35:Attributes/ns35:Attribute[./ns35:Name='CRITREV']/ns35:Value) } + { data($readDVM_Rs1/ns35:Outputs/ns35:Output[1]/ns35:Attributes/ns35:Attribute[./ns35:Name='INDCONT']/ns35:Value) } + { data($createCustomer_Rq1/ns30:MsgRqHdr/ns26:NetworkTrnInfo[1]/ns26:BankId) } + { data($createCustomer_Rq1/ns30:MsgRqHdr/ns26:SourceChannelCode) } + { data($createCustomer_Rq1/ns30:MsgRqHdr/ns26:NetworkTrnInfo[1]/ns26:ChannelUserId) } + + + + 0 + { data($createCustomer_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:GovIssueIdent[1]/ns21:IdentSerialNumPrefix) } + { data($createCustomer_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:GovIssueIdent[1]/ns21:IdentSerialNum) } + { data($createCustomer_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:PersonName[1]/ns15:LastName) } + { data($createCustomer_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:PersonName[1]/ns15:LastSecondName) } + { data($createCustomer_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:PersonName[1]/ns15:FirstName) } + { data($createCustomer_Rq1/ns30:NaturalCustomer/ns19:ExecutiveId) } + { data($createCustomer_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:BirthCountry) } + { data($createCustomer_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:NationalityCountry) } + { xqu:year-from-date-leftpadding(data($createCustomer_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:BirthDt)) } + { xqu:month-from-date-leftpadding(data($createCustomer_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:BirthDt)) } + { xqu:day-from-date-leftpadding(data($createCustomer_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:BirthDt)) } + { data($createCustomer_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:Gender) } + { data($createCustomer_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:MaritalStatus) } + { data($createCustomer_Rq1/ns30:NaturalCustomer/ns19:EmploymentData[1]/ns22:Occupation) } + { data($createCustomer_Rq1/ns30:NaturalCustomer/ns19:EmploymentData[1]/ns22:JobTitle) } + { data($createCustomer_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:SonsNumber) } + { data($createCustomer_Rq1/ns30:NaturalCustomer/ns19:CustClass) } + + { + for $PhoneNum in ($createCustomer_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:ContactInfo[1]/ns16:PhoneNum) + return + if ($PhoneNum/ns16:PhoneUse = "HABITACION") then + (fn:substring-before(data($PhoneNum/ns16:Phone),"-")) + else + () + } + + + { + for $PhoneNum in ($createCustomer_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:ContactInfo[1]/ns16:PhoneNum) + return + if ($PhoneNum/ns16:PhoneUse = "HABITACION") then + (fn:substring-after(data($PhoneNum/ns16:Phone),"-")) + else + () + } + + + { + for $PhoneNum in ($createCustomer_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:ContactInfo[1]/ns16:PhoneNum) + return + if ($PhoneNum/ns16:PhoneUse = "OFICINA") then + (fn:substring-before(data($PhoneNum/ns16:Phone),"-")) + else + () + } + + + { + for $PhoneNum in ($createCustomer_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:ContactInfo[1]/ns16:PhoneNum) + return + if ($PhoneNum/ns16:PhoneUse = "OFICINA") then + (fn:substring-after(data($PhoneNum/ns16:Phone),"-")) + else + () + } + + + { + for $PhoneNum in ($createCustomer_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:ContactInfo[1]/ns16:PhoneNum) + return + if ($PhoneNum/ns16:PhoneUse = "OTRO") then + (fn:substring-before(data($PhoneNum/ns16:Phone),"-")) + else + () + } + + + { + for $PhoneNum in ($createCustomer_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:ContactInfo[1]/ns16:PhoneNum) + return + if ($PhoneNum/ns16:PhoneUse = "OTRO") then + (fn:substring-after(data($PhoneNum/ns16:Phone),"-")) + else + () + } + + + { + for $PhoneNum in ($createCustomer_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:ContactInfo[1]/ns16:PhoneNum) + return + if ($PhoneNum/ns16:PhoneUse = "FAX") then + (fn:substring-before(data($PhoneNum/ns16:Phone),"-")) + else + () + } + + + { + for $PhoneNum in ($createCustomer_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:ContactInfo[1]/ns16:PhoneNum) + return + if ($PhoneNum/ns16:PhoneUse = "FAX") then + (fn:substring-after(data($PhoneNum/ns16:Phone),"-")) + else + () + } + + { data($createCustomer_Rq1/ns30:NaturalCustomer/ns19:EmployeeInd) } + { data($createCustomer_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:CustType) } + + + + +}; + +declare variable $createCustomer_Rq1 as element(ns30:createCustomer_Rq) external; +declare variable $readDVM_Rs1 as element(ns35:readDVM_Rs) external; + +xf:AS400NaturalCustomerInAppSvc_createCustomer_CanonicalToInput($createCustomer_Rq1,$readDVM_Rs1) \ No newline at end of file diff --git a/AS400NaturalCustomerInAppSvc/operations/createCustomer/xq/AS400NaturalCustomerInAppSvc_createCustomer_InputToCanonical.xqy b/AS400NaturalCustomerInAppSvc/operations/createCustomer/xq/AS400NaturalCustomerInAppSvc_createCustomer_InputToCanonical.xqy new file mode 100644 index 0000000..d89d9e6 --- /dev/null +++ b/AS400NaturalCustomerInAppSvc/operations/createCustomer/xq/AS400NaturalCustomerInAppSvc_createCustomer_InputToCanonical.xqy @@ -0,0 +1,127 @@ +xquery version "1.0"; +(:: OracleAnnotationVersion "1.0" ::) + +declare namespace ns7 = "http://Obi_Wan/EjecutaTRX"; +(:: import schema at "../xsd/AS400NaturalCustomerInAppSvc_createCustomer.xsd" ::) + +declare namespace ns30 = "http://xmlns.banesco.com/Service/NaturalCustomerMgmtSvc"; +(:: import schema at "../../../../BanescoCommonArtifacts/xsd/canonical/Services/NaturalCustomerMgmtSvc.xsd" ::) + +declare namespace ns29 = "http://xmlns.banesco.com/EnterpriseObjects/CustCrossReference"; +declare namespace ns25 = "http://xmlns.banesco.com/EnterpriseObjects/Service"; +declare namespace ns26 = "http://xmlns.banesco.com/EnterpriseObjects/Addr"; +declare namespace stat = "http://xmlns.banesco.com/EnterpriseObjects/Status"; +declare namespace ns28 = "http://xmlns.banesco.com/EnterpriseObjects/TradeRegistry"; +declare namespace ns21 = "http://xmlns.banesco.com/EnterpriseObjects/PersonInfo_v2.0"; +declare namespace ns22 = "http://xmlns.banesco.com/EnterpriseObjects/EmploymentData_v2.0"; +declare namespace ns23 = "http://xmlns.banesco.com/EnterpriseObjects/MsgRsHdr"; +declare namespace ns24 = "http://xmlns.banesco.com/EnterpriseObjects/Addr_v2.0"; +declare namespace ns20 = "http://xmlns.banesco.com/EnterpriseObjects/Taxes_v2.0"; +declare namespace xf = "http://tempuri.org/AS400NaturalCustomerInAppSvc/operations/createCustomer/xq/AS400NaturalCustomerInAppSvc_createCustomer_InputToCanonical/"; +declare namespace ns16 = "http://xmlns.banesco.com/EnterpriseObjects/ContactInfo_v2.0"; +declare namespace ns17 = "http://xmlns.banesco.com/EnterpriseObjects/CommonComplexType"; +declare namespace ns14 = "http://xmlns.banesco.com/EnterpriseObjects/Product"; +declare namespace ns15 = "http://xmlns.banesco.com/EnterpriseObjects/PersonName"; +declare namespace ns18 = "http://xmlns.banesco.com/EnterpriseObjects/Banking"; +declare namespace ns19 = "http://xmlns.banesco.com/EnterpriseObjects/NaturalCustomer"; +declare namespace ns9 = "http://xmlns.banesco.com/EnterpriseObjects/Organization"; +declare namespace ns32 = "http://xmlns.banesco.com/EnterpriseObjects/PersonInfo"; +declare namespace ns33 = "http://xmlns.banesco.com/EnterpriseObjects/Score"; +declare namespace ns12 = "http://xmlns.banesco.com/EnterpriseObjects/Organization_v2.0"; +declare namespace ns5 = "http://xmlns.banesco.com/EnterpriseObjects/Contact"; +declare namespace ns13 = "http://xmlns.banesco.com/EnterpriseObjects/Chk"; +declare namespace ns31 = "http://xmlns.banesco.com/EnterpriseObjects/AffiliationSvc"; +declare namespace ns6 = "http://xmlns.banesco.com/EnterpriseObjects/Risk"; +declare namespace ns10 = "http://xmlns.banesco.com/EnterpriseObjects/Ref_v2.0"; +declare namespace ns8 = "http://xmlns.banesco.com/EnterpriseObjects/Investment"; +declare namespace ns11 = "http://xmlns.banesco.com/EnterpriseObjects/Loan"; +declare namespace ns2 = "http://xmlns.banesco.com/EnterpriseObjects/Fee"; +declare namespace ns1 = "http://xmlns.banesco.com/EnterpriseObjects/RegulatoryInfo"; +declare namespace ns4 = "http://xmlns.banesco.com/EnterpriseObjects/Bankinfo"; +declare namespace ns3 = "http://xmlns.banesco.com/EnterpriseObjects/FinancialInfo"; +declare namespace ns0 = "http://xmlns.banesco.com/EnterpriseObjects/CustVerificationList"; + +declare function xf:AS400NaturalCustomerInAppSvc_createCustomer_InputToCanonical($ejecutaTRXResponse1 as element(ns7:EjecutaTRXResponse), $RequestId as xs:string, $dvm as element(*)) + as element(ns30:createCustomer_Rs) { + + + { + if(exists($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[exists(ns7:Respuesta[1]/ns2:MSJERR)]))then( + data(($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[exists(ns7:Respuesta[1]/ns7:MSJERR)]/ns7:Respuesta[1]/@NUMREG)[1]) + )else( + data(($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/ns7:Respuesta[1]/@NUMREG)[1]) + )} + + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/@NOCDTOSAL) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/@CODTRN) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/@CODSUP) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/@TIPOPER) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/@CONTRN) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/@DSCREG) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/ns7:Respuesta[1]/@NUMREG) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/@TIPTRN) } + { data($RequestId)} + AS400 + + + {if(exists($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[exists(ns7:Respuesta[1]/ns7:CODERR1)]) or + exists($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[exists(ns7:Respuesta[1]/ns7:MSJERR)]) + )then( + + { + for $Respuestas in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas + return + if(exists($Respuestas/ns7:Respuesta[1]/ns7:CODERR1))then( + + {concat("VB",data($Respuestas/@CODTRN))} + {"AS400"} + + { data($Respuestas/ns7:Respuesta[1]/ns7:CODERR1) } + { data($dvm/coderr1) } + + + { data($Respuestas/ns7:Respuesta[1]/ns7:CODERR2) } + { data($dvm/coderr2) } + + + { data($Respuestas/ns7:Respuesta[1]/ns7:CODERR3) } + { data($dvm/coderr3) } + + + { data($Respuestas/ns7:Respuesta[1]/ns7:CODERR4) } + { data($dvm/coderr4)} + + + /* + )else( + if(exists($Respuestas/ns7:Respuesta[1]/ns7:MSJERR))then( + + {concat("VB",data($Respuestas/@CODTRN))} + { data($Respuestas/ns7:Respuesta[1]/ns7:STACOD) } + { data($Respuestas/ns7:Respuesta[1]/ns7:MSJERR) } + {"AS400"} + /* + )else() + )} + + )else( + + + { + for $NUMCTE in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/ns7:Respuesta[1]/ns7:NUMCTE + return + { data($NUMCTE) } + } + + + )} + + + +}; + +declare variable $ejecutaTRXResponse1 as element(ns7:EjecutaTRXResponse) external; +declare variable $RequestId as xs:string external; +declare variable $dvm as element(*) external; + +xf:AS400NaturalCustomerInAppSvc_createCustomer_InputToCanonical($ejecutaTRXResponse1, $RequestId, $dvm) \ No newline at end of file diff --git a/AS400NaturalCustomerInAppSvc/operations/createCustomer/xsd/AS400NaturalCustomerInAppSvc_createCustomer.xsd b/AS400NaturalCustomerInAppSvc/operations/createCustomer/xsd/AS400NaturalCustomerInAppSvc_createCustomer.xsd new file mode 100644 index 0000000..6942092 --- /dev/null +++ b/AS400NaturalCustomerInAppSvc/operations/createCustomer/xsd/AS400NaturalCustomerInAppSvc_createCustomer.xsd @@ -0,0 +1,273 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/AS400NaturalCustomerInAppSvc/operations/createCustomerRelationship/proxy/AS400NaturalCustomerInAppSvc_createCustomerRelationship.pipeline b/AS400NaturalCustomerInAppSvc/operations/createCustomerRelationship/proxy/AS400NaturalCustomerInAppSvc_createCustomerRelationship.pipeline new file mode 100644 index 0000000..517fb09 --- /dev/null +++ b/AS400NaturalCustomerInAppSvc/operations/createCustomerRelationship/proxy/AS400NaturalCustomerInAppSvc_createCustomerRelationship.pipeline @@ -0,0 +1,703 @@ + + + + + + + AS400NaturalCustomerInAppSvcSOAP + http://xmlns.banesco.com/ApplicationService/AS400NaturalCustomerInAppSvc + + + + 1.0 + + + + + + + + + _ActionId-N3f579cff.77e31d8c.0.156c73c5fb5.N7f69 + + "Node: NOT-DEFINED Stage: NOT-DEFINED" + + + + _ActionId-N3f579cff.77e31d8c.0.156c73c5fb5.N7f68 + + + exists($fault[ctx:location/ctx:stage= "DVMs"]) + + + + _ActionId-N3f579cff.77e31d8c.0.156c73c5fb5.N7f66 + + concat("DVMs ", fn-bea:serialize($dvmRequest)) + + + + + + + exists($fault/ctx:location) + + + + _ActionId-N3f579cff.77e31d8c.0.156c73c5fb5.N7f64 + + concat("Node: ", data($fault/ctx:location/ctx:node), " Stage: ",data($fault/ctx:location/ctx:stage)) + + + + + + + _ActionId-N3f579cff.77e31d8c.0.156c73c5fb5.N7f63 + error + + fn:concat('[',fn:current-dateTime(),'][MessageID : ',$messageID,'][Global Error Handler][',fn:tokenize($inbound/@name,'\$')[last()],'/',$operation,'- message : ',$message,' - fault: ',fn-bea:serialize($fault),' - body : ',fn-bea:serialize($backupBody/*),'][Global Error Handler]') + + Error Global + + + _ActionId-N3f579cff.77e31d8c.0.156c73c5fb5.N7f62 + + Banesco: Oracle Service Bus Error + fatal + + fn:concat('[',fn:current-dateTime(),'][MessageID : ',$messageID,'][Global Error Handler][',fn:tokenize($inbound/@name,'\$')[last()],'/',$operation,'- message : ',$message,' - fault: ',fn-bea:serialize($fault),' - body : ',fn-bea:serialize($backupBody/*),'][Global Error Handler]') + + + + _ActionId-N3f579cff.77e31d8c.0.156c73c5fb5.N7f61 + + + + + $inbound + + + $backupBody + + + $fault + + + + + + _ActionId-N3f579cff.77e31d8c.0.156c73c5fb5.N7f60 + + ./* + + http://xmlns.banesco.com/Service/NaturalCustomerMgmtSvc + + + _ActionId-N3f579cff.77e31d8c.0.156c73c5fb5.N7f5f + + . + + http://xmlns.banesco.com/Service/NaturalCustomerMgmtSvc + + + _ActionId-N3f579cff.77e31d8c.0.156c73c5fb5.N7f5e + + . + + + $message + + + + _ActionId-N3f579cff.77e31d8c.0.156c73c5fb5.N7f5d + + + + + + + + + + _ActionId-a7c048f.N15255722.0.157c4111c0e.N7e51 + + $header + + + + _ActionId-a7c048f.N15255722.0.157c4111c0e.N7e50 + + $body + + + + _ActionId-N56015f30.7f264938.0.15a951a94ef.N7ff2 + + $proxyName + + + + + + + + + + + + + _ActionId-N3f579cff.77e31d8c.0.156c73c5fb5.N7f14 + + nat:createCustomerRelationship_Rq + body + + ./nat:createCustomerRelationship_Rq + + + + + + + + + + + _ActionId-N3f579cff.77e31d8c.0.156c73c5fb5.N7f0c + + readDVM + + dvmRequest + + + + dvmResponse + + + + + _ActionId-N3f579cff.77e31d8c.0.156c73c5fb5.N7f09 + + + + + $body/nat:createCustomerRelationship_Rq/nat:MsgRqHdr + + + + + + + + + + + + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7ffd + + . + + + + + + $dvmResponse + + + $body/nat:createCustomerRelationship_Rq + + + + + + + + + + + + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7f71 + + readProtocoloVB + + vbRequest + + + + vbResponse + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7f70 + + + + + $body/direct:EjecutaTRX + + + $backupBody/nat:createCustomerRelationship_Rq/nat:MsgRqHdr + + + + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7f6f + + + + + fn:upper-case($vbResponse/mes:Status/stat:StatusCode) + "OK" + + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7f6d + + . + + + $vbResponse/direct:EjecutaTRX + + + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7f6c + + . + + + + + + $inbound + + + $vbResponse + + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7f6b + + ./* + + http://xmlns.banesco.com/Service/NaturalCustomerMgmtSvc + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7f6a + + ././* + + http://xmlns.banesco.com/Service/NaturalCustomerMgmtSvc + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7f69 + + + + + + + + + + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7f62 + + ejec:EjecutaTRX + body + + ./direct:EjecutaTRX + + + + + + + + + + + + + + _ActionId-N3f579cff.77e31d8c.0.156c73c5fb5.N7f11 + + ejec:EjecutaTRXResponse + body + + ./direct:EjecutaTRXResponse + + + + + + + + + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7e06 + + "<dvm>" + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7e05 + + + exists($body/direct:EjecutaTRXResponse/direct:EjecutaTRXResult/direct:TRXSResults/direct:Respuestas[1]/direct:Respuesta[1]/@NUMREG) + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7e03 + + readDVM + + dvmRequest + + + + dvmResponse + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7e02 + + . + + + + + + "DVM_RESPONSE_CODE" + + + "VC" + + + $body/direct:EjecutaTRXResponse/direct:EjecutaTRXResult/direct:TRXSResults/direct:Respuestas[1]/direct:Respuesta[1]/@NUMREG + + + $backupBody/nat:updateCustomerRelationship_Rq/nat:MsgRqHdr + + + "AS400" + + + + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7e01 + + concat($dvm, "<numreg>",$dvmResponse/ns:Outputs/ns:Output[1]/ns:Attributes/ns:Attribute[1]/ns:Value/text(),"</numreg>") + + + + + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7e00 + + concat($dvm, "<numreg></numreg>") + + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7dff + + "" + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7dfe + + + exists($body/direct:EjecutaTRXResponse/direct:EjecutaTRXResult/direct:TRXSResults/direct:Respuestas/direct:Respuesta/direct:CODERR1) + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7dfc + + concat($errors,$body/direct:EjecutaTRXResponse/direct:EjecutaTRXResult/direct:TRXSResults/direct:Respuestas/direct:Respuesta/direct:CODERR1,",") + + + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7dfb + + concat($dvm, "<coderr1></coderr1>") + + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7dfa + + + exists($body/direct:EjecutaTRXResponse/direct:EjecutaTRXResult/direct:TRXSResults/direct:Respuestas/direct:Respuesta/direct:CODERR2) + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7df8 + + concat($errors,$body/direct:EjecutaTRXResponse/direct:EjecutaTRXResult/direct:TRXSResults/direct:Respuestas/direct:Respuesta/direct:CODERR2, ",") + + + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7df7 + + concat($dvm, "<coderr2></coderr2>") + + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7df6 + + + exists($body/direct:EjecutaTRXResponse/direct:EjecutaTRXResult/direct:TRXSResults/direct:Respuestas/direct:Respuesta/direct:CODERR3) + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7df4 + + concat($errors,$body/direct:EjecutaTRXResponse/direct:EjecutaTRXResult/direct:TRXSResults/direct:Respuestas/direct:Respuesta/direct:CODERR3, ",") + + + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7df3 + + concat($dvm, "<coderr3></coderr3>") + + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7df2 + + + exists($body/direct:EjecutaTRXResponse/direct:EjecutaTRXResult/direct:TRXSResults/direct:Respuestas/direct:Respuesta/direct:CODERR4) + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7df0 + + concat($errors,$body/direct:EjecutaTRXResponse/direct:EjecutaTRXResult/direct:TRXSResults/direct:Respuestas/direct:Respuesta/direct:CODERR4) + + + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7def + + concat($dvm, "<coderr4></coderr4>") + + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7dee + + + + + $errors + "" + + + + + + _ActionId-a960f8a.N5f5dd6ea.0.1692f34a3f5.N7e80 + + + (exists($body/direct:EjecutaTRXResponse/direct:EjecutaTRXResult/direct:TRXSResults/direct:Respuestas/direct:Respuesta/direct:DSCERR1) and data($body/direct:EjecutaTRXResponse/direct:EjecutaTRXResult/direct:TRXSResults/direct:Respuestas/direct:Respuesta/direct:DSCERR1)!='') or +(exists($body/direct:EjecutaTRXResponse/direct:EjecutaTRXResult/direct:TRXSResults/direct:Respuestas/direct:Respuesta/direct:DSCERR2) and data($body/direct:EjecutaTRXResponse/direct:EjecutaTRXResult/direct:TRXSResults/direct:Respuestas/direct:Respuesta/direct:DSCERR2)!='') or +(exists($body/direct:EjecutaTRXResponse/direct:EjecutaTRXResult/direct:TRXSResults/direct:Respuestas/direct:Respuesta/direct:DSCERR3) and data($body/direct:EjecutaTRXResponse/direct:EjecutaTRXResult/direct:TRXSResults/direct:Respuestas/direct:Respuesta/direct:DSCERR3)!='') or +(exists($body/direct:EjecutaTRXResponse/direct:EjecutaTRXResult/direct:TRXSResults/direct:Respuestas/direct:Respuesta/direct:DSCERR4) and data($body/direct:EjecutaTRXResponse/direct:EjecutaTRXResult/direct:TRXSResults/direct:Respuestas/direct:Respuesta/direct:DSCERR4)!='') + + + + _ActionId-a960f8a.N5f5dd6ea.0.1692f34a3f5.N7e7e + + ",data($body/direct:EjecutaTRXResponse/direct:EjecutaTRXResult/direct:TRXSResults/direct:Respuestas/direct:Respuesta/direct:DSCERR1),"",data($body/direct:EjecutaTRXResponse/direct:EjecutaTRXResult/direct:TRXSResults/direct:Respuestas/direct:Respuesta/direct:DSCERR2),"",data($body/direct:EjecutaTRXResponse/direct:EjecutaTRXResult/direct:TRXSResults/direct:Respuestas/direct:Respuesta/direct:DSCERR3),"",data($body/direct:EjecutaTRXResponse/direct:EjecutaTRXResult/direct:TRXSResults/direct:Respuestas/direct:Respuesta/direct:DSCERR4),"")]]> + + + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7dec + + readDVM + + dvmRequest + + + + dvmResponse + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7deb + + . + + + + + + "DVM_MESSAGE_ERROR" + + + "MESSAGE" + + + $errors + + + $backupBody/nat:updateCustomerRelationship_Rq/nat:MsgRqHdr + + + "AS400" + + + + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7dea + + ",$dvmResponse/ns:Outputs/ns:Output[1]/ns:Attributes/ns:Attribute[1]/ns:Value/text(),"",$dvmResponse/ns:Outputs/ns:Output[2]/ns:Attributes/ns:Attribute[1]/ns:Value/text(),"",$dvmResponse/ns:Outputs/ns:Output[3]/ns:Attributes/ns:Attribute[1]/ns:Value/text(),"",$dvmResponse/ns:Outputs/ns:Output[4]/ns:Attributes/ns:Attribute[1]/ns:Value/text(),"")]]> + + + + + + + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7de9 + + concat($dvm, "</dvm>") + + + + + + + + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7de5 + + . + + + + + + $body/direct:EjecutaTRXResponse + + + $backupBody/nat:createCustomerRelationship_Rq + + + fn-bea:inlinedXML($dvm) + + + + + + + + + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7de1 + + nat:createCustomerRelationship_Rs + body + + ./nat:createCustomerRelationship_Rs + + + + + + + + + request-a7c048f.N15255722.0.157c4111c0e.N7e53 + response-a7c048f.N15255722.0.157c4111c0e.N7e4f + + + request-N3f579cff.77e31d8c.0.156c73c5fb5.N7f1a + response-N3f579cff.77e31d8c.0.156c73c5fb5.N7f19 + + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7ef9 + + CallVBAny + + + + + + + + proxyName + backupHeader + backupBody + + + \ No newline at end of file diff --git a/AS400NaturalCustomerInAppSvc/operations/createCustomerRelationship/xq/AS400NaturalCustomerInAppSvc_createCustomerRelationship_CanonicalToInput.xqy b/AS400NaturalCustomerInAppSvc/operations/createCustomerRelationship/xq/AS400NaturalCustomerInAppSvc_createCustomerRelationship_CanonicalToInput.xqy new file mode 100644 index 0000000..9d66108 --- /dev/null +++ b/AS400NaturalCustomerInAppSvc/operations/createCustomerRelationship/xq/AS400NaturalCustomerInAppSvc_createCustomerRelationship_CanonicalToInput.xqy @@ -0,0 +1,234 @@ +xquery version "1.0" encoding "utf-8"; + +(:: OracleAnnotationVersion "1.0" ::) + +declare namespace ns6="http://Obi_Wan/EjecutaTRX"; +(:: import schema at "../xsd/AS400NaturalCustomerInAppSvc_createCustomerRelationship.xsd" ::) +declare namespace ns29="http://xmlns.banesco.com/Service/NaturalCustomerMgmtSvc"; +(:: import schema at "../../../../BanescoCommonArtifacts/xsd/canonical/Services/NaturalCustomerMgmtSvc.xsd" ::) + +declare namespace ns25 = "http://xmlns.banesco.com/EnterpriseObjects/Addr"; +declare namespace ns26 = "http://xmlns.banesco.com/EnterpriseObjects/MsgRqHdr"; +declare namespace ns27 = "http://xmlns.banesco.com/EnterpriseObjects/Status"; +declare namespace ns28 = "http://xmlns.banesco.com/EnterpriseObjects/TradeRegistry"; +declare namespace ns21 = "http://xmlns.banesco.com/EnterpriseObjects/PersonInfo_v2.0"; +declare namespace ns22 = "http://xmlns.banesco.com/EnterpriseObjects/EmploymentData_v2.0"; +declare namespace ns23 = "http://xmlns.banesco.com/EnterpriseObjects/Addr_v2.0"; +declare namespace ns24 = "http://xmlns.banesco.com/EnterpriseObjects/Service"; +declare namespace ns20 = "http://xmlns.banesco.com/EnterpriseObjects/Taxes_v2.0"; +declare namespace xf = "http://tempuri.org/AS400NaturalCustomerInAppSvc/operations/createCustomerRelationship/xq/AS400NaturalCustomerInAppSvc_createCustomerRelationship_CanonicalToInput/"; +declare namespace ns16 = "http://xmlns.banesco.com/EnterpriseObjects/ContactInfo_v2.0"; +declare namespace ns17 = "http://xmlns.banesco.com/EnterpriseObjects/CommonComplexType"; +declare namespace ns14 = "http://xmlns.banesco.com/EnterpriseObjects/Product"; +declare namespace ns15 = "http://xmlns.banesco.com/EnterpriseObjects/PersonName"; +declare namespace ns18 = "http://xmlns.banesco.com/EnterpriseObjects/Banking"; +declare namespace ns19 = "http://xmlns.banesco.com/EnterpriseObjects/NaturalCustomer"; +declare namespace ns9 = "http://xmlns.banesco.com/EnterpriseObjects/Organization"; +declare namespace ns32 = "http://xmlns.banesco.com/EnterpriseObjects/PersonInfo"; +declare namespace ns33 = "http://xmlns.banesco.com/EnterpriseObjects/Score"; +declare namespace ns30 = "http://xmlns.banesco.com/Service/MessageEnrichUtilMgmtSvc"; +declare namespace ns12 = "http://xmlns.banesco.com/EnterpriseObjects/Organization_v2.0"; +declare namespace ns5 = "http://xmlns.banesco.com/EnterpriseObjects/Contact"; +declare namespace ns13 = "http://xmlns.banesco.com/EnterpriseObjects/Chk"; +declare namespace ns31 = "http://xmlns.banesco.com/EnterpriseObjects/AffiliationSvc"; +declare namespace ns7 = "http://xmlns.banesco.com/EnterpriseObjects/Risk"; +declare namespace ns10 = "http://xmlns.banesco.com/EnterpriseObjects/Ref_v2.0"; +declare namespace ns8 = "http://xmlns.banesco.com/EnterpriseObjects/Investment"; +declare namespace ns11 = "http://xmlns.banesco.com/EnterpriseObjects/Loan"; +declare namespace ns2 = "http://xmlns.banesco.com/EnterpriseObjects/Fee"; +declare namespace ns1 = "http://xmlns.banesco.com/EnterpriseObjects/RegulatoryInfo"; +declare namespace ns4 = "http://xmlns.banesco.com/EnterpriseObjects/Bankinfo"; +declare namespace ns3 = "http://xmlns.banesco.com/EnterpriseObjects/FinancialInfo"; +declare namespace ns0 = "http://xmlns.banesco.com/EnterpriseObjects/CustVerificationList"; + +import module namespace xqu="http://xmlns.banesco.com/xquey-functions" at "../../../../BanescoCommonArtifacts/xq/libraries/AS400Util.xqy", "../../../../BanescoCommonArtifacts/xq/libraries/dateTimeUtil.xqy"; + +declare function xf:AS400NaturalCustomerInAppSvc_createCustomerRelationship_CanonicalToInput($createCustomerRelationship_Rq1 as element(ns29:createCustomerRelationship_Rq), + $readDVM_Rs1 as element(ns30:readDVM_Rs)) + as element(ns6:EjecutaTRX) { + + { data($createCustomerRelationship_Rq1/ns29:MsgRqHdr/ns26:OperatorCode) } + { data($createCustomerRelationship_Rq1/ns29:MsgRqHdr/ns26:NetworkTrnInfo/ns26:AgencyCode) } + { data($readDVM_Rs1/ns30:Outputs/ns30:Output[1]/ns30:Attributes/ns30:Attribute[./ns30:Name='INDLINEA']/ns30:Value) } + { data($readDVM_Rs1/ns30:Outputs/ns30:Output[1]/ns30:Attributes/ns30:Attribute[./ns30:Name='CRITREV']/ns30:Value) } + { data($readDVM_Rs1/ns30:Outputs/ns30:Output[1]/ns30:Attributes/ns30:Attribute[./ns30:Name='INDCONT']/ns30:Value) } + { data($createCustomerRelationship_Rq1/ns29:MsgRqHdr/ns26:NetworkTrnInfo/ns26:BankId) } + { data($createCustomerRelationship_Rq1/ns29:MsgRqHdr/ns26:SourceChannelCode) } + { data($createCustomerRelationship_Rq1/ns29:MsgRqHdr/ns26:NetworkTrnInfo/ns26:ChannelUserId) } + + { xqu:day-from-date-leftpadding(data($createCustomerRelationship_Rq1/ns29:MsgRqHdr/ns26:NetworkTrnInfo/ns26:TransactionDate)) } + { xqu:month-from-date-leftpadding(data($createCustomerRelationship_Rq1/ns29:MsgRqHdr/ns26:NetworkTrnInfo/ns26:TransactionDate)) } + { xqu:year-from-date-leftpadding(data($createCustomerRelationship_Rq1/ns29:MsgRqHdr/ns26:NetworkTrnInfo/ns26:TransactionDate)) } + + + { xqu:hours-from-time-leftpadding(data($createCustomerRelationship_Rq1/ns29:MsgRqHdr/ns26:NetworkTrnInfo/ns26:TransactionTime)) } + { xqu:minutes-from-time-leftpadding(data($createCustomerRelationship_Rq1/ns29:MsgRqHdr/ns26:NetworkTrnInfo/ns26:TransactionTime)) } + { xqu:seconds-from-time-leftpadding(data($createCustomerRelationship_Rq1/ns29:MsgRqHdr/ns26:NetworkTrnInfo/ns26:TransactionTime)) } + + + + { + (:Caso VB8930_Reg2008:) + if(data($readDVM_Rs1/ns30:Outputs/ns30:Output[1]/ns30:Attributes/ns30:Attribute[./ns30:Name='NUMREG']/ns30:Value)='2008')then( + for $CustRelInfo in $createCustomerRelationship_Rq1/ns29:NaturalCustomer/ns19:CustRelInfo + return + + { data($createCustomerRelationship_Rq1/ns29:NaturalCustomer/ns19:CustId/ns19:CustPermId) } + { data($createCustomerRelationship_Rq1/ns29:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo/ns21:GovIssueIdent/ns21:IdentSerialNumPrefix) } + { data($createCustomerRelationship_Rq1/ns29:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo/ns21:GovIssueIdent/ns21:IdentSerialNum) } + { data($CustRelInfo/ns19:CustRelType) } + { data($CustRelInfo/ns19:CustPermId) } + { data($CustRelInfo/ns19:IdentDoc/ns19:IdentSerialNumPrefix) } + { data($CustRelInfo/ns19:IdentDoc/ns19:IdentSerialNum) } + { data($CustRelInfo/ns19:RelId/ns19:CustRelIdType) } + + { + for $StartDt in $CustRelInfo/ns19:StartDt + return + if(data($StartDt)!='')then( + xqu:date-to-rafagaYYYYMMDD(data($StartDt)) + )else() + } + + + { + for $EndDt in $CustRelInfo/ns19:EndDt + return + if(data($EndDt)!='')then( + xqu:date-to-rafagaYYYYMMDD(data($EndDt)) + )else() + } + + { data($CustRelInfo/ns19:RelCons) } + + )else if(data($readDVM_Rs1/ns30:Outputs/ns30:Output[1]/ns30:Attributes/ns30:Attribute[./ns30:Name='NUMREG']/ns30:Value)='1124')then( + (:Caso VB1840_Reg1124:) + for $CustRelInfo in $createCustomerRelationship_Rq1/ns29:NaturalCustomer/ns19:CustRelInfo + return + + { data($createCustomerRelationship_Rq1/ns29:NaturalCustomer/ns19:CustId/ns19:CustPermId) } + { data($CustRelInfo/ns19:IdentDoc/ns19:IdentSerialNumPrefix) } + { data($CustRelInfo/ns19:IdentDoc/ns19:IdentSerialNum) } + { xqu:date-to-rafagaDDMMYYYY(data($CustRelInfo/ns19:StartDt)) } + { data($CustRelInfo/ns19:CustRelType) } + { data($CustRelInfo/ns19:PersonInfo/ns21:FullName) } + + { + for $PhoneNum in ($CustRelInfo/ns19:ContactInfo/ns16:PhoneNum) + return + if (upper-case(data($PhoneNum/ns16:PhoneType)) = 'OTROS') then + (data($PhoneNum/ns16:Phone)) + else + () + } + + { xqu:date-to-rafagaDDMMYYYY(data($CustRelInfo/ns19:Ref/ns10:IssueDt)) } + { data($CustRelInfo/ns19:RelFrom) } + { data($CustRelInfo/ns19:RelId/ns19:CustRelId) } + { data($CustRelInfo/ns19:IdentDoc/ns19:Type) } + U + + { + for $PhoneNum in ($CustRelInfo/ns19:ContactInfo/ns16:PhoneNum) + return + if (upper-case(data($PhoneNum/ns16:PhoneType)) = 'CELULAR') then + (data($PhoneNum/ns16:Phone)) + else + () + } + + { data($createCustomerRelationship_Rq1/ns29:NaturalCustomer/ns19:Addr/ns23:StateProv) } + { data($createCustomerRelationship_Rq1/ns29:NaturalCustomer/ns19:Addr/ns23:Country) } + + )else if(data($readDVM_Rs1/ns30:Outputs/ns30:Output[1]/ns30:Attributes/ns30:Attribute[./ns30:Name='NUMREG']/ns30:Value)='1125')then( + (:Caso VB1841_Reg1125:) + for $CustRelInfo in $createCustomerRelationship_Rq1/ns29:NaturalCustomer/ns19:CustRelInfo + return + + { data($createCustomerRelationship_Rq1/ns29:NaturalCustomer/ns19:CustId/ns19:CustPermId) } + { data($createCustomerRelationship_Rq1/ns29:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo/ns21:GovIssueIdent/ns21:IdentSerialNumPrefix) } + { data($createCustomerRelationship_Rq1/ns29:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo/ns21:GovIssueIdent/ns21:IdentSerialNum) } + { data($CustRelInfo/ns19:Ref/ns10:ProductId) } + { xqu:date-to-rafagaDDMMYYYY(data($CustRelInfo/ns19:StartDt)) } + { data($CustRelInfo/ns19:Ref/ns10:IssuingIdent/ns10:Name) } + { data($CustRelInfo/ns19:Ref/ns10:AverageAmount) } + { data($CustRelInfo/ns19:Ref/ns10:AverageAmountDesc) } + { xqu:date-to-rafagaDDMMYYYY(data($CustRelInfo/ns19:Ref/ns10:IssueDt)) } + { data($CustRelInfo/ns19:RelFrom) } + { data($CustRelInfo/ns19:RelId/ns19:CustRelId) } + U + { data($CustRelInfo/ns19:Ref/ns10:ProdDesc) } + + )else if(data($readDVM_Rs1/ns30:Outputs/ns30:Output[1]/ns30:Attributes/ns30:Attribute[./ns30:Name='NUMREG']/ns30:Value)='1127')then( + (:Caso VB1843_Reg1127:) + + { data($createCustomerRelationship_Rq1/ns29:NaturalCustomer/ns19:CustId/ns19:CustPermId) } + { data($createCustomerRelationship_Rq1/ns29:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo/ns21:GovIssueIdent/ns21:IdentSerialNumPrefix) } + { data($createCustomerRelationship_Rq1/ns29:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo/ns21:GovIssueIdent/ns21:IdentSerialNum) } + { data($createCustomerRelationship_Rq1/ns29:NaturalCustomer/ns19:CustRelInfo/ns19:CustRelType) } + { data($createCustomerRelationship_Rq1/ns29:NaturalCustomer/ns19:CustRelInfo/ns19:OrgInfo/ns19:TradeRegistry/ns19:RegistryName) } + { data($createCustomerRelationship_Rq1/ns29:NaturalCustomer/ns19:CustRelInfo/ns19:OrgInfo/ns19:TradeRegistry/ns19:RegistryNum) } + { data($createCustomerRelationship_Rq1/ns29:NaturalCustomer/ns19:CustRelInfo/ns19:OrgInfo/ns19:TradeRegistry/ns19:Volume) } + { data($createCustomerRelationship_Rq1/ns29:NaturalCustomer/ns19:CustRelInfo/ns19:OrgInfo/ns19:TradeRegistry/ns19:FolioNumber) } + { xqu:date-to-rafagaDDMMYYYY(data($createCustomerRelationship_Rq1/ns29:NaturalCustomer/ns19:CustRelInfo/ns19:OrgInfo/ns19:TradeRegistry/ns19:RegistryDt)) } + { xqu:date-to-rafagaDDMMYYYY(data($createCustomerRelationship_Rq1/ns29:NaturalCustomer/ns19:CustRelInfo/ns19:OrgInfo/ns19:TradeRegistry/ns19:RegistryExpDt)) } + M + + )else if(data($readDVM_Rs1/ns30:Outputs/ns30:Output[1]/ns30:Attributes/ns30:Attribute[./ns30:Name='NUMREG']/ns30:Value)='1137')then( + (:Caso VB1852_Reg1137:) + for $CustRelInfo in $createCustomerRelationship_Rq1/ns29:NaturalCustomer/ns19:CustRelInfo + return + + { data($createCustomerRelationship_Rq1/ns29:NaturalCustomer/ns19:CustId[1]/ns19:CustPermId) } + { data($createCustomerRelationship_Rq1/ns29:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:GovIssueIdent[1]/ns21:IdentSerialNumPrefix) } + { data($createCustomerRelationship_Rq1/ns29:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:GovIssueIdent[1]/ns21:IdentSerialNum) } + { data($CustRelInfo/ns19:CustRelType) } + { data($CustRelInfo/ns19:IdentDoc[1]/ns19:IdentSerialNumPrefix) } + { data($CustRelInfo/ns19:IdentDoc[1]/ns19:IdentSerialNum) } + { data($CustRelInfo/ns19:CustPermId) } + { data($CustRelInfo/ns19:OrgInfo[1]/ns19:LegalName) } + { data($createCustomerRelationship_Rq1/ns29:NaturalCustomer/ns19:EmploymentData[1]/ns22:JobTitle) } + { data($createCustomerRelationship_Rq1/ns29:NaturalCustomer/ns19:EmploymentData[1]/ns22:Country) } + { data($createCustomerRelationship_Rq1/ns29:NaturalCustomer/ns19:CustRelInfo[1]/ns19:RelCons) } + { data($createCustomerRelationship_Rq1/ns29:MsgRqHdr/ns26:RequestedOperationType) } + + )else( + (:Continuar aqui para otros casos de VB y Registro. Validar cada caso con if:) + ) + + } + + + +}; + +declare variable $createCustomerRelationship_Rq1 as element(ns29:createCustomerRelationship_Rq) external; +declare variable $readDVM_Rs1 as element(ns30:readDVM_Rs) external; + +xf:AS400NaturalCustomerInAppSvc_createCustomerRelationship_CanonicalToInput($createCustomerRelationship_Rq1, + $readDVM_Rs1) \ No newline at end of file diff --git a/AS400NaturalCustomerInAppSvc/operations/createCustomerRelationship/xq/AS400NaturalCustomerInAppSvc_createCustomerRelationship_InputToCanonical.xqy b/AS400NaturalCustomerInAppSvc/operations/createCustomerRelationship/xq/AS400NaturalCustomerInAppSvc_createCustomerRelationship_InputToCanonical.xqy new file mode 100644 index 0000000..9a660e0 --- /dev/null +++ b/AS400NaturalCustomerInAppSvc/operations/createCustomerRelationship/xq/AS400NaturalCustomerInAppSvc_createCustomerRelationship_InputToCanonical.xqy @@ -0,0 +1,106 @@ +xquery version "1.0" encoding "utf-8"; + +(:: OracleAnnotationVersion "1.0" ::) + +declare namespace ns7="http://Obi_Wan/EjecutaTRX"; +(:: import schema at "../xsd/AS400NaturalCustomerInAppSvc_createCustomerRelationship.xsd" ::) +declare namespace ns30="http://xmlns.banesco.com/Service/NaturalCustomerMgmtSvc"; +(:: import schema at "../../../../BanescoCommonArtifacts/xsd/canonical/Services/NaturalCustomerMgmtSvc.xsd" ::) + +declare namespace ns29 = "http://xmlns.banesco.com/EnterpriseObjects/TradeRegistry"; +declare namespace ns25 = "http://xmlns.banesco.com/EnterpriseObjects/Service"; +declare namespace ns26 = "http://xmlns.banesco.com/EnterpriseObjects/Addr"; +declare namespace ns27 = "http://xmlns.banesco.com/EnterpriseObjects/MsgRqHdr"; +declare namespace ns28 = "http://xmlns.banesco.com/EnterpriseObjects/Status"; +declare namespace ns21 = "http://xmlns.banesco.com/EnterpriseObjects/PersonInfo_v2.0"; +declare namespace ns22 = "http://xmlns.banesco.com/EnterpriseObjects/EmploymentData_v2.0"; +declare namespace ns23 = "http://xmlns.banesco.com/EnterpriseObjects/MsgRsHdr"; +declare namespace ns24 = "http://xmlns.banesco.com/EnterpriseObjects/Addr_v2.0"; +declare namespace ns20 = "http://xmlns.banesco.com/EnterpriseObjects/Taxes_v2.0"; +declare namespace xf = "http://tempuri.org/AS400NaturalCustomerInAppSvc/operations/createCustomerRelationship/xq/AS400NaturalCustomerInAppSvc_createCustomerRelationship_InputToCanonical/"; +declare namespace ns16 = "http://xmlns.banesco.com/EnterpriseObjects/ContactInfo_v2.0"; +declare namespace ns17 = "http://xmlns.banesco.com/EnterpriseObjects/CommonComplexType"; +declare namespace ns14 = "http://xmlns.banesco.com/EnterpriseObjects/Product"; +declare namespace ns15 = "http://xmlns.banesco.com/EnterpriseObjects/PersonName"; +declare namespace ns18 = "http://xmlns.banesco.com/EnterpriseObjects/Banking"; +declare namespace ns19 = "http://xmlns.banesco.com/EnterpriseObjects/NaturalCustomer"; +declare namespace ns9 = "http://xmlns.banesco.com/EnterpriseObjects/Organization"; +declare namespace ns32 = "http://xmlns.banesco.com/EnterpriseObjects/PersonInfo"; +declare namespace ns33 = "http://xmlns.banesco.com/EnterpriseObjects/Score"; +declare namespace ns12 = "http://xmlns.banesco.com/EnterpriseObjects/Organization_v2.0"; +declare namespace ns5 = "http://xmlns.banesco.com/EnterpriseObjects/Contact"; +declare namespace ns13 = "http://xmlns.banesco.com/EnterpriseObjects/Chk"; +declare namespace ns31 = "http://xmlns.banesco.com/EnterpriseObjects/AffiliationSvc"; +declare namespace ns6 = "http://xmlns.banesco.com/EnterpriseObjects/Risk"; +declare namespace ns10 = "http://xmlns.banesco.com/EnterpriseObjects/Ref_v2.0"; +declare namespace ns8 = "http://xmlns.banesco.com/EnterpriseObjects/Investment"; +declare namespace ns11 = "http://xmlns.banesco.com/EnterpriseObjects/Loan"; +declare namespace ns2 = "http://xmlns.banesco.com/EnterpriseObjects/Fee"; +declare namespace ns1 = "http://xmlns.banesco.com/EnterpriseObjects/RegulatoryInfo"; +declare namespace ns4 = "http://xmlns.banesco.com/EnterpriseObjects/Bankinfo"; +declare namespace ns3 = "http://xmlns.banesco.com/EnterpriseObjects/FinancialInfo"; +declare namespace ns0 = "http://xmlns.banesco.com/EnterpriseObjects/CustVerificationList"; + +declare namespace stat = "http://xmlns.banesco.com/EnterpriseObjects/Status"; + +import module namespace xqu="http://xmlns.banesco.com/xquey-functions" at "../../../../BanescoCommonArtifacts/xq/libraries/AS400Util.xqy", "../../../../BanescoCommonArtifacts/xq/libraries/dateTimeUtil.xqy"; + +declare function xf:AS400NaturalCustomerInAppSvc_createCustomerRelationship_InputToCanonical($ejecutaTRXResponse1 as element(ns7:EjecutaTRXResponse), + $createCustomerRelationship_Rq1 as element(ns30:createCustomerRelationship_Rq), + $dvm as element(*)) + as element(ns30:createCustomerRelationship_Rs) { + + + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/@NUMREG) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/@NOCDTOSAL) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/@CODTRN) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/@CODSUP) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/@TIPOPER) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/@CONTRN) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/@DSCREG) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/@NUMREG) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/@TIPTRN) } + { data($createCustomerRelationship_Rq1/ns30:MsgRqHdr/ns27:RequestId) } + AS400 + + { + if(fn:boolean(data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:CODERR1)) or + fn:boolean(data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:CODERR2)) or + fn:boolean(data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:CODERR3)) or + fn:boolean(data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:CODERR4)) or + fn:boolean(data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/ns7:Respuesta[1]/ns7:MSJERR)))then( + (:Caso Fallido:) + + {xqu:get-status($ejecutaTRXResponse1, $dvm)/*} + + )else if(data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/@NUMREG)="0001")then( + (: Caso Exito sin data - VB1840_Reg1124, VB1841_Reg1125, VB1843_Reg1127 :) + + OK + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/@DSCREG) } + + )else if(data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/@NUMREG)="2008")then( + (:Caso VB8931_Reg2008:) + + + { + for $CONS in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:CONS + return + { data($CONS) } + } + + + )else( + (:Continuar aqui para otros casos de VB y Registro. Seguir anidando con else if como el anterior:) + ) + } + +}; + +declare variable $ejecutaTRXResponse1 as element(ns7:EjecutaTRXResponse) external; +declare variable $createCustomerRelationship_Rq1 as element(ns30:createCustomerRelationship_Rq) external; +declare variable $dvm as element(*) external; + +xf:AS400NaturalCustomerInAppSvc_createCustomerRelationship_InputToCanonical($ejecutaTRXResponse1, + $createCustomerRelationship_Rq1, + $dvm) \ No newline at end of file diff --git a/AS400NaturalCustomerInAppSvc/operations/createCustomerRelationship/xsd/AS400NaturalCustomerInAppSvc_createCustomerRelationship.xsd b/AS400NaturalCustomerInAppSvc/operations/createCustomerRelationship/xsd/AS400NaturalCustomerInAppSvc_createCustomerRelationship.xsd new file mode 100644 index 0000000..fc22b58 --- /dev/null +++ b/AS400NaturalCustomerInAppSvc/operations/createCustomerRelationship/xsd/AS400NaturalCustomerInAppSvc_createCustomerRelationship.xsd @@ -0,0 +1,329 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/AS400NaturalCustomerInAppSvc/operations/deleteCustomerRelationship/proxy/AS400NaturalCustomerInAppSvc_deleteCustomerRelationship.pipeline b/AS400NaturalCustomerInAppSvc/operations/deleteCustomerRelationship/proxy/AS400NaturalCustomerInAppSvc_deleteCustomerRelationship.pipeline new file mode 100644 index 0000000..0bbeb04 --- /dev/null +++ b/AS400NaturalCustomerInAppSvc/operations/deleteCustomerRelationship/proxy/AS400NaturalCustomerInAppSvc_deleteCustomerRelationship.pipeline @@ -0,0 +1,214 @@ + + + + + + + AS400NaturalCustomerInAppSvcSOAP + http://xmlns.banesco.com/ApplicationService/AS400NaturalCustomerInAppSvc + + + + 1.0 + + + + + + + + nat:deleteCustomerRelationship_Rq + + ./nat:deleteCustomerRelationship_Rq + + + + + + + + + + + + + + + $body/nat:deleteCustomerRelationship_Rq/nat:MsgRqHdr + + + + + + + + + + + + + + + + + $dvmResponse + + + $body/nat:deleteCustomerRelationship_Rq + + + + + + + + + + + + + + + + + $body/direct:EjecutaTRX + + + $backupBody/nat:deleteCustomerRelationship_Rq/nat:MsgRqHdr + + + + + + + + http://xmlns.banesco.com/Service/NaturalCustomerMgmtSvc + + + + + http://xmlns.banesco.com/Service/NaturalCustomerMgmtSvc + + + + + + + + + + + ejec:EjecutaTRX + + + + + + ejec:EjecutaTRXResponse + + + + + + + + + "DVM_RESPONSE_CODE" + + + "VC" + + + $body/direct:EjecutaTRXResponse/direct:EjecutaTRXResult/direct:TRXSResults/direct:Respuestas[1]/direct:Respuesta[1]/@NUMREG + + + $backupBody/nat:deleteCustomerRelationship_Rq/nat:MsgRqHdr + + + "AS400" + + + + + + + + + + + + "DVM_MESSAGE_ERROR" + + + "MESSAGE" + + + $errors + + + $backupBody/nat:deleteCustomerRelationship_Rq/nat:MsgRqHdr + + + "AS400" + + + + + + + + + + + + + + + + + $body/direct:EjecutaTRXResponse + + + fn-bea:inlinedXML($dvm) + + + $backupBody/nat:deleteCustomerRelationship_Rq + + + + + + + + + + + + + + + nat:deleteCustomerRelationship_Rs + + ./nat:deleteCustomerRelationship_Rs + + + + + + + + + + + http://xmlns.banesco.com/Service/NaturalCustomerMgmtSvc + + + + + http://xmlns.banesco.com/Service/NaturalCustomerMgmtSvc + + + + + + \ No newline at end of file diff --git a/AS400NaturalCustomerInAppSvc/operations/deleteCustomerRelationship/xq/AS400NaturalCustomerInAppSvc_deleteCustomerRelationship_CanonicalToInput.xqy b/AS400NaturalCustomerInAppSvc/operations/deleteCustomerRelationship/xq/AS400NaturalCustomerInAppSvc_deleteCustomerRelationship_CanonicalToInput.xqy new file mode 100644 index 0000000..6a14088 --- /dev/null +++ b/AS400NaturalCustomerInAppSvc/operations/deleteCustomerRelationship/xq/AS400NaturalCustomerInAppSvc_deleteCustomerRelationship_CanonicalToInput.xqy @@ -0,0 +1,197 @@ +xquery version "1.0" encoding "utf-8"; + +(:: OracleAnnotationVersion "1.0" ::) + +declare namespace ns6="http://Obi_Wan/EjecutaTRX"; +(:: import schema at "../xsd/AS400NaturalCustomerInAppSvc_deleteCustomerRelationship.xsd" ::) +declare namespace ns30="http://xmlns.banesco.com/Service/NaturalCustomerMgmtSvc"; +(:: import schema at "../../../../BanescoCommonArtifacts/xsd/canonical/Services/NaturalCustomerMgmtSvc.xsd" ::) + +declare namespace ns29 = "http://xmlns.banesco.com/EnterpriseObjects/TradeRegistry"; +declare namespace ns25 = "http://xmlns.banesco.com/EnterpriseObjects/Service"; +declare namespace ns26 = "http://xmlns.banesco.com/EnterpriseObjects/Addr"; +declare namespace ns27 = "http://xmlns.banesco.com/EnterpriseObjects/MsgRqHdr"; +declare namespace ns28 = "http://xmlns.banesco.com/EnterpriseObjects/Status"; +declare namespace ns21 = "http://xmlns.banesco.com/EnterpriseObjects/Taxes_v2.0"; +declare namespace ns22 = "http://xmlns.banesco.com/EnterpriseObjects/PersonInfo_v2.0"; +declare namespace ns23 = "http://xmlns.banesco.com/EnterpriseObjects/EmploymentData_v2.0"; +declare namespace ns24 = "http://xmlns.banesco.com/EnterpriseObjects/Addr_v2.0"; +declare namespace ns20 = "http://xmlns.banesco.com/EnterpriseObjects/NaturalCustomer"; +declare namespace xf = "http://tempuri.org/AS400NaturalCustomerInAppSvc/operations/deleteCustomerRelationship/xq/AS400NaturalCustomerInAppSvc_deleteCustomerRelationship_CanonicalToInput/"; +declare namespace ns16 = "http://xmlns.banesco.com/EnterpriseObjects/ContactInfo_v2.0"; +declare namespace ns17 = "http://xmlns.banesco.com/EnterpriseObjects/CommonComplexType"; +declare namespace ns14 = "http://xmlns.banesco.com/EnterpriseObjects/Product"; +declare namespace ns15 = "http://xmlns.banesco.com/EnterpriseObjects/PersonName"; +declare namespace ns18 = "http://xmlns.banesco.com/EnterpriseObjects/User"; +declare namespace ns19 = "http://xmlns.banesco.com/EnterpriseObjects/Banking"; +declare namespace ns34 = "http://xmlns.banesco.com/EnterpriseObjects/Score"; +declare namespace ns9 = "http://xmlns.banesco.com/EnterpriseObjects/Organization"; +declare namespace ns32 = "http://xmlns.banesco.com/EnterpriseObjects/AffiliationSvc"; +declare namespace ns33 = "http://xmlns.banesco.com/EnterpriseObjects/PersonInfo"; +declare namespace ns12 = "http://xmlns.banesco.com/EnterpriseObjects/Organization_v2.0"; +declare namespace ns5 = "http://xmlns.banesco.com/EnterpriseObjects/Contact"; +declare namespace ns13 = "http://xmlns.banesco.com/EnterpriseObjects/Chk"; +declare namespace ns31 = "http://xmlns.banesco.com/Service/MessageEnrichUtilMgmtSvc"; +declare namespace ns7 = "http://xmlns.banesco.com/EnterpriseObjects/Risk"; +declare namespace ns10 = "http://xmlns.banesco.com/EnterpriseObjects/Ref_v2.0"; +declare namespace ns8 = "http://xmlns.banesco.com/EnterpriseObjects/Investment"; +declare namespace ns11 = "http://xmlns.banesco.com/EnterpriseObjects/Loan"; +declare namespace ns2 = "http://xmlns.banesco.com/EnterpriseObjects/Fee"; +declare namespace ns1 = "http://xmlns.banesco.com/EnterpriseObjects/RegulatoryInfo"; +declare namespace ns4 = "http://xmlns.banesco.com/EnterpriseObjects/Bankinfo"; +declare namespace ns3 = "http://xmlns.banesco.com/EnterpriseObjects/FinancialInfo"; +declare namespace ns0 = "http://xmlns.banesco.com/EnterpriseObjects/CustVerificationList"; + +import module namespace xqu="http://xmlns.banesco.com/xquey-functions" at "../../../../BanescoCommonArtifacts/xq/libraries/AS400Util.xqy", "../../../../BanescoCommonArtifacts/xq/libraries/dateTimeUtil.xqy"; + +declare function xf:AS400NaturalCustomerInAppSvc_deleteCustomerRelationship_CanonicalToInput($deleteCustomerRelationship_Rq1 as element(ns30:deleteCustomerRelationship_Rq), + $readDVM_Rs1 as element(ns31:readDVM_Rs)) + as element(ns6:EjecutaTRX) { + + { data($deleteCustomerRelationship_Rq1/ns30:MsgRqHdr/ns27:RequestId) } + { data($deleteCustomerRelationship_Rq1/ns30:MsgRqHdr/ns27:OperatorCode) } + { data($deleteCustomerRelationship_Rq1/ns30:MsgRqHdr/ns27:NetworkTrnInfo[1]/ns27:AgencyCode) } + + { xqu:day-from-date-leftpadding(data($deleteCustomerRelationship_Rq1/ns30:MsgRqHdr/ns27:NetworkTrnInfo[1]/ns27:TransactionDate)) } + { xqu:month-from-date-leftpadding(data($deleteCustomerRelationship_Rq1/ns30:MsgRqHdr/ns27:NetworkTrnInfo[1]/ns27:TransactionDate)) } + { xqu:year-from-date-leftpadding(data($deleteCustomerRelationship_Rq1/ns30:MsgRqHdr/ns27:NetworkTrnInfo[1]/ns27:TransactionDate)) } + + + { xqu:hours-from-time-leftpadding(data($deleteCustomerRelationship_Rq1/ns30:MsgRqHdr/ns27:NetworkTrnInfo[1]/ns27:TransactionTime)) } + { xqu:minutes-from-time-leftpadding(data($deleteCustomerRelationship_Rq1/ns30:MsgRqHdr/ns27:NetworkTrnInfo[1]/ns27:TransactionTime)) } + { xqu:seconds-from-time-leftpadding(data($deleteCustomerRelationship_Rq1/ns30:MsgRqHdr/ns27:NetworkTrnInfo[1]/ns27:TransactionTime)) } + + { data($readDVM_Rs1/ns31:Outputs/ns31:Output[1]/ns31:Attributes/ns31:Attribute[./ns31:Name='INDLINEA']/ns31:Value) } + { data($readDVM_Rs1/ns31:Outputs/ns31:Output[1]/ns31:Attributes/ns31:Attribute[./ns31:Name='CRITREV']/ns31:Value) } + { data($readDVM_Rs1/ns31:Outputs/ns31:Output[1]/ns31:Attributes/ns31:Attribute[./ns31:Name='INDCONT']/ns31:Value) } + { data($deleteCustomerRelationship_Rq1/ns30:MsgRqHdr/ns27:NetworkTrnInfo[1]/ns27:BankId) } + { data($deleteCustomerRelationship_Rq1/ns30:MsgRqHdr/ns27:SourceChannelCode) } + { data($deleteCustomerRelationship_Rq1/ns30:MsgRqHdr/ns27:NetworkTrnInfo[1]/ns27:ChannelUserId) } + + + { + if(data($readDVM_Rs1/ns31:Outputs/ns31:Output[1]/ns31:Attributes/ns31:Attribute[./ns31:Name='NUMREG']/ns31:Value)='1124')then( + (: Caso VB1840_Reg1124 Eliminar referencias personales :) + for $CustRelInfo in $deleteCustomerRelationship_Rq1/ns30:NaturalCustomer/ns20:CustRelInfo + return + + { data($deleteCustomerRelationship_Rq1/ns30:NaturalCustomer/ns20:CustId[1]/ns20:CustPermId) } + { data($CustRelInfo/ns20:IdentDoc[1]/ns20:IdentSerialNumPrefix) } + { data($CustRelInfo/ns20:IdentDoc[1]/ns20:IdentSerialNum) } + + { + if(data($CustRelInfo/ns20:StartDt)!='')then( + xqu:date-to-rafagaDDMMYYYY(data($CustRelInfo/ns20:StartDt)) + )else() + } + + { data($CustRelInfo/ns20:CustRelType) } + { data($CustRelInfo/ns20:PersonInfo[1]/ns22:FullName) } + { data($CustRelInfo/ns20:ContactInfo[1]/ns16:PhoneNum[./ns16:PhoneType='Otros']/ns16:Phone) } + + { + if(data($CustRelInfo/ns20:Ref[1]/ns10:IssueDt)!='')then( + xqu:date-to-rafagaDDMMYYYY(data($CustRelInfo/ns20:Ref[1]/ns10:IssueDt)) + )else() + } + + { data($CustRelInfo/ns20:RelFrom) } + { data($CustRelInfo/ns20:RelId[1]/ns20:CustRelId) } + { data($CustRelInfo/ns20:IdentDoc[1]/ns20:Type) } + E + { data($CustRelInfo/ns20:ContactInfo[1]/ns16:PhoneNum[./ns16:PhoneType='Celular']/ns16:Phone) } + { data($CustRelInfo/ns20:Addr[1]/ns20:StateProv) } + { data($CustRelInfo/ns20:Addr[1]/ns20:Country) } + + )else if(data($readDVM_Rs1/ns31:Outputs/ns31:Output[1]/ns31:Attributes/ns31:Attribute[./ns31:Name='NUMREG']/ns31:Value)='1125')then( + (: Caso VB1841_Reg1125 Eliminar referencias bancarias :) + for $CustRelInfo in $deleteCustomerRelationship_Rq1/ns30:NaturalCustomer/ns20:CustRelInfo + return + + { data($deleteCustomerRelationship_Rq1/ns30:NaturalCustomer/ns20:CustId[1]/ns20:CustPermId) } + { data($deleteCustomerRelationship_Rq1/ns30:NaturalCustomer/ns20:CustInfo/ns20:PersonInfo[1]/ns22:GovIssueIdent[1]/ns22:IdentSerialNumPrefix) } + { data($deleteCustomerRelationship_Rq1/ns30:NaturalCustomer/ns20:CustInfo/ns20:PersonInfo[1]/ns22:GovIssueIdent[1]/ns22:IdentSerialNum) } + { data($CustRelInfo/ns20:Ref[1]/ns10:ProductId) } + + { + if(data($CustRelInfo/ns20:StartDt)!='')then( + xqu:date-to-rafagaDDMMYYYY(data($CustRelInfo/ns20:StartDt)) + )else() + } + + { data($CustRelInfo/ns20:Ref[1]/ns10:IssuingIdent/ns10:Name) } + { data($CustRelInfo/ns20:Ref[1]/ns10:AverageAmount) } + { data($CustRelInfo/ns20:Ref[1]/ns10:AverageAmountDesc) } + + { + if(data($CustRelInfo/ns20:Ref[1]/ns10:IssueDt)!='')then( + xqu:date-to-rafagaDDMMYYYY(data($CustRelInfo/ns20:Ref[1]/ns10:IssueDt)) + )else() + } + + { data($CustRelInfo/ns20:RelFrom) } + { data($CustRelInfo/ns20:RelId[1]/ns20:CustRelId) } + E + { data($CustRelInfo/ns20:Ref[1]/ns10:ProdDesc) } + + )else if (data($readDVM_Rs1/ns31:Outputs/ns31:Output[1]/ns31:Attributes/ns31:Attribute[./ns31:Name='NUMREG']/ns31:Value)='2008')then( + (: Caso VB8933_Reg2008 Eliminar referencias bancarias :) + for $CustRelInfo in $deleteCustomerRelationship_Rq1/ns30:NaturalCustomer/ns20:CustRelInfo + return + + { data($deleteCustomerRelationship_Rq1/ns30:NaturalCustomer/ns20:CustId/ns20:CustPermId) } + { data($deleteCustomerRelationship_Rq1/ns30:NaturalCustomer/ns20:CustInfo/ns20:PersonInfo[1]/ns22:GovIssueIdent[1]/ns22:IdentSerialNumPrefix)} + { data($deleteCustomerRelationship_Rq1/ns30:NaturalCustomer/ns20:CustInfo/ns20:PersonInfo[1]/ns22:GovIssueIdent[1]/ns22:IdentSerialNum) } + { data($CustRelInfo/ns20:CustRelType) } + { data($CustRelInfo/ns20:CustPermId) } + { data($CustRelInfo/ns20:IdentDoc/ns20:IdentSerialNumPrefix) } + { data($CustRelInfo/ns20:IdentDoc/ns20:IdentSerialNum) } + { data($CustRelInfo/ns20:RelId/ns20:CustRelIdType) } + + { + for $StartDt in $CustRelInfo/ns20:StartDt + return + if(data($StartDt)!='')then( + xqu:date-to-rafagaYYYYMMDD(data($StartDt)) + )else() + } + + + { + for $EndDt in $CustRelInfo/ns20:EndDt + return + if(data($EndDt)!='')then( + xqu:date-to-rafagaYYYYMMDD(data($EndDt)) + )else() + } + + { data($CustRelInfo/ns20:RelCons) } + + + )else() + } + + + +}; + +declare variable $deleteCustomerRelationship_Rq1 as element(ns30:deleteCustomerRelationship_Rq) external; +declare variable $readDVM_Rs1 as element(ns31:readDVM_Rs) external; + +xf:AS400NaturalCustomerInAppSvc_deleteCustomerRelationship_CanonicalToInput($deleteCustomerRelationship_Rq1, + $readDVM_Rs1) \ No newline at end of file diff --git a/AS400NaturalCustomerInAppSvc/operations/deleteCustomerRelationship/xq/AS400NaturalCustomerInAppSvc_deleteCustomerRelationship_InputToCanonical.xqy b/AS400NaturalCustomerInAppSvc/operations/deleteCustomerRelationship/xq/AS400NaturalCustomerInAppSvc_deleteCustomerRelationship_InputToCanonical.xqy new file mode 100644 index 0000000..95f719e --- /dev/null +++ b/AS400NaturalCustomerInAppSvc/operations/deleteCustomerRelationship/xq/AS400NaturalCustomerInAppSvc_deleteCustomerRelationship_InputToCanonical.xqy @@ -0,0 +1,100 @@ +xquery version "1.0" encoding "utf-8"; + +(:: OracleAnnotationVersion "1.0" ::) + +declare namespace ns7="http://Obi_Wan/EjecutaTRX"; +(:: import schema at "../xsd/AS400NaturalCustomerInAppSvc_deleteCustomerRelationship.xsd" ::) +declare namespace ns31="http://xmlns.banesco.com/Service/NaturalCustomerMgmtSvc"; +(:: import schema at "../../../../BanescoCommonArtifacts/xsd/canonical/Services/NaturalCustomerMgmtSvc.xsd" ::) + +declare namespace ns29 = "http://xmlns.banesco.com/EnterpriseObjects/Status"; +declare namespace ns25 = "http://xmlns.banesco.com/EnterpriseObjects/Addr_v2.0"; +declare namespace ns26 = "http://xmlns.banesco.com/EnterpriseObjects/Service"; +declare namespace ns27 = "http://xmlns.banesco.com/EnterpriseObjects/Addr"; +declare namespace ns28 = "http://xmlns.banesco.com/EnterpriseObjects/MsgRqHdr"; +declare namespace ns21 = "http://xmlns.banesco.com/EnterpriseObjects/Taxes_v2.0"; +declare namespace ns22 = "http://xmlns.banesco.com/EnterpriseObjects/PersonInfo_v2.0"; +declare namespace ns23 = "http://xmlns.banesco.com/EnterpriseObjects/EmploymentData_v2.0"; +declare namespace ns24 = "http://xmlns.banesco.com/EnterpriseObjects/MsgRsHdr"; +declare namespace ns20 = "http://xmlns.banesco.com/EnterpriseObjects/NaturalCustomer"; +declare namespace xf = "http://tempuri.org/AS400NaturalCustomerInAppSvc/operations/deleteCustomerRelationship/xq/AS400NaturalCustomerInAppSvc_deleteCustomerRelationship_InputToCanonical/"; +declare namespace ns16 = "http://xmlns.banesco.com/EnterpriseObjects/ContactInfo_v2.0"; +declare namespace ns17 = "http://xmlns.banesco.com/EnterpriseObjects/CommonComplexType"; +declare namespace ns14 = "http://xmlns.banesco.com/EnterpriseObjects/Product"; +declare namespace ns15 = "http://xmlns.banesco.com/EnterpriseObjects/PersonName"; +declare namespace ns18 = "http://xmlns.banesco.com/EnterpriseObjects/User"; +declare namespace ns19 = "http://xmlns.banesco.com/EnterpriseObjects/Banking"; +declare namespace ns34 = "http://xmlns.banesco.com/EnterpriseObjects/Score"; +declare namespace ns9 = "http://xmlns.banesco.com/EnterpriseObjects/Organization"; +declare namespace ns32 = "http://xmlns.banesco.com/EnterpriseObjects/AffiliationSvc"; +declare namespace ns33 = "http://xmlns.banesco.com/EnterpriseObjects/PersonInfo"; +declare namespace ns30 = "http://xmlns.banesco.com/EnterpriseObjects/TradeRegistry"; +declare namespace ns12 = "http://xmlns.banesco.com/EnterpriseObjects/Organization_v2.0"; +declare namespace ns5 = "http://xmlns.banesco.com/EnterpriseObjects/Contact"; +declare namespace ns13 = "http://xmlns.banesco.com/EnterpriseObjects/Chk"; +declare namespace ns6 = "http://xmlns.banesco.com/EnterpriseObjects/Risk"; +declare namespace ns10 = "http://xmlns.banesco.com/EnterpriseObjects/Ref_v2.0"; +declare namespace ns8 = "http://xmlns.banesco.com/EnterpriseObjects/Investment"; +declare namespace ns11 = "http://xmlns.banesco.com/EnterpriseObjects/Loan"; +declare namespace ns2 = "http://xmlns.banesco.com/EnterpriseObjects/Fee"; +declare namespace ns1 = "http://xmlns.banesco.com/EnterpriseObjects/RegulatoryInfo"; +declare namespace ns4 = "http://xmlns.banesco.com/EnterpriseObjects/Bankinfo"; +declare namespace ns3 = "http://xmlns.banesco.com/EnterpriseObjects/FinancialInfo"; +declare namespace ns0 = "http://xmlns.banesco.com/EnterpriseObjects/CustVerificationList"; + +declare namespace stat = "http://xmlns.banesco.com/EnterpriseObjects/Status"; + +import module namespace xqu="http://xmlns.banesco.com/xquey-functions" at "../../../../BanescoCommonArtifacts/xq/libraries/AS400Util.xqy", "../../../../BanescoCommonArtifacts/xq/libraries/dateTimeUtil.xqy"; + +declare function xf:AS400NaturalCustomerInAppSvc_deleteCustomerRelationship_InputToCanonical($ejecutaTRXResponse1 as element(ns7:EjecutaTRXResponse), + $deleteCustomerRelationship_Rq1 as element(ns31:deleteCustomerRelationship_Rq), + $dvm as element(*)) + as element(ns31:deleteCustomerRelationship_Rs) { + + + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/ns7:Respuesta[1]/@NUMREG) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/@NOCDTOSAL) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/@CODTRN) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/@CODSUP) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/@TIPOPER) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/@CONTRN) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/@DSCREG) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/ns7:Respuesta[1]/@NUMREG) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/@TIPTRN) } + { data($deleteCustomerRelationship_Rq1/ns31:MsgRqHdr/ns28:RequestId) } + AS400 + + { + if(fn:boolean(data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:CODERR1)) or + fn:boolean(data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:CODERR2)) or + fn:boolean(data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:CODERR3)) or + fn:boolean(data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:CODERR4)) or + fn:boolean(data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/ns7:Respuesta[1]/ns7:MSJERR)))then( + (:Caso Fallido:) + + {xqu:get-status($ejecutaTRXResponse1, $dvm)/*} + + )else if(data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/ns7:Respuesta[1]/@NUMREG)="0001")then( + (: Caso Exito sin data - VB1840_Reg1124, VB1841_Reg1125 :) + + OK + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/@DSCREG) } + + )else if(data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/ns7:Respuesta[1]/@NUMREG)="2008" and + fn:data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/ns7:Respuesta[1]/ns7:CONS)!="") then ( + + OK + { fn:data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/ns7:Respuesta[1]/ns7:CONS) } + + )else() + } + +}; + +declare variable $ejecutaTRXResponse1 as element(ns7:EjecutaTRXResponse) external; +declare variable $deleteCustomerRelationship_Rq1 as element(ns31:deleteCustomerRelationship_Rq) external; +declare variable $dvm as element(*) external; + +xf:AS400NaturalCustomerInAppSvc_deleteCustomerRelationship_InputToCanonical($ejecutaTRXResponse1, + $deleteCustomerRelationship_Rq1, + $dvm) \ No newline at end of file diff --git a/AS400NaturalCustomerInAppSvc/operations/deleteCustomerRelationship/xsd/AS400NaturalCustomerInAppSvc_deleteCustomerRelationship.xsd b/AS400NaturalCustomerInAppSvc/operations/deleteCustomerRelationship/xsd/AS400NaturalCustomerInAppSvc_deleteCustomerRelationship.xsd new file mode 100644 index 0000000..c5bf01e --- /dev/null +++ b/AS400NaturalCustomerInAppSvc/operations/deleteCustomerRelationship/xsd/AS400NaturalCustomerInAppSvc_deleteCustomerRelationship.xsd @@ -0,0 +1,213 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/AS400NaturalCustomerInAppSvc/operations/deleteEmploymentData/proxy/AS400NaturalCustomerInAppSvc_deleteEmploymentData.pipeline b/AS400NaturalCustomerInAppSvc/operations/deleteEmploymentData/proxy/AS400NaturalCustomerInAppSvc_deleteEmploymentData.pipeline new file mode 100644 index 0000000..92a2d55 --- /dev/null +++ b/AS400NaturalCustomerInAppSvc/operations/deleteEmploymentData/proxy/AS400NaturalCustomerInAppSvc_deleteEmploymentData.pipeline @@ -0,0 +1,214 @@ + + + + + + + AS400NaturalCustomerInAppSvcSOAP + http://xmlns.banesco.com/ApplicationService/AS400NaturalCustomerInAppSvc + + + + 1.0 + + + + + + + + nat:deleteEmploymentData_Rq + + ./nat:deleteEmploymentData_Rq + + + + + + + + + + + + + + + $body/nat:deleteEmploymentData_Rq/nat:MsgRqHdr + + + + + + + + + + + + + + + + + $dvmResponse + + + $body/nat:deleteEmploymentData_Rq + + + + + + + + + + + + + + + + + $body/direct:EjecutaTRX + + + $backupBody/nat:deleteEmploymentData_Rq/nat:MsgRqHdr + + + + + + + + http://xmlns.banesco.com/Service/NaturalCustomerMgmtSvc + + + + + http://xmlns.banesco.com/Service/NaturalCustomerMgmtSvc + + + + + + + + + + + ejec:EjecutaTRX + + + + + + ejec:EjecutaTRXResponse + + + + + + + + + "DVM_RESPONSE_CODE" + + + "VC" + + + $body/direct:EjecutaTRXResponse/direct:EjecutaTRXResult/direct:TRXSResults/direct:Respuestas[1]/direct:Respuesta[1]/@NUMREG + + + $backupBody/nat:deleteEmploymentData_Rq/nat:MsgRqHdr + + + "AS400" + + + + + + + + + + + + "DVM_MESSAGE_ERROR" + + + "MESSAGE" + + + $errors + + + $backupBody/nat:deleteEmploymentData_Rq/nat:MsgRqHdr + + + "AS400" + + + + + + + + + + + + + + + + + $body/direct:EjecutaTRXResponse + + + fn-bea:inlinedXML($dvm) + + + $backupBody/nat:deleteEmploymentData_Rq + + + + + + + + + + + + + + + nat:deleteEmploymentData_Rs + + ./nat:deleteEmploymentData_Rs + + + + + + + + + + + http://xmlns.banesco.com/Service/NaturalCustomerMgmtSvc + + + + + http://xmlns.banesco.com/Service/NaturalCustomerMgmtSvc + + + + + + \ No newline at end of file diff --git a/AS400NaturalCustomerInAppSvc/operations/deleteEmploymentData/xq/AS400NaturalCustomerInAppSvc_deleteEmploymentData_CanonicalToInput.xqy b/AS400NaturalCustomerInAppSvc/operations/deleteEmploymentData/xq/AS400NaturalCustomerInAppSvc_deleteEmploymentData_CanonicalToInput.xqy new file mode 100644 index 0000000..822c1a6 --- /dev/null +++ b/AS400NaturalCustomerInAppSvc/operations/deleteEmploymentData/xq/AS400NaturalCustomerInAppSvc_deleteEmploymentData_CanonicalToInput.xqy @@ -0,0 +1,128 @@ +xquery version "1.0" encoding "utf-8"; + +(:: OracleAnnotationVersion "1.0" ::) + +declare namespace ns6="http://Obi_Wan/EjecutaTRX"; +(:: import schema at "../xsd/AS400NaturalCustomerInAppSvc_deleteEmploymentData.xsd" ::) +declare namespace ns30="http://xmlns.banesco.com/Service/NaturalCustomerMgmtSvc"; +(:: import schema at "../../../../BanescoCommonArtifacts/xsd/canonical/Services/NaturalCustomerMgmtSvc.xsd" ::) + +declare namespace ns29 = "http://xmlns.banesco.com/EnterpriseObjects/TradeRegistry"; +declare namespace ns25 = "http://xmlns.banesco.com/EnterpriseObjects/Service"; +declare namespace ns26 = "http://xmlns.banesco.com/EnterpriseObjects/Addr"; +declare namespace ns27 = "http://xmlns.banesco.com/EnterpriseObjects/MsgRqHdr"; +declare namespace ns28 = "http://xmlns.banesco.com/EnterpriseObjects/Status"; +declare namespace ns21 = "http://xmlns.banesco.com/EnterpriseObjects/Taxes_v2.0"; +declare namespace ns22 = "http://xmlns.banesco.com/EnterpriseObjects/PersonInfo_v2.0"; +declare namespace ns23 = "http://xmlns.banesco.com/EnterpriseObjects/EmploymentData_v2.0"; +declare namespace ns24 = "http://xmlns.banesco.com/EnterpriseObjects/Addr_v2.0"; +declare namespace ns20 = "http://xmlns.banesco.com/EnterpriseObjects/NaturalCustomer"; +declare namespace xf = "http://tempuri.org/AS400NaturalCustomerInAppSvc/operations/deleteEmploymentData/xq/AS400NaturalCustomerInAppSvc_deleteEmploymentData_CanonicalToInput/"; +declare namespace ns16 = "http://xmlns.banesco.com/EnterpriseObjects/ContactInfo_v2.0"; +declare namespace ns17 = "http://xmlns.banesco.com/EnterpriseObjects/CommonComplexType"; +declare namespace ns14 = "http://xmlns.banesco.com/EnterpriseObjects/Product"; +declare namespace ns15 = "http://xmlns.banesco.com/EnterpriseObjects/PersonName"; +declare namespace ns18 = "http://xmlns.banesco.com/EnterpriseObjects/User"; +declare namespace ns19 = "http://xmlns.banesco.com/EnterpriseObjects/Banking"; +declare namespace ns34 = "http://xmlns.banesco.com/EnterpriseObjects/Score"; +declare namespace ns9 = "http://xmlns.banesco.com/EnterpriseObjects/Organization"; +declare namespace ns32 = "http://xmlns.banesco.com/EnterpriseObjects/AffiliationSvc"; +declare namespace ns33 = "http://xmlns.banesco.com/EnterpriseObjects/PersonInfo"; +declare namespace ns12 = "http://xmlns.banesco.com/EnterpriseObjects/Organization_v2.0"; +declare namespace ns5 = "http://xmlns.banesco.com/EnterpriseObjects/Contact"; +declare namespace ns31 = "http://xmlns.banesco.com/Service/MessageEnrichUtilMgmtSvc"; +declare namespace ns13 = "http://xmlns.banesco.com/EnterpriseObjects/Chk"; +declare namespace ns10 = "http://xmlns.banesco.com/EnterpriseObjects/Ref_v2.0"; +declare namespace ns7 = "http://xmlns.banesco.com/EnterpriseObjects/Risk"; +declare namespace ns11 = "http://xmlns.banesco.com/EnterpriseObjects/Loan"; +declare namespace ns8 = "http://xmlns.banesco.com/EnterpriseObjects/Investment"; +declare namespace ns2 = "http://xmlns.banesco.com/EnterpriseObjects/Fee"; +declare namespace ns1 = "http://xmlns.banesco.com/EnterpriseObjects/RegulatoryInfo"; +declare namespace ns4 = "http://xmlns.banesco.com/EnterpriseObjects/Bankinfo"; +declare namespace ns3 = "http://xmlns.banesco.com/EnterpriseObjects/FinancialInfo"; +declare namespace ns0 = "http://xmlns.banesco.com/EnterpriseObjects/CustVerificationList"; + +import module namespace xqu="http://xmlns.banesco.com/xquey-functions" at "../../../../BanescoCommonArtifacts/xq/libraries/AS400Util.xqy", "../../../../BanescoCommonArtifacts/xq/libraries/dateTimeUtil.xqy"; + +declare function xf:AS400NaturalCustomerInAppSvc_deleteEmploymentData_CanonicalToInput($deleteEmploymentData_Rq1 as element(ns30:deleteEmploymentData_Rq), + $readDVM_Rs1 as element(ns31:readDVM_Rs)) + as element(ns6:EjecutaTRX) { + + { data($deleteEmploymentData_Rq1/ns30:MsgRqHdr/ns27:RequestId) } + { data($deleteEmploymentData_Rq1/ns30:MsgRqHdr/ns27:OperatorCode) } + { data($deleteEmploymentData_Rq1/ns30:MsgRqHdr/ns27:NetworkTrnInfo[1]/ns27:AgencyCode) } + + { xqu:day-from-date-leftpadding(data($deleteEmploymentData_Rq1/ns30:MsgRqHdr/ns27:NetworkTrnInfo[1]/ns27:TransactionDate)) } + { xqu:month-from-date-leftpadding(data($deleteEmploymentData_Rq1/ns30:MsgRqHdr/ns27:NetworkTrnInfo[1]/ns27:TransactionDate)) } + { xqu:year-from-date-leftpadding(data($deleteEmploymentData_Rq1/ns30:MsgRqHdr/ns27:NetworkTrnInfo[1]/ns27:TransactionDate)) } + + + { xqu:hours-from-time-leftpadding(data($deleteEmploymentData_Rq1/ns30:MsgRqHdr/ns27:NetworkTrnInfo[1]/ns27:TransactionTime)) } + { xqu:minutes-from-time-leftpadding(data($deleteEmploymentData_Rq1/ns30:MsgRqHdr/ns27:NetworkTrnInfo[1]/ns27:TransactionTime)) } + { xqu:seconds-from-time-leftpadding(data($deleteEmploymentData_Rq1/ns30:MsgRqHdr/ns27:NetworkTrnInfo[1]/ns27:TransactionTime)) } + + { data($readDVM_Rs1/ns31:Outputs/ns31:Output[1]/ns31:Attributes/ns31:Attribute[./ns31:Name='INDLINEA']/ns31:Value) } + { data($readDVM_Rs1/ns31:Outputs/ns31:Output[1]/ns31:Attributes/ns31:Attribute[./ns31:Name='CRITREV']/ns31:Value) } + { data($readDVM_Rs1/ns31:Outputs/ns31:Output[1]/ns31:Attributes/ns31:Attribute[./ns31:Name='INDCONT']/ns31:Value) } + { data($deleteEmploymentData_Rq1/ns30:MsgRqHdr/ns27:NetworkTrnInfo[1]/ns27:BankId) } + { data($deleteEmploymentData_Rq1/ns30:MsgRqHdr/ns27:SourceChannelCode) } + { data($deleteEmploymentData_Rq1/ns30:MsgRqHdr/ns27:NetworkTrnInfo[1]/ns27:ChannelUserId) } + + + { + if(data($readDVM_Rs1/ns31:Outputs/ns31:Output[1]/ns31:Attributes/ns31:Attribute[./ns31:Name='NUMREG']/ns31:Value)='1133')then( + (: Caso VB1848_Reg1133 :) + + { data($deleteEmploymentData_Rq1/ns30:NaturalCustomer/ns20:CustInfo/ns20:PersonInfo[1]/ns22:GovIssueIdent[1]/ns22:IdentSerialNumPrefix) } + { data($deleteEmploymentData_Rq1/ns30:NaturalCustomer/ns20:CustInfo/ns20:PersonInfo[1]/ns22:GovIssueIdent[1]/ns22:IdentSerialNum) } + { data($deleteEmploymentData_Rq1/ns30:NaturalCustomer/ns20:EmploymentData[1]/ns23:EmploymentCondition) } + { data($deleteEmploymentData_Rq1/ns30:NaturalCustomer/ns20:EmploymentData[1]/ns23:OccupDesc) } + { data($deleteEmploymentData_Rq1/ns30:NaturalCustomer/ns20:EmploymentData[1]/ns23:OrgInfo/ns23:Name) } + { xqu:doubleToAS400(data($deleteEmploymentData_Rq1/ns30:NaturalCustomer/ns20:EmploymentData[1]/ns23:Income[1]/ns23:Amt)) } + { data($deleteEmploymentData_Rq1/ns30:NaturalCustomer/ns20:EmploymentData[1]/ns23:Income[1]/ns23:Freq) } + + { + let $LastIncomeDt := $deleteEmploymentData_Rq1/ns30:NaturalCustomer/ns20:EmploymentData[1]/ns23:Income[1]/ns23:LastIncomeDt + return + if(data($LastIncomeDt)!='')then( + xqu:date-to-rafagaDDMMYYYY(data($LastIncomeDt)) + )else() + } + + + { + let $StartDt := $deleteEmploymentData_Rq1/ns30:NaturalCustomer/ns20:EmploymentData[1]/ns23:StartDt + return + if(data($StartDt)!='')then( + xqu:date-to-rafagaDDMMYYYY(data($StartDt)) + )else() + } + + { data($deleteEmploymentData_Rq1/ns30:NaturalCustomer/ns20:EmploymentData[1]/ns23:OrgInfo/ns23:CustId/ns23:CustPermId) } + { substring(data($deleteEmploymentData_Rq1/ns30:NaturalCustomer/ns20:EmploymentData[1]/ns23:OrgInfo/ns23:OrgId),1,1) } + { substring(data($deleteEmploymentData_Rq1/ns30:NaturalCustomer/ns20:EmploymentData[1]/ns23:OrgInfo/ns23:OrgId),2) } + { data($deleteEmploymentData_Rq1/ns30:NaturalCustomer/ns20:EmploymentData[1]/ns23:EmployInd) } + { data($deleteEmploymentData_Rq1/ns30:NaturalCustomer/ns20:EmploymentData[1]/ns23:ExtraIncome/ns23:ExtIncomeSeq) } + { data($deleteEmploymentData_Rq1/ns30:NaturalCustomer/ns20:FinancialInfo[1]/ns3:BankCustQty) } + { data($deleteEmploymentData_Rq1/ns30:NaturalCustomer/ns20:FinancialInfo[1]/ns3:CreditCardCustQty) } + { data($deleteEmploymentData_Rq1/ns30:NaturalCustomer/ns20:EmploymentData[1]/ns23:OrgInfo/ns23:ComScope) } + { data($deleteEmploymentData_Rq1/ns30:NaturalCustomer/ns20:EmploymentData[1]/ns23:JobTitle) } + { data($deleteEmploymentData_Rq1/ns30:NaturalCustomer/ns20:EmploymentData[1]/ns23:ExtraIncome/ns23:IncomeSource) } + + )else() + } + + + +}; + +declare variable $deleteEmploymentData_Rq1 as element(ns30:deleteEmploymentData_Rq) external; +declare variable $readDVM_Rs1 as element(ns31:readDVM_Rs) external; + +xf:AS400NaturalCustomerInAppSvc_deleteEmploymentData_CanonicalToInput($deleteEmploymentData_Rq1, + $readDVM_Rs1) \ No newline at end of file diff --git a/AS400NaturalCustomerInAppSvc/operations/deleteEmploymentData/xq/AS400NaturalCustomerInAppSvc_deleteEmploymentData_InputToCanonical.xqy b/AS400NaturalCustomerInAppSvc/operations/deleteEmploymentData/xq/AS400NaturalCustomerInAppSvc_deleteEmploymentData_InputToCanonical.xqy new file mode 100644 index 0000000..ae6c540 --- /dev/null +++ b/AS400NaturalCustomerInAppSvc/operations/deleteEmploymentData/xq/AS400NaturalCustomerInAppSvc_deleteEmploymentData_InputToCanonical.xqy @@ -0,0 +1,100 @@ +xquery version "1.0" encoding "utf-8"; + +(:: OracleAnnotationVersion "1.0" ::) + +declare namespace ns7="http://Obi_Wan/EjecutaTRX"; +(:: import schema at "../xsd/AS400NaturalCustomerInAppSvc_deleteEmploymentData.xsd" ::) +declare namespace ns31="http://xmlns.banesco.com/Service/NaturalCustomerMgmtSvc"; +(:: import schema at "../../../../BanescoCommonArtifacts/xsd/canonical/Services/NaturalCustomerMgmtSvc.xsd" ::) + +declare namespace ns29 = "http://xmlns.banesco.com/EnterpriseObjects/Status"; +declare namespace ns25 = "http://xmlns.banesco.com/EnterpriseObjects/Addr_v2.0"; +declare namespace ns26 = "http://xmlns.banesco.com/EnterpriseObjects/Service"; +declare namespace ns27 = "http://xmlns.banesco.com/EnterpriseObjects/Addr"; +declare namespace ns28 = "http://xmlns.banesco.com/EnterpriseObjects/MsgRqHdr"; +declare namespace ns21 = "http://xmlns.banesco.com/EnterpriseObjects/Taxes_v2.0"; +declare namespace ns22 = "http://xmlns.banesco.com/EnterpriseObjects/PersonInfo_v2.0"; +declare namespace ns23 = "http://xmlns.banesco.com/EnterpriseObjects/EmploymentData_v2.0"; +declare namespace ns24 = "http://xmlns.banesco.com/EnterpriseObjects/MsgRsHdr"; +declare namespace ns20 = "http://xmlns.banesco.com/EnterpriseObjects/NaturalCustomer"; +declare namespace xf = "http://tempuri.org/AS400NaturalCustomerInAppSvc/operations/deleteEmploymentData/xq/AS400NaturalCustomerInAppSvc_deleteEmploymentData_InputToCanonical/"; +declare namespace ns16 = "http://xmlns.banesco.com/EnterpriseObjects/ContactInfo_v2.0"; +declare namespace ns17 = "http://xmlns.banesco.com/EnterpriseObjects/CommonComplexType"; +declare namespace ns14 = "http://xmlns.banesco.com/EnterpriseObjects/Product"; +declare namespace ns15 = "http://xmlns.banesco.com/EnterpriseObjects/PersonName"; +declare namespace ns18 = "http://xmlns.banesco.com/EnterpriseObjects/User"; +declare namespace ns19 = "http://xmlns.banesco.com/EnterpriseObjects/Banking"; +declare namespace ns34 = "http://xmlns.banesco.com/EnterpriseObjects/Score"; +declare namespace ns9 = "http://xmlns.banesco.com/EnterpriseObjects/Organization"; +declare namespace ns32 = "http://xmlns.banesco.com/EnterpriseObjects/AffiliationSvc"; +declare namespace ns33 = "http://xmlns.banesco.com/EnterpriseObjects/PersonInfo"; +declare namespace ns30 = "http://xmlns.banesco.com/EnterpriseObjects/TradeRegistry"; +declare namespace ns12 = "http://xmlns.banesco.com/EnterpriseObjects/Organization_v2.0"; +declare namespace ns5 = "http://xmlns.banesco.com/EnterpriseObjects/Contact"; +declare namespace ns13 = "http://xmlns.banesco.com/EnterpriseObjects/Chk"; +declare namespace ns6 = "http://xmlns.banesco.com/EnterpriseObjects/Risk"; +declare namespace ns10 = "http://xmlns.banesco.com/EnterpriseObjects/Ref_v2.0"; +declare namespace ns8 = "http://xmlns.banesco.com/EnterpriseObjects/Investment"; +declare namespace ns11 = "http://xmlns.banesco.com/EnterpriseObjects/Loan"; +declare namespace ns2 = "http://xmlns.banesco.com/EnterpriseObjects/Fee"; +declare namespace ns1 = "http://xmlns.banesco.com/EnterpriseObjects/RegulatoryInfo"; +declare namespace ns4 = "http://xmlns.banesco.com/EnterpriseObjects/Bankinfo"; +declare namespace ns3 = "http://xmlns.banesco.com/EnterpriseObjects/FinancialInfo"; +declare namespace ns0 = "http://xmlns.banesco.com/EnterpriseObjects/CustVerificationList"; + +declare namespace stat = "http://xmlns.banesco.com/EnterpriseObjects/Status"; + +import module namespace xqu="http://xmlns.banesco.com/xquey-functions" at "../../../../BanescoCommonArtifacts/xq/libraries/AS400Util.xqy", "../../../../BanescoCommonArtifacts/xq/libraries/dateTimeUtil.xqy"; + +declare function xf:AS400NaturalCustomerInAppSvc_deleteEmploymentData_InputToCanonical($ejecutaTRXResponse1 as element(ns7:EjecutaTRXResponse), + $deleteEmploymentData_Rq1 as element(ns31:deleteEmploymentData_Rq), + $dvm as element(*)) + as element(ns31:deleteEmploymentData_Rs) { + + + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/ns7:Respuesta[1]/@NUMREG) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/@NOCDTOSAL) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/@CODTRN) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/@CODSUP) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/@TIPOPER) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/@CONTRN) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/@DSCREG) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/ns7:Respuesta[1]/@NUMREG) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/@TIPTRN) } + { data($deleteEmploymentData_Rq1/ns31:MsgRqHdr/ns28:RequestId) } + AS400 + + { + if(fn:boolean(data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:CODERR1)) or + fn:boolean(data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:CODERR2)) or + fn:boolean(data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:CODERR3)) or + fn:boolean(data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:CODERR4)) or + fn:boolean(data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/ns7:Respuesta[1]/ns7:MSJERR)))then( + + {xqu:get-status($ejecutaTRXResponse1, $dvm)/*} + + )else if(data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/ns7:Respuesta[1]/@NUMREG)="0001")then( + (: Caso Reg0001 Exito sin data :) + + OK + Transaccion finalizada con exito + + )else if(data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/ns7:Respuesta[1]/@NUMREG)="1133")then( + (: Caso VB1848_Reg1133 :) + + + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/ns7:Respuesta[1]/ns7:CONSEC) } + + + )else() + } + +}; + +declare variable $ejecutaTRXResponse1 as element(ns7:EjecutaTRXResponse) external; +declare variable $deleteEmploymentData_Rq1 as element(ns31:deleteEmploymentData_Rq) external; +declare variable $dvm as element(*) external; + +xf:AS400NaturalCustomerInAppSvc_deleteEmploymentData_InputToCanonical($ejecutaTRXResponse1, + $deleteEmploymentData_Rq1, + $dvm) \ No newline at end of file diff --git a/AS400NaturalCustomerInAppSvc/operations/deleteEmploymentData/xsd/AS400NaturalCustomerInAppSvc_deleteEmploymentData.xsd b/AS400NaturalCustomerInAppSvc/operations/deleteEmploymentData/xsd/AS400NaturalCustomerInAppSvc_deleteEmploymentData.xsd new file mode 100644 index 0000000..af221ae --- /dev/null +++ b/AS400NaturalCustomerInAppSvc/operations/deleteEmploymentData/xsd/AS400NaturalCustomerInAppSvc_deleteEmploymentData.xsd @@ -0,0 +1,200 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/AS400NaturalCustomerInAppSvc/operations/readCustomerData/proxy/AS400NaturalCustomerInAppSvc_readCustomerData.pipeline b/AS400NaturalCustomerInAppSvc/operations/readCustomerData/proxy/AS400NaturalCustomerInAppSvc_readCustomerData.pipeline new file mode 100644 index 0000000..211077e --- /dev/null +++ b/AS400NaturalCustomerInAppSvc/operations/readCustomerData/proxy/AS400NaturalCustomerInAppSvc_readCustomerData.pipeline @@ -0,0 +1,215 @@ + + + + + + + AS400NaturalCustomerInAppSvcSOAP + http://xmlns.banesco.com/ApplicationService/AS400NaturalCustomerInAppSvc + + + + 1.0 + + + + + + + + nat:readCustomerData_Rq + + ./nat:readCustomerData_Rq + + + + + + + + + + + + + + + $body/nat:readCustomerData_Rq/nat:MsgRqHdr + + + + + + + + + + + + + + + + + $dvmResponse + + + $body/nat:readCustomerData_Rq + + + + + + + + + + + + + + + + + $body/direct:EjecutaTRX + + + $backupBody/nat:readCustomerData_Rq/nat:MsgRqHdr + + + + + + + + http://xmlns.banesco.com/Service/NaturalCustomerMgmtSvc + + + + + http://xmlns.banesco.com/Service/NaturalCustomerMgmtSvc + + + + + + + + + + + ejec:EjecutaTRX + + + + + + ejec:EjecutaTRXResponse + + + + + + + + + "DVM_RESPONSE_CODE" + + + "VC" + + + $body/direct:EjecutaTRXResponse/direct:EjecutaTRXResult/direct:TRXSResults/direct:Respuestas[1]/direct:Respuesta[1]/@NUMREG + + + $backupBody/nat:readCustomerData_Rq/nat:MsgRqHdr + + + "AS400" + + + + + + + + + + + + "DVM_MESSAGE_ERROR" + + + "MESSAGE" + + + $errors + + + $backupBody/nat:readCustomerData_Rq/nat:MsgRqHdr + + + "AS400" + + + + + + + + + + + + + + + + + $body/direct:EjecutaTRXResponse + + + fn-bea:inlinedXML($dvm) + + + $backupBody/nat:readCustomerData_Rq + + + + + + + + + + + + + + + + nat:readCustomerData_Rs + + ./nat:readCustomerData_Rs + + + + + + + + + + + http://xmlns.banesco.com/Service/NaturalCustomerMgmtSvc + + + + + http://xmlns.banesco.com/Service/NaturalCustomerMgmtSvc + + + + + + \ No newline at end of file diff --git a/AS400NaturalCustomerInAppSvc/operations/readCustomerData/xq/AS400NaturalCustomerInAppSvc_readCustomerData_CanonicalToInput.xqy b/AS400NaturalCustomerInAppSvc/operations/readCustomerData/xq/AS400NaturalCustomerInAppSvc_readCustomerData_CanonicalToInput.xqy new file mode 100644 index 0000000..2b333b5 --- /dev/null +++ b/AS400NaturalCustomerInAppSvc/operations/readCustomerData/xq/AS400NaturalCustomerInAppSvc_readCustomerData_CanonicalToInput.xqy @@ -0,0 +1,105 @@ +xquery version "1.0" encoding "utf-8"; + +(:: OracleAnnotationVersion "1.0" ::) + +declare namespace ns3="http://Obi_Wan/EjecutaTRX"; +(:: import schema at "../xsd/AS400NaturalCustomerInAppSvc_readCustomerData.xsd" ::) +declare namespace ns6="http://xmlns.banesco.com/Service/NaturalCustomerMgmtSvc"; +(:: import schema at "../../../../BanescoCommonArtifacts/xsd/canonical/Services/NaturalCustomerMgmtSvc.xsd" ::) + +declare namespace ns0 = "http://xmlns.banesco.com/EnterpriseObjects/NaturalCustomer"; +declare namespace ns1 = "http://xmlns.banesco.com/EnterpriseObjects/PersonInfo_v2.0"; +declare namespace ns5 = "http://xmlns.banesco.com/EnterpriseObjects/MsgRqHdr"; +declare namespace ns12 = "http://xmlns.banesco.com/Service/MessageEnrichUtilMgmtSvc"; +declare namespace ns7 = "http://xmlns.banesco.com/EnterpriseObjects/Account"; +declare namespace xf = "http://tempuri.org/AS400NaturalCustomerInAppSvc/operations/readCustomerData/xq/AS400NaturalCustomerInAppSvc_readCustomerData_CanonicalToInput/"; + +import module namespace xqu="http://xmlns.banesco.com/xquey-functions" at "../../../../BanescoCommonArtifacts/xq/libraries/AS400Util.xqy", "../../../../BanescoCommonArtifacts/xq/libraries/dateTimeUtil.xqy"; + +declare function xf:AS400NaturalCustomerInAppSvc_readCustomerData_CanonicalToInput($readCustomerData_Rq1 as element(ns6:readCustomerData_Rq), $dvmResponse as element(ns12:readDVM_Rs)) + as element(ns3:EjecutaTRX) { + + { data($readCustomerData_Rq1/ns6:MsgRqHdr/ns5:OperatorCode) } + { data($readCustomerData_Rq1/ns6:MsgRqHdr/ns5:NetworkTrnInfo/ns5:AgencyCode) } + { data($dvmResponse/ns12:Outputs/ns12:Output[1]/ns12:Attributes/ns12:Attribute[./ns12:Name='INDLINEA']/ns12:Value) } + { data($dvmResponse/ns12:Outputs/ns12:Output[1]/ns12:Attributes/ns12:Attribute[./ns12:Name='CRITREV']/ns12:Value) } + { data($dvmResponse/ns12:Outputs/ns12:Output[1]/ns12:Attributes/ns12:Attribute[./ns12:Name='INDCONT']/ns12:Value) } + { data($readCustomerData_Rq1/ns6:MsgRqHdr/ns5:NetworkTrnInfo[1]/ns5:BankId) } + { data($readCustomerData_Rq1/ns6:MsgRqHdr/ns5:SourceChannelCode) } + { data($readCustomerData_Rq1/ns6:MsgRqHdr/ns5:NetworkTrnInfo[1]/ns5:ChannelUserId) } + + { xqu:day-from-date-leftpadding(data($readCustomerData_Rq1/ns6:MsgRqHdr/ns5:NetworkTrnInfo/ns5:TransactionDate)) } + { xqu:month-from-date-leftpadding(data($readCustomerData_Rq1/ns6:MsgRqHdr/ns5:NetworkTrnInfo/ns5:TransactionDate)) } + { xqu:year-from-date-leftpadding(data($readCustomerData_Rq1/ns6:MsgRqHdr/ns5:NetworkTrnInfo/ns5:TransactionDate)) } + + + { xqu:hours-from-time-leftpadding(data($readCustomerData_Rq1/ns6:MsgRqHdr/ns5:NetworkTrnInfo/ns5:TransactionTime)) } + { xqu:minutes-from-time-leftpadding(data($readCustomerData_Rq1/ns6:MsgRqHdr/ns5:NetworkTrnInfo/ns5:TransactionTime)) } + { xqu:seconds-from-time-leftpadding(data($readCustomerData_Rq1/ns6:MsgRqHdr/ns5:NetworkTrnInfo/ns5:TransactionTime)) } + + + + + { + (:Caso VB8900_Reg2001, VB8917_Reg2015, VB8922_Reg2016 y Caso VB1837_Reg1121:) + if(data($dvmResponse/ns12:Outputs/ns12:Output[1]/ns12:Attributes/ns12:Attribute[./ns12:Name='NUMREG']/ns12:Value)='2001' or + data($dvmResponse/ns12:Outputs/ns12:Output[1]/ns12:Attributes/ns12:Attribute[./ns12:Name='NUMREG']/ns12:Value)='2015' or + data($dvmResponse/ns12:Outputs/ns12:Output[1]/ns12:Attributes/ns12:Attribute[./ns12:Name='NUMREG']/ns12:Value)='2016' or + data($dvmResponse/ns12:Outputs/ns12:Output[1]/ns12:Attributes/ns12:Attribute[./ns12:Name='NUMREG']/ns12:Value)='1121')then( + + { data($readCustomerData_Rq1/ns6:NaturalCustomer/ns0:CustInfo/ns0:PersonInfo/ns1:GovIssueIdent/ns1:IdentSerialNumPrefix) } + { data($readCustomerData_Rq1/ns6:NaturalCustomer/ns0:CustInfo/ns0:PersonInfo/ns1:GovIssueIdent/ns1:IdentSerialNum) } + /* + )else( + (:Caso VB1834_Reg1118, VB7787_Reg3683, VB7820_Reg3880 y VB7807_Reg3702:) + if(data($dvmResponse/ns12:Outputs/ns12:Output[1]/ns12:Attributes/ns12:Attribute[./ns12:Name='NUMREG']/ns12:Value)='1118' or + data($dvmResponse/ns12:Outputs/ns12:Output[1]/ns12:Attributes/ns12:Attribute[./ns12:Name='NUMREG']/ns12:Value)='3683' or + data($dvmResponse/ns12:Outputs/ns12:Output[1]/ns12:Attributes/ns12:Attribute[./ns12:Name='NUMREG']/ns12:Value)='3880' or + data($dvmResponse/ns12:Outputs/ns12:Output[1]/ns12:Attributes/ns12:Attribute[./ns12:Name='NUMREG']/ns12:Value)='3702')then( + + { data($readCustomerData_Rq1/ns6:NaturalCustomer/ns0:CustInfo/ns0:PersonInfo/ns1:GovIssueIdent/ns1:IdentSerialNumPrefix) } + { data($readCustomerData_Rq1/ns6:NaturalCustomer/ns0:CustInfo/ns0:PersonInfo/ns1:GovIssueIdent/ns1:IdentSerialNum) } + /* + )else( + (:Caso VB1845_Reg1128:) + if(data($dvmResponse/ns12:Outputs/ns12:Output[1]/ns12:Attributes/ns12:Attribute[./ns12:Name='NUMREG']/ns12:Value)='1128')then( + + C + { data($readCustomerData_Rq1/ns6:NaturalCustomer/ns0:CustInfo/ns0:PersonInfo/ns1:GovIssueIdent/ns1:IdentSerialNumPrefix) } + { data($readCustomerData_Rq1/ns6:NaturalCustomer/ns0:CustInfo/ns0:PersonInfo/ns1:GovIssueIdent/ns1:IdentSerialNum) } + { data($readCustomerData_Rq1/ns6:Account/ns7:AcctId) } + + + + + + + + + + + + + + /* + )else( + (:Continuar aqui para otros casos de VB y Registro. Validar cada caso con if:) + ) + ) + ) + } + + + + +}; + +declare variable $readCustomerData_Rq1 as element(ns6:readCustomerData_Rq) external; +declare variable $dvmResponse as element (ns12:readDVM_Rs) external; + +xf:AS400NaturalCustomerInAppSvc_readCustomerData_CanonicalToInput($readCustomerData_Rq1, $dvmResponse) \ No newline at end of file diff --git a/AS400NaturalCustomerInAppSvc/operations/readCustomerData/xq/AS400NaturalCustomerInAppSvc_readCustomerData_InputToCanonical.xqy b/AS400NaturalCustomerInAppSvc/operations/readCustomerData/xq/AS400NaturalCustomerInAppSvc_readCustomerData_InputToCanonical.xqy new file mode 100644 index 0000000..54717ca --- /dev/null +++ b/AS400NaturalCustomerInAppSvc/operations/readCustomerData/xq/AS400NaturalCustomerInAppSvc_readCustomerData_InputToCanonical.xqy @@ -0,0 +1,978 @@ +xquery version "1.0" encoding "utf-8"; + +(:: OracleAnnotationVersion "1.0" ::) + +declare namespace ns7="http://Obi_Wan/EjecutaTRX"; +(:: import schema at "../xsd/AS400NaturalCustomerInAppSvc_readCustomerData.xsd" ::) +declare namespace ns30="http://xmlns.banesco.com/Service/NaturalCustomerMgmtSvc"; +(:: import schema at "../../../../BanescoCommonArtifacts/xsd/canonical/Services/NaturalCustomerMgmtSvc.xsd" ::) + +declare namespace ns29 = "http://xmlns.banesco.com/EnterpriseObjects/CustCrossReference"; +declare namespace ns25 = "http://xmlns.banesco.com/EnterpriseObjects/Service"; +declare namespace ns26 = "http://xmlns.banesco.com/EnterpriseObjects/Addr"; +declare namespace ns27 = "http://xmlns.banesco.com/EnterpriseObjects/Status"; +declare namespace ns28 = "http://xmlns.banesco.com/EnterpriseObjects/TradeRegistry"; +declare namespace ns21 = "http://xmlns.banesco.com/EnterpriseObjects/PersonInfo_v2.0"; +declare namespace ns22 = "http://xmlns.banesco.com/EnterpriseObjects/EmploymentData_v2.0"; +declare namespace ns23 = "http://xmlns.banesco.com/EnterpriseObjects/MsgRsHdr"; +declare namespace ns24 = "http://xmlns.banesco.com/EnterpriseObjects/Addr_v2.0"; +declare namespace ns20 = "http://xmlns.banesco.com/EnterpriseObjects/Taxes_v2.0"; +declare namespace xf = "http://tempuri.org/AS400NaturalCustomerInAppSvc/operations/readCustomerData/xq/AS400NaturalCustomerInAppSvc_readCustomerData_InputToCanonical/"; +declare namespace ns16 = "http://xmlns.banesco.com/EnterpriseObjects/ContactInfo_v2.0"; +declare namespace ns17 = "http://xmlns.banesco.com/EnterpriseObjects/CommonComplexType"; +declare namespace ns14 = "http://xmlns.banesco.com/EnterpriseObjects/Product"; +declare namespace ns15 = "http://xmlns.banesco.com/EnterpriseObjects/PersonName"; +declare namespace ns18 = "http://xmlns.banesco.com/EnterpriseObjects/Banking"; +declare namespace ns19 = "http://xmlns.banesco.com/EnterpriseObjects/NaturalCustomer"; +declare namespace ns9 = "http://xmlns.banesco.com/EnterpriseObjects/Organization"; +declare namespace ns32 = "http://xmlns.banesco.com/EnterpriseObjects/PersonInfo"; +declare namespace ns33 = "http://xmlns.banesco.com/EnterpriseObjects/Score"; +declare namespace ns12 = "http://xmlns.banesco.com/EnterpriseObjects/Organization_v2.0"; +declare namespace ns5 = "http://xmlns.banesco.com/EnterpriseObjects/Contact"; +declare namespace ns6 = "http://xmlns.banesco.com/EnterpriseObjects/Risk"; +declare namespace ns13 = "http://xmlns.banesco.com/EnterpriseObjects/Chk"; +declare namespace ns31 = "http://xmlns.banesco.com/EnterpriseObjects/AffiliationSvc"; +declare namespace ns10 = "http://xmlns.banesco.com/EnterpriseObjects/Ref_v2.0"; +declare namespace ns11 = "http://xmlns.banesco.com/EnterpriseObjects/Loan"; +declare namespace ns8 = "http://xmlns.banesco.com/EnterpriseObjects/Investment"; +declare namespace ns2 = "http://xmlns.banesco.com/EnterpriseObjects/Fee"; +declare namespace ns1 = "http://xmlns.banesco.com/EnterpriseObjects/RegulatoryInfo"; +declare namespace ns4 = "http://xmlns.banesco.com/EnterpriseObjects/Bankinfo"; +declare namespace ns3 = "http://xmlns.banesco.com/EnterpriseObjects/FinancialInfo"; +declare namespace ns0 = "http://xmlns.banesco.com/EnterpriseObjects/CustVerificationList"; +declare namespace ns34 = "http://xmlns.banesco.com/EnterpriseObjects/Account"; +declare namespace ns35 = "http://xmlns.banesco.com/EnterpriseObjects/MsgRqHdr"; + +declare namespace stat = "http://xmlns.banesco.com/EnterpriseObjects/Status"; + +import module namespace xqu="http://xmlns.banesco.com/xquey-functions" at "../../../../BanescoCommonArtifacts/xq/libraries/AS400Util.xqy", "../../../../BanescoCommonArtifacts/xq/libraries/dateTimeUtil.xqy"; + +declare function xf:AS400NaturalCustomerInAppSvc_readCustomerData_InputToCanonical($ejecutaTRXResponse1 as element(ns7:EjecutaTRXResponse), + $readCustomerData_Rq1 as element(ns30:readCustomerData_Rq), + $dvm as element(*)) + as element(ns30:readCustomerData_Rs) { + + + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/@NUMREG) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/@NOCDTOSAL) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/@CODTRN) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/@CODSUP) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/@TIPOPER) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/@CONTRN) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/@DSCREG) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/@NUMREG) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/@TIPTRN) } + { data($readCustomerData_Rq1/ns30:MsgRqHdr/ns35:RequestId) } + AS400 + + { + if(fn:boolean(data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:CODERR1)) or + fn:boolean(data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:CODERR2)) or + fn:boolean(data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:CODERR3)) or + fn:boolean(data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:CODERR4)) or + fn:boolean(data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/ns7:Respuesta[1]/ns7:MSJERR)))then( + + {xqu:get-status($ejecutaTRXResponse1, $dvm)/*} + + )else( + (:Caso VB8900_Reg2001:) + if(data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/@NUMREG)="2001")then( + + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta/ns7:STAT) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta/ns7:EMP) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta/ns7:CODEJE) } + + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta/ns7:NUMCTE) } + + + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta/ns7:CLACTE) } + + + HABITACION + + { + let $CODTLFHAB := $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta/ns7:CODTLFHAB + let $NUMTLFHAB := $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta/ns7:NUMTLFHAB + return + concat($CODTLFHAB , $NUMTLFHAB) + } + + + + OFICINA + + { + let $CODTLFOFC := $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta/ns7:CODTLFOFC + let $NUMTLFOFC := $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta/ns7:NUMTLFOFC + return + concat($CODTLFOFC , $NUMTLFOFC) + } + + + + OTROS + + { + let $CODTLFOTR := $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta/ns7:CODTLFOTR + let $NUMTLFOTR := $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta/ns7:NUMTLFOTR + return + concat($CODTLFOTR , $NUMTLFOTR) + } + + + + FAX + + { + let $CODTLFFAX := $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta/ns7:CODTLFFAX + let $NUMTLFFAX := $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta/ns7:NUMTLFFAX + return + concat($CODTLFFAX , $NUMTLFFAX) + } + + + + + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta/ns7:PNACCTE) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta/ns7:ESTCIV) } + { + for $DNAC in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta/ns7:DNAC, + $MNAC in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta/ns7:MNAC, + $ANAC in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta/ns7:ANAC + return + if(data($DNAC)!='00' and data($MNAC)!='00' and data($ANAC)!='0000')then( + { xqu:formatDate(concat($ANAC , $MNAC , $DNAC)) } + )else() + } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta/ns7:PAISNAC) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta/ns7:SEX) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta/ns7:NVLINS) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta/ns7:NUMHJO) } + + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta/ns7:NOMCTE) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta/ns7:PRMAPE) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta/ns7:SEGAPE) } + + + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta/ns7:NACCTE) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta/ns7:CEDCTE) } + + + + + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta/ns7:OCU) } + + + )else( + (:Caso VB8917_Reg2015:) + if(data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/@NUMREG)="2015")then( + + + { + for $NUMCTE in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:NUMCTE + return + { data($NUMCTE) } + } + + + + { + for $EDOCIVIL in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:EDOCIVIL + return + { data($EDOCIVIL) } + } + { + for $SEXCTE in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:SEXCTE + return + { data($SEXCTE) } + } + + { + for $NACCTE in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:NACCTE + return + { data($NACCTE) } + } + { + for $CEDRIFCTE in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:CEDRIFCTE + return + { data($CEDRIFCTE) } + } + + + + { + for $Respuesta in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta + return + + { + for $CONSDIR in $Respuesta/ns7:CONSDIR + return + { data($CONSDIR) } + } + { + for $CODCORR in $Respuesta/ns7:CODCORR + return + { data($CODCORR) } + } + { + for $TIPDIRCTE in $Respuesta/ns7:TIPDIRCTE + return + { data($TIPDIRCTE) } + } + { + for $PAIS in $Respuesta/ns7:PAIS + return + { data($PAIS) } + } + { + for $CODEDO in $Respuesta/ns7:CODEDO + return + { data($CODEDO) } + } + { + for $CIUDAD in $Respuesta/ns7:CIUDAD + return + { data($CIUDAD) } + } + { + for $ZONPOSTAL in $Respuesta/ns7:ZONPOSTAL + return + { data($ZONPOSTAL) } + } + { + for $TIPCALLE in $Respuesta/ns7:TIPCALLE + return + { data($TIPCALLE) } + } + { + for $NOMCALLE in $Respuesta/ns7:NOMCALLE + return + { data($NOMCALLE) } + } + { + for $TIPEDIF in $Respuesta/ns7:TIPEDIF + return + { data($TIPEDIF) } + } + { + for $NOMEDIF in $Respuesta/ns7:NOMEDIF + return + { data($NOMEDIF) } + } + { + for $PISONIVEL in $Respuesta/ns7:PISONIVEL + return + { data($PISONIVEL) } + } + { + for $APARLOCAL in $Respuesta/ns7:APARLOCAL + return + { data($APARLOCAL) } + } + { + for $TIPURBAN in $Respuesta/ns7:TIPURBAN + return + { data($TIPURBAN) } + } + { + for $NOMURBAN in $Respuesta/ns7:NOMURBAN + return + { data($NOMURBAN) } + } + { + for $APARTPT in $Respuesta/ns7:APARTPT + return + { data($APARTPT) } + } + { + for $RUTAAPARTPT in $Respuesta/ns7:RUTAAPARTPT + return + { data($RUTAAPARTPT) } + } + { + for $PROPVIV in $Respuesta/ns7:PROPVIV + return + { data($PROPVIV) } + } + + { + for $CODAREATL in $Respuesta/ns7:CODAREATL, + $TELCTE in $Respuesta/ns7:TELCTE + return + { concat($CODAREATL , $TELCTE) } + } + + { + for $DIRCORR in $Respuesta/ns7:DIRCORR + return + { if (data($DIRCORR)='1') then ("CORRESPONDENCIA") else() } + } + { + for $CODPAIS in $Respuesta/ns7:CODPAIS + return + { data($CODPAIS) } + } + + } + + )else( + (:Caso VB1834_Reg1118:) + if(data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/@NUMREG)="1118")then( + + + { + for $NUMIBS in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta/ns7:NUMIBS + return + { data($NUMIBS) } + } + + + + { + for $PAIS in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta/ns7:PAIS + return + { data($PAIS) } + } + { + for $CARGFML in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta/ns7:CARGFML + return + { data($CARGFML) } + } + + { + for $CONDPER in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta/ns7:CONDPER + return + { data($CONDPER) } + } + { + for $CTENAC in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta/ns7:CTENAC + return + { data($CTENAC) } + } + + + + + { + for $CTEPEN in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta/ns7:CTEPEN + return + { data($CTEPEN) } + } + { + for $CTEJUB in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta/ns7:CTEJUB + return + { data($CTEJUB) } + } + + + { + for $ACTECO in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta/ns7:ACTECO + return + { data($ACTECO) } + } + { + for $ACTESP in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta/ns7:ACTESP + return + { data($ACTESP) } + } + + + + { + for $RGCTE in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta/ns7:RGCTE + return + { data($RGCTE) } + } + + + + { + for $ASOCPEP in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta/ns7:ASOCPEP + return + { data($ASOCPEP) } + } + { + for $PARNPEP in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta/ns7:PARNPEP + return + { data($PARNPEP) } + } + { + for $CTEPEP in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta/ns7:CTEPEP + return + { data($CTEPEP) } + } + { + for $TRABCTE in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta/ns7:TRABCTE + return + { data($TRABCTE) } + } + + + )else( + (:Caso VB7787_Reg3683:) + if(data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/@NUMREG)="3683")then( + + + { + for $NROCTE in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:NROCTE + return + { data($NROCTE) } + } + + { + for $Respuesta in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta + return + + { + for $TIPDIR in $Respuesta/ns7:TIPDIR + return + { data($TIPDIR) } + } + { + for $MUNICIP in $Respuesta/ns7:MUNICIP + return + { data($MUNICIP) } + } + { + for $PARROQ in $Respuesta/ns7:PARROQ + return + { data($PARROQ) } + } + { + for $RUTCAR in $Respuesta/ns7:RUTCAR + return + { data($RUTCAR) } + } + + } + + )else( + (:Caso VB7820_Reg3880:) + if(data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/@NUMREG)="3880")then( + + + { + for $NROCTE in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:NROCTE + return + { data($NROCTE) } + } + + + + { + for $Respuesta in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta + return + + { + for $DREDSOC in $Respuesta/ns7:DREDSOC + return + { data($DREDSOC) } + } + { + for $TIPUSO in $Respuesta/ns7:TIPUSO + return + { data($TIPUSO) } + } + + { + for $ESTRED in $Respuesta/ns7:ESTRED + return + { data($ESTRED) } + } + + { + for $TIPEM in $Respuesta/ns7:TIPEM + return + { data($TIPEM) } + } + + } + + + + { + for $NACCLTE in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:NACCLTE + return + { data($NACCLTE) } + } + { + for $CEDCLT in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:CEDCLT + return + { data($CEDCLT) } + } + + + + + )else( + (:Caso VB1845_Reg1128:) + if(data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/@NUMREG)="1128")then( + + if(exists($readCustomerData_Rq1/ns30:Account/ns34:AcctType) and data($readCustomerData_Rq1/ns30:Account/ns34:AcctType)="1026")then( + (: Caso cuando el cliene POSEE una cuenta Verde:) + + { + for $RESP5 in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:RESP5 + return + { data($RESP5) } + } + + { + for $RESP1 in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:RESP1 + return + { data($RESP1) } + } + + { + for $RESP4 in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:RESP4 + return + { data($RESP4) } + } + + { + for $RESP2 in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:RESP2 + return + { data($RESP2) } + } + { + for $RESP3 in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:RESP3 + return + { data($RESP3) } + } + + + + + )else if(exists($readCustomerData_Rq1/ns30:Account/ns34:AcctId) and data($readCustomerData_Rq1/ns30:Account/ns34:AcctId)!="")then( + (: Caso cuando el cliene POSEE una cuenta BS:) + + + { + for $RESP2 in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:RESP2 + return + { data($RESP2) } + } + + { + for $RESP4 in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:RESP4 + return + { data($RESP4) } + } + { + for $RESP3 in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:RESP3 + return + { data($RESP3) } + } + + + { + for $RESP5 in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:RESP5 + return + { data($RESP5) } + } + { + for $RESP6 in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:RESP6 + return + { data($RESP6) } + } + + + { + for $RESP7 in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:RESP7 + return + { data($RESP7) } + } + { + for $RESP8 in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:RESP8 + return + { data($RESP8) } + } + + + { + for $RESP10 in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:RESP10 + return + { data($RESP10) } + } + Origen + + + { + for $RESP11 in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:RESP11 + return + { data($RESP11) } + } + Destino + + { + for $RESP1 in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:RESP1 + return + { data($RESP1) } + } + + { + for $RESP9 in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:RESP9 + return + { data($RESP9) } + } + + + + )else( + (: Caso cuando el cliene NO POSEE una cuenta :) + + { + for $RESP1 in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:RESP1 + return + { data($RESP1) } + } + { + for $RESP9 in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:RESP9 + return + { data($RESP9) } + } + + + { + for $RESP2 in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:RESP2 + return + { xqu:montoRafagaToDouble(xqu:complete-amt9(data($RESP2))) } + } + + + { + for $RESP3 in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:RESP3 + return + { xqu:montoRafagaToDouble(xqu:complete-amt9(data($RESP3))) } + } + + + + { + for $RESP4 in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:RESP4 + return + { data($RESP4) } + } + + + + { + for $RESP5 in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:RESP5 + return + { data($RESP5) } + } + + + { + for $RESP6 in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:RESP6 + return + { data($RESP6) } + } + + + { + for $RESP7 in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:RESP7 + return + { data($RESP7) } + } + + + + { + for $RESP8 in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:RESP8 + return + { data($RESP8) } + } + + + ) + )else( + (:Caso VB8922_Reg2016:) + if(data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/@NUMREG)="2016")then( + + + { + for $NUMCTE in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:NUMCTE + return + { data($NUMCTE) } + } + + + + { + for $Respuesta in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta + return + + { + for $DIRELE in $Respuesta/ns7:DIRELE + return + { data($DIRELE) } + } + { + for $TIPDIE in $Respuesta/ns7:TIPDIE + return + { data($TIPDIE) } + } + { + for $CONSEC in $Respuesta/ns7:CONSEC + return + { data($CONSEC) } + } + + + } + + + + { + for $NACCTE in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:NACCTE + return + { data($NACCTE) } + } + { + for $CEDCTE in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:CEDCTE + return + { data($CEDCTE) } + } + + + + + )else( + (:Caso VB1837_Reg1121:) + if(data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/@NUMREG)="1121")then( + + + { + for $NUMCTE in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:NUMCTE + return + { data($NUMCTE) } + } + + + + + { + for $NACCTE in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:NACCTE + return + { data($NACCTE) } + } + { + for $CEDCTE in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:CEDCTE + return + { data($CEDCTE) } + } + + + + { + for $Respuesta in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta + return + + { + for $CODCAR in $Respuesta/ns7:CODCAR + return + { data($CODCAR) } + } + { + for $DESCAR in $Respuesta/ns7:DESCAR + return + { data($DESCAR) } + } + { + for $FECINI in $Respuesta/ns7:FECINI + return + if(data($FECINI)!='' and data($FECINI)!='00000000')then( + { xqu:formatAAAAMMDD(data($FECINI)) } + )else() + } + { + for $TIPEMP in $Respuesta/ns7:TIPEMP + return + { data($TIPEMP) } + } + + { + for $NACPTR in $Respuesta/ns7:NACPTR, + $CEDPTR in $Respuesta/ns7:CEDPTR + return + { concat($NACPTR , $CEDPTR) } + } + { + for $NOMEMP in $Respuesta/ns7:NOMEMP + return + { data($NOMEMP) } + } + { + for $SECECO in $Respuesta/ns7:SECECO + return + { data($SECECO) } + } + { + for $NUMPTR in $Respuesta/ns7:NUMPTR + return + + { data($NUMPTR) } + + } + + + { + for $MONSLD in $Respuesta/ns7:MONSLD + return + { xqu:montoRafagaToDouble(data($MONSLD)) } + } + { + for $FRECU in $Respuesta/ns7:FRECU + return + { data($FRECU) } + } + { + for $FECAUM in $Respuesta/ns7:FECAUM + return + if(data($FECAUM)!='' and data($FECAUM)!='00000000')then( + { xqu:formatAAAAMMDD(data($FECAUM)) } + )else() + } + + + { + for $GNRINGRE in $Respuesta/ns7:GNRINGRE + return + { data($GNRINGRE) } + } + { + for $CONING in $Respuesta/ns7:CONING + return + { data($CONING) } + } + + { + for $NUMCON in $Respuesta/ns7:NUMCON + return + { data($NUMCON) } + } + + + } + + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:CANTDC) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:CANBCO) } + + + )else( + (:Caso VB7807_Reg3702:) + if(data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/@NUMREG)="3702")then( + + + + { + for $Respuesta in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta + return + if(data($Respuesta/ns7:INDDOC)='N')then( + + { + for $TIPID in $Respuesta/ns7:TIPID + return + { data($TIPID) } + } + { + for $LITIDCTE in $Respuesta/ns7:LITIDCTE + return + { data($LITIDCTE) } + } + { + for $CEDRIF in $Respuesta/ns7:CEDRIF + return + { data($CEDRIF) } + } + { + for $FECEXP in $Respuesta/ns7:FECEXP + return + if(data($FECEXP)!='' and data($FECEXP)!='00000000')then( + { xqu:formatAAAAMMDD(data($FECEXP)) } + )else() + } + { + for $FECVEN in $Respuesta/ns7:FECVEN + return + if(data($FECVEN)!='' and data($FECVEN)!='00000000')then( + { xqu:formatAAAAMMDD(data($FECVEN)) } + )else() + } + { + for $PAISDOC in $Respuesta/ns7:PAISDOC + return + { data($PAISDOC) } + } + + )else() + } + { + for $Respuesta in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta + return + if(data($Respuesta/ns7:INDDOC)='S')then( + + { + for $TIPID in $Respuesta/ns7:TIPID + return + { data($TIPID) } + } + { + for $LITIDCTE in $Respuesta/ns7:LITIDCTE + return + { data($LITIDCTE) } + } + { + for $CEDRIF in $Respuesta/ns7:CEDRIF + return + { data($CEDRIF) } + } + { + for $FECEXP in $Respuesta/ns7:FECEXP + return + if(data($FECEXP)!='' and data($FECEXP)!='00000000')then( + { xqu:formatAAAAMMDD(data($FECEXP)) } + )else() + } + { + for $FECVEN in $Respuesta/ns7:FECVEN + return + if(data($FECVEN)!='' and data($FECVEN)!='00000000')then( + { xqu:formatAAAAMMDD(data($FECVEN)) } + )else() + } + { + for $PAISDOC in $Respuesta/ns7:PAISDOC + return + { data($PAISDOC) } + } + + )else() + } + + + + )else( + (:Continuar aqui para otros casos de VB y Registro. Validar cada caso con if:) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + } + +}; + +declare variable $ejecutaTRXResponse1 as element(ns7:EjecutaTRXResponse) external; +declare variable $readCustomerData_Rq1 as element(ns30:readCustomerData_Rq) external; +declare variable $dvm as element(*) external; + +xf:AS400NaturalCustomerInAppSvc_readCustomerData_InputToCanonical($ejecutaTRXResponse1, + $readCustomerData_Rq1, + $dvm) \ No newline at end of file diff --git a/AS400NaturalCustomerInAppSvc/operations/readCustomerData/xsd/AS400NaturalCustomerInAppSvc_readCustomerData.xsd b/AS400NaturalCustomerInAppSvc/operations/readCustomerData/xsd/AS400NaturalCustomerInAppSvc_readCustomerData.xsd new file mode 100644 index 0000000..f9f2601 --- /dev/null +++ b/AS400NaturalCustomerInAppSvc/operations/readCustomerData/xsd/AS400NaturalCustomerInAppSvc_readCustomerData.xsd @@ -0,0 +1,421 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/AS400NaturalCustomerInAppSvc/operations/readCustomerInterview/proxy/AS400NaturalCustomerInAppSvc_readCustomerInterview.pipeline b/AS400NaturalCustomerInAppSvc/operations/readCustomerInterview/proxy/AS400NaturalCustomerInAppSvc_readCustomerInterview.pipeline new file mode 100644 index 0000000..9acddf8 --- /dev/null +++ b/AS400NaturalCustomerInAppSvc/operations/readCustomerInterview/proxy/AS400NaturalCustomerInAppSvc_readCustomerInterview.pipeline @@ -0,0 +1,226 @@ + + + + + + + AS400NaturalCustomerInAppSvcSOAP + http://xmlns.banesco.com/ApplicationService/AS400NaturalCustomerInAppSvc + + + + 1.0 + + + + + + + + nat:readCustomerInterview_Rq + + ./nat:readCustomerInterview_Rq + + + + + + + + + + + + + + + $body/nat:readCustomerInterview_Rq/nat:MsgRqHdr + + + + + + + + + + + + + + + + + $dvmResponse + + + $body/nat:readCustomerInterview_Rq + + + + + + + + + + + + + + + + + $body/direct:EjecutaTRX + + + $backupBody/nat:readCustomerInterview_Rq/nat:MsgRqHdr + + + + + + + + http://xmlns.banesco.com/Service/NaturalCustomerMgmtSvc + + + + + http://xmlns.banesco.com/Service/NaturalCustomerMgmtSvc + + + + + + + + + + + ejec:EjecutaTRX + + + + + + ejec:EjecutaTRXResponse + + + + + + + + + "DVM_RESPONSE_CODE" + + + "VC" + + + $body/direct:EjecutaTRXResponse/direct:EjecutaTRXResult/direct:TRXSResults/direct:Respuestas[1]/direct:Respuesta[1]/@NUMREG + + + $backupBody/nat:readCustomerInterview_Rq/nat:MsgRqHdr + + + "AS400" + + + + + + + + + + (exists($body/direct:EjecutaTRXResponse/direct:EjecutaTRXResult/direct:TRXSResults/direct:Respuestas/direct:Respuesta/direct:DSCERR1) and data($body/direct:EjecutaTRXResponse/direct:EjecutaTRXResult/direct:TRXSResults/direct:Respuestas/direct:Respuesta/direct:DSCERR1)!='') or +(exists($body/direct:EjecutaTRXResponse/direct:EjecutaTRXResult/direct:TRXSResults/direct:Respuestas/direct:Respuesta/direct:DSCERR2) and data($body/direct:EjecutaTRXResponse/direct:EjecutaTRXResult/direct:TRXSResults/direct:Respuestas/direct:Respuesta/direct:DSCERR2)!='') or +(exists($body/direct:EjecutaTRXResponse/direct:EjecutaTRXResult/direct:TRXSResults/direct:Respuestas/direct:Respuesta/direct:DSCERR3) and data($body/direct:EjecutaTRXResponse/direct:EjecutaTRXResult/direct:TRXSResults/direct:Respuestas/direct:Respuesta/direct:DSCERR3)!='') or +(exists($body/direct:EjecutaTRXResponse/direct:EjecutaTRXResult/direct:TRXSResults/direct:Respuestas/direct:Respuesta/direct:DSCERR4) and data($body/direct:EjecutaTRXResponse/direct:EjecutaTRXResult/direct:TRXSResults/direct:Respuestas/direct:Respuesta/direct:DSCERR4)!='') + + + + + + + + + + + "DVM_MESSAGE_ERROR" + + + "MESSAGE" + + + $errors + + + $backupBody/nat:readCustomerInterview_Rq/nat:MsgRqHdr + + + "AS400" + + + + + + + + + + + + + + + + + $body/direct:EjecutaTRXResponse + + + $backupBody/nat:readCustomerInterview_Rq + + + fn-bea:inlinedXML($dvm) + + + + + + + + + + + + + + + nat:readCustomerInterview_Rs + + ./nat:readCustomerInterview_Rs + + + + + + + + + + + http://xmlns.banesco.com/Service/NaturalCustomerMgmtSvc + + + + + http://xmlns.banesco.com/Service/NaturalCustomerMgmtSvc + + + + + + \ No newline at end of file diff --git a/AS400NaturalCustomerInAppSvc/operations/readCustomerInterview/xq/AS400NaturalCustomerInAppSvc_readCustomerInterview_CanonicalToInput.xqy b/AS400NaturalCustomerInAppSvc/operations/readCustomerInterview/xq/AS400NaturalCustomerInAppSvc_readCustomerInterview_CanonicalToInput.xqy new file mode 100644 index 0000000..4656fab --- /dev/null +++ b/AS400NaturalCustomerInAppSvc/operations/readCustomerInterview/xq/AS400NaturalCustomerInAppSvc_readCustomerInterview_CanonicalToInput.xqy @@ -0,0 +1,118 @@ +xquery version "1.0" encoding "utf-8"; + +(:: OracleAnnotationVersion "1.0" ::) + +declare namespace ns6="http://Obi_Wan/EjecutaTRX"; +(:: import schema at "../xsd/AS400NaturalCustomerInAppSvc_readCustomerInterview.xsd" ::) +declare namespace ns29="http://xmlns.banesco.com/Service/NaturalCustomerMgmtSvc"; +(:: import schema at "../../../../BanescoCommonArtifacts/xsd/canonical/Services/NaturalCustomerMgmtSvc.xsd" ::) + +declare namespace ns25 = "http://xmlns.banesco.com/EnterpriseObjects/Addr"; +declare namespace ns26 = "http://xmlns.banesco.com/EnterpriseObjects/MsgRqHdr"; +declare namespace ns27 = "http://xmlns.banesco.com/EnterpriseObjects/Status"; +declare namespace ns28 = "http://xmlns.banesco.com/EnterpriseObjects/TradeRegistry"; +declare namespace ns21 = "http://xmlns.banesco.com/EnterpriseObjects/PersonInfo_v2.0"; +declare namespace ns22 = "http://xmlns.banesco.com/EnterpriseObjects/EmploymentData_v2.0"; +declare namespace ns23 = "http://xmlns.banesco.com/EnterpriseObjects/Addr_v2.0"; +declare namespace ns24 = "http://xmlns.banesco.com/EnterpriseObjects/Service"; +declare namespace ns20 = "http://xmlns.banesco.com/EnterpriseObjects/Taxes_v2.0"; +declare namespace xf = "http://tempuri.org/AS400NaturalCustomerInAppSvc/operations/readCustomerInterview/xq/AS400NaturalCustomerInAppSvc_readCustomerInterview_CanonicalToInput/"; +declare namespace ns16 = "http://xmlns.banesco.com/EnterpriseObjects/ContactInfo_v2.0"; +declare namespace ns17 = "http://xmlns.banesco.com/EnterpriseObjects/CommonComplexType"; +declare namespace ns14 = "http://xmlns.banesco.com/EnterpriseObjects/Product"; +declare namespace ns15 = "http://xmlns.banesco.com/EnterpriseObjects/PersonName"; +declare namespace ns18 = "http://xmlns.banesco.com/EnterpriseObjects/Banking"; +declare namespace ns19 = "http://xmlns.banesco.com/EnterpriseObjects/NaturalCustomer"; +declare namespace ns9 = "http://xmlns.banesco.com/EnterpriseObjects/Organization"; +declare namespace ns32 = "http://xmlns.banesco.com/EnterpriseObjects/PersonInfo"; +declare namespace ns33 = "http://xmlns.banesco.com/EnterpriseObjects/Score"; +declare namespace ns30 = "http://xmlns.banesco.com/Service/MessageEnrichUtilMgmtSvc"; +declare namespace ns12 = "http://xmlns.banesco.com/EnterpriseObjects/Organization_v2.0"; +declare namespace ns5 = "http://xmlns.banesco.com/EnterpriseObjects/Contact"; +declare namespace ns13 = "http://xmlns.banesco.com/EnterpriseObjects/Chk"; +declare namespace ns31 = "http://xmlns.banesco.com/EnterpriseObjects/AffiliationSvc"; +declare namespace ns7 = "http://xmlns.banesco.com/EnterpriseObjects/Risk"; +declare namespace ns10 = "http://xmlns.banesco.com/EnterpriseObjects/Ref_v2.0"; +declare namespace ns8 = "http://xmlns.banesco.com/EnterpriseObjects/Investment"; +declare namespace ns11 = "http://xmlns.banesco.com/EnterpriseObjects/Loan"; +declare namespace ns2 = "http://xmlns.banesco.com/EnterpriseObjects/Fee"; +declare namespace ns1 = "http://xmlns.banesco.com/EnterpriseObjects/RegulatoryInfo"; +declare namespace ns4 = "http://xmlns.banesco.com/EnterpriseObjects/Bankinfo"; +declare namespace ns3 = "http://xmlns.banesco.com/EnterpriseObjects/FinancialInfo"; +declare namespace ns0 = "http://xmlns.banesco.com/EnterpriseObjects/CustVerificationList"; + +import module namespace xqu="http://xmlns.banesco.com/xquey-functions" at "../../../../BanescoCommonArtifacts/xq/libraries/AS400Util.xqy", "../../../../BanescoCommonArtifacts/xq/libraries/dateTimeUtil.xqy"; + +declare function xf:AS400NaturalCustomerInAppSvc_readCustomerInterview_CanonicalToInput($readCustomerInterview_Rq1 as element(ns29:readCustomerInterview_Rq), + $readDVM_Rs1 as element(ns30:readDVM_Rs)) + as element(ns6:EjecutaTRX) { + + { data($readCustomerInterview_Rq1/ns29:MsgRqHdr/ns26:RequestId) } + { data($readCustomerInterview_Rq1/ns29:MsgRqHdr/ns26:OperatorCode) } + { data($readCustomerInterview_Rq1/ns29:MsgRqHdr/ns26:NetworkTrnInfo[1]/ns26:AgencyCode) } + { data($readDVM_Rs1/ns30:Outputs/ns30:Output[1]/ns30:Attributes/ns30:Attribute[./ns30:Name='INDLINEA']/ns30:Value) } + { data($readDVM_Rs1/ns30:Outputs/ns30:Output[1]/ns30:Attributes/ns30:Attribute[./ns30:Name='CRITREV']/ns30:Value) } + { data($readDVM_Rs1/ns30:Outputs/ns30:Output[1]/ns30:Attributes/ns30:Attribute[./ns30:Name='INDCONT']/ns30:Value) } + { data($readCustomerInterview_Rq1/ns29:MsgRqHdr/ns26:NetworkTrnInfo[1]/ns26:BankId) } + { data($readCustomerInterview_Rq1/ns29:MsgRqHdr/ns26:SourceChannelCode) } + { data($readCustomerInterview_Rq1/ns29:MsgRqHdr/ns26:NetworkTrnInfo[1]/ns26:ChannelUserId) } + + { xqu:day-from-date-leftpadding(data($readCustomerInterview_Rq1/ns29:MsgRqHdr/ns26:NetworkTrnInfo[1]/ns26:TransactionDate)) } + { xqu:month-from-date-leftpadding(data($readCustomerInterview_Rq1/ns29:MsgRqHdr/ns26:NetworkTrnInfo[1]/ns26:TransactionDate)) } + { xqu:year-from-date-leftpadding(data($readCustomerInterview_Rq1/ns29:MsgRqHdr/ns26:NetworkTrnInfo[1]/ns26:TransactionDate)) } + + + { xqu:hours-from-time-leftpadding(data($readCustomerInterview_Rq1/ns29:MsgRqHdr/ns26:NetworkTrnInfo[1]/ns26:TransactionTime)) } + { xqu:minutes-from-time-leftpadding(data($readCustomerInterview_Rq1/ns29:MsgRqHdr/ns26:NetworkTrnInfo[1]/ns26:TransactionTime)) } + { xqu:seconds-from-time-leftpadding(data($readCustomerInterview_Rq1/ns29:MsgRqHdr/ns26:NetworkTrnInfo[1]/ns26:TransactionTime)) } + + + + { + (: Caso VB1762_Reg1065 :) + if(data($readDVM_Rs1/ns30:Outputs/ns30:Output[1]/ns30:Attributes/ns30:Attribute[./ns30:Name='NUMREG']/ns30:Value)='1065')then( + + C + { data($readCustomerInterview_Rq1/ns29:NaturalCustomer/ns19:CustId[1]/ns19:CustPermId) } + 001 + + + + + + + + + + + + + + + + + + + + + + + + + )else() + } + + + +}; + +declare variable $readCustomerInterview_Rq1 as element(ns29:readCustomerInterview_Rq) external; +declare variable $readDVM_Rs1 as element(ns30:readDVM_Rs) external; + +xf:AS400NaturalCustomerInAppSvc_readCustomerInterview_CanonicalToInput($readCustomerInterview_Rq1, + $readDVM_Rs1) \ No newline at end of file diff --git a/AS400NaturalCustomerInAppSvc/operations/readCustomerInterview/xq/AS400NaturalCustomerInAppSvc_readCustomerInterview_InputToCanonical.xqy b/AS400NaturalCustomerInAppSvc/operations/readCustomerInterview/xq/AS400NaturalCustomerInAppSvc_readCustomerInterview_InputToCanonical.xqy new file mode 100644 index 0000000..b9e7a87 --- /dev/null +++ b/AS400NaturalCustomerInAppSvc/operations/readCustomerInterview/xq/AS400NaturalCustomerInAppSvc_readCustomerInterview_InputToCanonical.xqy @@ -0,0 +1,177 @@ +xquery version "1.0" encoding "utf-8"; + +(:: OracleAnnotationVersion "1.0" ::) + +declare namespace ns7="http://Obi_Wan/EjecutaTRX"; +(:: import schema at "../xsd/AS400NaturalCustomerInAppSvc_readCustomerInterview.xsd" ::) +declare namespace ns30="http://xmlns.banesco.com/Service/NaturalCustomerMgmtSvc"; +(:: import schema at "../../../../BanescoCommonArtifacts/xsd/canonical/Services/NaturalCustomerMgmtSvc.xsd" ::) + +declare namespace ns29 = "http://xmlns.banesco.com/EnterpriseObjects/TradeRegistry"; +declare namespace ns25 = "http://xmlns.banesco.com/EnterpriseObjects/Service"; +declare namespace ns26 = "http://xmlns.banesco.com/EnterpriseObjects/Addr"; +declare namespace ns27 = "http://xmlns.banesco.com/EnterpriseObjects/MsgRqHdr"; +declare namespace ns28 = "http://xmlns.banesco.com/EnterpriseObjects/Status"; +declare namespace ns21 = "http://xmlns.banesco.com/EnterpriseObjects/PersonInfo_v2.0"; +declare namespace ns22 = "http://xmlns.banesco.com/EnterpriseObjects/EmploymentData_v2.0"; +declare namespace ns23 = "http://xmlns.banesco.com/EnterpriseObjects/MsgRsHdr"; +declare namespace ns24 = "http://xmlns.banesco.com/EnterpriseObjects/Addr_v2.0"; +declare namespace ns20 = "http://xmlns.banesco.com/EnterpriseObjects/Taxes_v2.0"; +declare namespace xf = "http://tempuri.org/AS400NaturalCustomerInAppSvc/operations/readCustomerInterview/xq/AS400NaturalCustomerInAppSvc_readCustomerInterview_InputToCanonical/"; +declare namespace ns16 = "http://xmlns.banesco.com/EnterpriseObjects/ContactInfo_v2.0"; +declare namespace ns17 = "http://xmlns.banesco.com/EnterpriseObjects/CommonComplexType"; +declare namespace ns14 = "http://xmlns.banesco.com/EnterpriseObjects/Product"; +declare namespace ns15 = "http://xmlns.banesco.com/EnterpriseObjects/PersonName"; +declare namespace ns18 = "http://xmlns.banesco.com/EnterpriseObjects/Banking"; +declare namespace ns19 = "http://xmlns.banesco.com/EnterpriseObjects/NaturalCustomer"; +declare namespace ns9 = "http://xmlns.banesco.com/EnterpriseObjects/Organization"; +declare namespace ns32 = "http://xmlns.banesco.com/EnterpriseObjects/PersonInfo"; +declare namespace ns33 = "http://xmlns.banesco.com/EnterpriseObjects/Score"; +declare namespace ns12 = "http://xmlns.banesco.com/EnterpriseObjects/Organization_v2.0"; +declare namespace ns5 = "http://xmlns.banesco.com/EnterpriseObjects/Contact"; +declare namespace ns13 = "http://xmlns.banesco.com/EnterpriseObjects/Chk"; +declare namespace ns31 = "http://xmlns.banesco.com/EnterpriseObjects/AffiliationSvc"; +declare namespace ns6 = "http://xmlns.banesco.com/EnterpriseObjects/Risk"; +declare namespace ns10 = "http://xmlns.banesco.com/EnterpriseObjects/Ref_v2.0"; +declare namespace ns11 = "http://xmlns.banesco.com/EnterpriseObjects/Loan"; +declare namespace ns8 = "http://xmlns.banesco.com/EnterpriseObjects/Investment"; +declare namespace ns2 = "http://xmlns.banesco.com/EnterpriseObjects/Fee"; +declare namespace ns1 = "http://xmlns.banesco.com/EnterpriseObjects/RegulatoryInfo"; +declare namespace ns4 = "http://xmlns.banesco.com/EnterpriseObjects/Bankinfo"; +declare namespace ns3 = "http://xmlns.banesco.com/EnterpriseObjects/FinancialInfo"; +declare namespace ns0 = "http://xmlns.banesco.com/EnterpriseObjects/CustVerificationList"; + +declare namespace stat = "http://xmlns.banesco.com/EnterpriseObjects/Status"; + +import module namespace xqu="http://xmlns.banesco.com/xquey-functions" at "../../../../BanescoCommonArtifacts/xq/libraries/AS400Util.xqy", "../../../../BanescoCommonArtifacts/xq/libraries/dateTimeUtil.xqy"; + +declare function xf:AS400NaturalCustomerInAppSvc_readCustomerInterview_InputToCanonical($ejecutaTRXResponse1 as element(ns7:EjecutaTRXResponse), + $readCustomerInterview_Rq1 as element(ns30:readCustomerInterview_Rq), + $dvm as element(*)) + as element(ns30:readCustomerInterview_Rs) { + + + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/@NUMREG) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/@NOCDTOSAL) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/@CODTRN) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/@CODSUP) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/@TIPOPER) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/@CONTRN) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/@DSCREG) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/@NUMREG) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/@TIPTRN) } + { data($readCustomerInterview_Rq1/ns30:MsgRqHdr/ns27:RequestId) } + AS400 + + { + if(fn:boolean(data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:CODERR1)) or + fn:boolean(data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:CODERR2)) or + fn:boolean(data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:CODERR3)) or + fn:boolean(data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:CODERR4)) or + fn:boolean(data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/ns7:Respuesta[1]/ns7:MSJERR)))then( + + {xqu:get-status($ejecutaTRXResponse1, $dvm)/*} + + )else if(data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/ns7:Respuesta[1]/@NUMREG)="1065")then( + (: Caso VB1762_Reg1065 :) + + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:EDICLA) } + + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:TIPOCLI) } + + + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:TELFEXT) } + + + + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:PAISNAC) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:PAISRES) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:SEGNAC) } + + NUMERO TIN + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:NROTIN) } + { + for $FDESTIN in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:FDESTIN + return + if(data($FDESTIN)!='' and data($FDESTIN)!='00000000')then( + { xqu:formatAAAAMMDD(data($FDESTIN)) } + )else() + } + { + for $FHASTIN in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:FHASTIN + return + if(data($FHASTIN)!='' and data($FHASTIN)!='00000000')then( + { xqu:formatAAAAMMDD(data($FHASTIN)) } + )else() + } + + + NUMERO SEGURO SOCIAL + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:SEGSOC) } + + + GREENCAR + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:GREENCAR) } + { + for $FDESGRE in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:FDESGRE + return + if(data($FDESGRE)!='' and data($FDESGRE)!='00000000')then( + { xqu:formatAAAAMMDD(data($FDESGRE)) } + )else() + } + { + for $FHASGRE in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:FHASGRE + return + if(data($FHASGRE)!='' and data($FHASGRE)!='00000000')then( + { xqu:formatAAAAMMDD(data($FHASGRE)) } + )else() + } + + + NUMERO GIN + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:GIN) } + { + for $FDESGIN in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:FDESGIN + return + if(data($FDESGIN)!='' and data($FDESGIN)!='00000000')then( + { xqu:formatAAAAMMDD(data($FDESGIN)) } + )else() + } + { + for $FHASGIN in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:FHASGIN + return + if(data($FHASGIN)!='' and data($FHASGIN)!='00000000')then( + { xqu:formatAAAAMMDD(data($FHASGIN)) } + )else() + } + + + + + + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:PCONSEMP) } + + + + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:DIREXT) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:CIUPROV) } + + + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:RIMPIRS) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:PREG1) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:PREG2) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:PREG3) } + + + )else() + } + +}; + +declare variable $ejecutaTRXResponse1 as element(ns7:EjecutaTRXResponse) external; +declare variable $readCustomerInterview_Rq1 as element(ns30:readCustomerInterview_Rq) external; +declare variable $dvm as element(*) external; + +xf:AS400NaturalCustomerInAppSvc_readCustomerInterview_InputToCanonical($ejecutaTRXResponse1, + $readCustomerInterview_Rq1, + $dvm) \ No newline at end of file diff --git a/AS400NaturalCustomerInAppSvc/operations/readCustomerInterview/xsd/AS400NaturalCustomerInAppSvc_readCustomerInterview.xsd b/AS400NaturalCustomerInAppSvc/operations/readCustomerInterview/xsd/AS400NaturalCustomerInAppSvc_readCustomerInterview.xsd new file mode 100644 index 0000000..78953e1 --- /dev/null +++ b/AS400NaturalCustomerInAppSvc/operations/readCustomerInterview/xsd/AS400NaturalCustomerInAppSvc_readCustomerInterview.xsd @@ -0,0 +1,325 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/AS400NaturalCustomerInAppSvc/operations/readCustomerRelationship/proxy/AS400NaturalCustomerInAppSvc_readCustomerRelationship.pipeline b/AS400NaturalCustomerInAppSvc/operations/readCustomerRelationship/proxy/AS400NaturalCustomerInAppSvc_readCustomerRelationship.pipeline new file mode 100644 index 0000000..2746741 --- /dev/null +++ b/AS400NaturalCustomerInAppSvc/operations/readCustomerRelationship/proxy/AS400NaturalCustomerInAppSvc_readCustomerRelationship.pipeline @@ -0,0 +1,700 @@ + + + + + + + AS400NaturalCustomerInAppSvcSOAP + http://xmlns.banesco.com/ApplicationService/AS400NaturalCustomerInAppSvc + + + + 1.0 + + + + + + + + + _ActionId-N3f579cff.77e31d8c.0.156c73c5fb5.N7f69 + + "Node: NOT-DEFINED Stage: NOT-DEFINED" + + + + _ActionId-N3f579cff.77e31d8c.0.156c73c5fb5.N7f68 + + + exists($fault[ctx:location/ctx:stage= "DVMs"]) + + + + _ActionId-N3f579cff.77e31d8c.0.156c73c5fb5.N7f66 + + concat("DVMs ", fn-bea:serialize($dvmRequest)) + + + + + + + exists($fault/ctx:location) + + + + _ActionId-N3f579cff.77e31d8c.0.156c73c5fb5.N7f64 + + concat("Node: ", data($fault/ctx:location/ctx:node), " Stage: ",data($fault/ctx:location/ctx:stage)) + + + + + + + _ActionId-N3f579cff.77e31d8c.0.156c73c5fb5.N7f63 + error + + fn:concat('[',fn:current-dateTime(),'][MessageID : ',$messageID,'][Global Error Handler][',fn:tokenize($inbound/@name,'\$')[last()],'/',$operation,'- message : ',$message,' - fault: ',fn-bea:serialize($fault),' - body : ',fn-bea:serialize($backupBody/*),'][Global Error Handler]') + + Error Global + + + _ActionId-N3f579cff.77e31d8c.0.156c73c5fb5.N7f62 + + Banesco: Oracle Service Bus Error + fatal + + fn:concat('[',fn:current-dateTime(),'][MessageID : ',$messageID,'][Global Error Handler][',fn:tokenize($inbound/@name,'\$')[last()],'/',$operation,'- message : ',$message,' - fault: ',fn-bea:serialize($fault),' - body : ',fn-bea:serialize($backupBody/*),'][Global Error Handler]') + + + + _ActionId-N3f579cff.77e31d8c.0.156c73c5fb5.N7f61 + + + + + $inbound + + + $backupBody + + + $fault + + + + + + _ActionId-N3f579cff.77e31d8c.0.156c73c5fb5.N7f60 + + ./* + + http://xmlns.banesco.com/Service/MgmtSvc + + + _ActionId-N3f579cff.77e31d8c.0.156c73c5fb5.N7f5f + + . + + http://xmlns.banesco.com/Service/MgmtSvc + + + _ActionId-N3f579cff.77e31d8c.0.156c73c5fb5.N7f5e + + . + + + $message + + + + _ActionId-N3f579cff.77e31d8c.0.156c73c5fb5.N7f5d + + + + + + + + + + _ActionId-a7c048f.N15255722.0.157c4111c0e.N7e51 + + $header + + + + _ActionId-a7c048f.N15255722.0.157c4111c0e.N7e50 + + $body + + + + _ActionId-N56015f30.7f264938.0.15a951a94ef.N7ff2 + + $proxyName + + + + + + + + + + + + + + _ActionId-N3f579cff.77e31d8c.0.156c73c5fb5.N7f14 + + nat:readCustomerRelationship_Rq + body + + ./nat:readCustomerRelationship_Rq + + + + + + + + + + + _ActionId-N3f579cff.77e31d8c.0.156c73c5fb5.N7f0c + + readDVM + + dvmRequest + + + dvmResponse + + + + _ActionId-N3f579cff.77e31d8c.0.156c73c5fb5.N7f09 + + + + + $body/nat:readCustomerRelationship_Rq/nat:MsgRqHdr + + + + + + + + + + + + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7ffd + + . + + + + + + $dvmResponse + + + $body/nat:readCustomerRelationship_Rq + + + + + + + + + + + + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7f71 + + readProtocoloVB + + vbRequest + + + vbResponse + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7f70 + + + + + $body/direct:EjecutaTRX + + + $backupBody/nat:readCustomerRelationship_Rq/nat:MsgRqHdr + + + + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7f6f + + + + + fn:upper-case($vbResponse/mes:Status/stat:StatusCode) + "OK" + + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7f6d + + . + + + $vbResponse/direct:EjecutaTRX + + + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7f6c + + . + + + + + + $inbound + + + $vbResponse + + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7f6b + + ./* + + http://xmlns.banesco.com/Service/MgmtSvc + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7f6a + + ././* + + http://xmlns.banesco.com/Service/MgmtSvc + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7f69 + + + + + + + + + + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7f62 + + ejec:EjecutaTRX + body + + ./direct:EjecutaTRX + + + + + + + + + + + + + _ActionId-a7c0431.N454d238d.0.1673c47c247.N7f0e + + + + + data($body/direct:EjecutaTRXResponse/direct:EjecutaTRXResult/direct:TRXSResults/direct:Respuestas[1]/direct:Respuesta[1]/@NUMREG) + "1122" + + + + + + _ActionId-a7c0431.N454d238d.0.1673c47c247.N7f09 + + ejec:EjecutaTRXResponse + body + + ./direct:EjecutaTRXResponse + + + + + + + _ActionId-N3f579cff.77e31d8c.0.156c73c5fb5.N7f11 + + ejec:EjecutaTRXResponse + body + + ./direct:EjecutaTRXResponse + + + + + + + + + + + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7e06 + + "<dvm>" + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7e05 + + + exists($body/direct:EjecutaTRXResponse/direct:EjecutaTRXResult/direct:TRXSResults/direct:Respuestas[1]/direct:Respuesta[1]/@NUMREG) + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7e03 + + readDVM + + dvmRequest + + + dvmResponse + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7e02 + + . + + + + + + "DVM_RESPONSE_CODE" + + + "VC" + + + $body/direct:EjecutaTRXResponse/direct:EjecutaTRXResult/direct:TRXSResults/direct:Respuestas[1]/direct:Respuesta[1]/@NUMREG + + + $backupBody/nat:readCustomerRelationship_Rq/nat:MsgRqHdr + + + "AS400" + + + + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7e01 + + concat($dvm, "<numreg>",$dvmResponse/ns:Outputs/ns:Output[1]/ns:Attributes/ns:Attribute[1]/ns:Value/text(),"</numreg>") + + + + + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7e00 + + concat($dvm, "<numreg></numreg>") + + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7dff + + "" + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7dfe + + + exists($body/direct:EjecutaTRXResponse/direct:EjecutaTRXResult/direct:TRXSResults/direct:Respuestas/direct:Respuesta/direct:CODERR1) + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7dfc + + concat($errors,$body/direct:EjecutaTRXResponse/direct:EjecutaTRXResult/direct:TRXSResults/direct:Respuestas/direct:Respuesta/direct:CODERR1,",") + + + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7dfb + + concat($dvm, "<coderr1></coderr1>") + + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7dfa + + + exists($body/direct:EjecutaTRXResponse/direct:EjecutaTRXResult/direct:TRXSResults/direct:Respuestas/direct:Respuesta/direct:CODERR2) + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7df8 + + concat($errors,$body/direct:EjecutaTRXResponse/direct:EjecutaTRXResult/direct:TRXSResults/direct:Respuestas/direct:Respuesta/direct:CODERR2, ",") + + + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7df7 + + concat($dvm, "<coderr2></coderr2>") + + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7df6 + + + exists($body/direct:EjecutaTRXResponse/direct:EjecutaTRXResult/direct:TRXSResults/direct:Respuestas/direct:Respuesta/direct:CODERR3) + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7df4 + + concat($errors,$body/direct:EjecutaTRXResponse/direct:EjecutaTRXResult/direct:TRXSResults/direct:Respuestas/direct:Respuesta/direct:CODERR3, ",") + + + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7df3 + + concat($dvm, "<coderr3></coderr3>") + + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7df2 + + + exists($body/direct:EjecutaTRXResponse/direct:EjecutaTRXResult/direct:TRXSResults/direct:Respuestas/direct:Respuesta/direct:CODERR4) + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7df0 + + concat($errors,$body/direct:EjecutaTRXResponse/direct:EjecutaTRXResult/direct:TRXSResults/direct:Respuestas/direct:Respuesta/direct:CODERR4) + + + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7def + + concat($dvm, "<coderr4></coderr4>") + + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7dee + + + + + $errors + "" + + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7dec + + readDVM + + dvmRequest + + + dvmResponse + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7deb + + . + + + + + + "DVM_MESSAGE_ERROR" + + + "MESSAGE" + + + $errors + + + $backupBody/nat:readCustomerRelationship_Rq/nat:MsgRqHdr + + + "AS400" + + + + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7dea + + ",$dvmResponse/ns:Outputs/ns:Output[1]/ns:Attributes/ns:Attribute[1]/ns:Value/text(),"",$dvmResponse/ns:Outputs/ns:Output[2]/ns:Attributes/ns:Attribute[1]/ns:Value/text(),"",$dvmResponse/ns:Outputs/ns:Output[3]/ns:Attributes/ns:Attribute[1]/ns:Value/text(),"",$dvmResponse/ns:Outputs/ns:Output[4]/ns:Attributes/ns:Attribute[1]/ns:Value/text(),"")]]> + + + + + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7de9 + + concat($dvm, "</dvm>") + + + + + + + + + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7de5 + + . + + + + + + data($backupBody/nat:readCustomerRelationship_Rq/nat:MsgRqHdr/msg:RequestId) + + + $body/direct:EjecutaTRXResponse + + + fn-bea:inlinedXML($dvm) + + + + + + + + + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7de1 + + nat:readCustomerRelationship_Rs + body + + ./nat:readCustomerRelationship_Rs + + + + + + + + request-a7c048f.N15255722.0.157c4111c0e.N7e53 + response-a7c048f.N15255722.0.157c4111c0e.N7e4f + + + request-N3f579cff.77e31d8c.0.156c73c5fb5.N7f1a + response-N3f579cff.77e31d8c.0.156c73c5fb5.N7f19 + + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7ef9 + + CallVBAny + + + + + + + + proxyName + backupHeader + backupBody + + + \ No newline at end of file diff --git a/AS400NaturalCustomerInAppSvc/operations/readCustomerRelationship/xq/AS400NaturalCustomerInAppSvc_readCustomerRelationship_CanonicalToInput.xqy b/AS400NaturalCustomerInAppSvc/operations/readCustomerRelationship/xq/AS400NaturalCustomerInAppSvc_readCustomerRelationship_CanonicalToInput.xqy new file mode 100644 index 0000000..5b94a46 --- /dev/null +++ b/AS400NaturalCustomerInAppSvc/operations/readCustomerRelationship/xq/AS400NaturalCustomerInAppSvc_readCustomerRelationship_CanonicalToInput.xqy @@ -0,0 +1,78 @@ +xquery version "1.0" encoding "utf-8"; + +(:: OracleAnnotationVersion "1.0" ::) + +declare namespace ns3="http://Obi_Wan/EjecutaTRX"; +(:: import schema at "../xsd/AS400NaturalCustomerInAppSvc_readCustomerRelationship.xsd" ::) +declare namespace ns6="http://xmlns.banesco.com/Service/NaturalCustomerMgmtSvc"; +(:: import schema at "../../../../BanescoCommonArtifacts/xsd/canonical/Services/NaturalCustomerMgmtSvc.xsd" ::) + +declare namespace ns0 = "http://xmlns.banesco.com/EnterpriseObjects/NaturalCustomer"; +declare namespace ns1 = "http://xmlns.banesco.com/EnterpriseObjects/PersonInfo_v2.0"; +declare namespace ns5 = "http://xmlns.banesco.com/EnterpriseObjects/MsgRqHdr"; +declare namespace ns12 = "http://xmlns.banesco.com/Service/MessageEnrichUtilMgmtSvc"; +declare namespace xf = "http://tempuri.org/AS400NaturalCustomerInAppSvc/operations/readCustomerRelationship/xq/AS400NaturalCustomerInAppSvc_readCustomerRelationship_CanonicalToInput/"; + +import module namespace xqu="http://xmlns.banesco.com/xquey-functions" at "../../../../BanescoCommonArtifacts/xq/libraries/AS400Util.xqy", "../../../../BanescoCommonArtifacts/xq/libraries/dateTimeUtil.xqy"; + +declare function xf:AS400NaturalCustomerInAppSvc_readCustomerRelationship_CanonicalToInput($readCustomerRelationship_Rq1 as element(ns6:readCustomerRelationship_Rq), $dvmResponse as element(ns12:readDVM_Rs)) + as element(ns3:EjecutaTRX) { + + { data($readCustomerRelationship_Rq1/ns6:MsgRqHdr/ns5:OperatorCode) } + { data($readCustomerRelationship_Rq1/ns6:MsgRqHdr/ns5:NetworkTrnInfo/ns5:AgencyCode) } + { data($dvmResponse/ns12:Outputs/ns12:Output[1]/ns12:Attributes/ns12:Attribute[./ns12:Name='INDLINEA']/ns12:Value) } + { data($dvmResponse/ns12:Outputs/ns12:Output[1]/ns12:Attributes/ns12:Attribute[./ns12:Name='CRITREV']/ns12:Value) } + { data($dvmResponse/ns12:Outputs/ns12:Output[1]/ns12:Attributes/ns12:Attribute[./ns12:Name='INDCONT']/ns12:Value) } + { data($readCustomerRelationship_Rq1/ns6:MsgRqHdr/ns5:NetworkTrnInfo[1]/ns5:BankId) } + { data($readCustomerRelationship_Rq1/ns6:MsgRqHdr/ns5:SourceChannelCode) } + { data($readCustomerRelationship_Rq1/ns6:MsgRqHdr/ns5:NetworkTrnInfo[1]/ns5:ChannelUserId) } + + { xqu:day-from-date-leftpadding(data($readCustomerRelationship_Rq1/ns6:MsgRqHdr/ns5:NetworkTrnInfo/ns5:TransactionDate)) } + { xqu:month-from-date-leftpadding(data($readCustomerRelationship_Rq1/ns6:MsgRqHdr/ns5:NetworkTrnInfo/ns5:TransactionDate)) } + { xqu:year-from-date-leftpadding(data($readCustomerRelationship_Rq1/ns6:MsgRqHdr/ns5:NetworkTrnInfo/ns5:TransactionDate)) } + + + { xqu:hours-from-time-leftpadding(data($readCustomerRelationship_Rq1/ns6:MsgRqHdr/ns5:NetworkTrnInfo/ns5:TransactionTime)) } + { xqu:minutes-from-time-leftpadding(data($readCustomerRelationship_Rq1/ns6:MsgRqHdr/ns5:NetworkTrnInfo/ns5:TransactionTime)) } + { xqu:seconds-from-time-leftpadding(data($readCustomerRelationship_Rq1/ns6:MsgRqHdr/ns5:NetworkTrnInfo/ns5:TransactionTime)) } + + + + + { + (:Caso VB8932_Reg2014 y Caso VB1836_Reg1120:) + if(data($dvmResponse/ns12:Outputs/ns12:Output[1]/ns12:Attributes/ns12:Attribute[./ns12:Name='NUMREG']/ns12:Value)='2014' or + data($dvmResponse/ns12:Outputs/ns12:Output[1]/ns12:Attributes/ns12:Attribute[./ns12:Name='NUMREG']/ns12:Value)='1120')then( + + { data($readCustomerRelationship_Rq1/ns6:NaturalCustomer/ns0:CustInfo/ns0:PersonInfo[1]/ns1:GovIssueIdent[1]/ns1:IdentSerialNumPrefix) } + { data($readCustomerRelationship_Rq1/ns6:NaturalCustomer/ns0:CustInfo/ns0:PersonInfo[1]/ns1:GovIssueIdent[1]/ns1:IdentSerialNum) } + /* + )else( + (: Caso VB1835_Reg1119, VB1838_Reg1122, VB1853_Reg1138 :) + if(data($dvmResponse/ns12:Outputs/ns12:Output[1]/ns12:Attributes/ns12:Attribute[./ns12:Name='NUMREG']/ns12:Value)='1119' or + data($dvmResponse/ns12:Outputs/ns12:Output[1]/ns12:Attributes/ns12:Attribute[./ns12:Name='NUMREG']/ns12:Value)='1122' or + data($dvmResponse/ns12:Outputs/ns12:Output[1]/ns12:Attributes/ns12:Attribute[./ns12:Name='NUMREG']/ns12:Value)='1138')then( + + { data($readCustomerRelationship_Rq1/ns6:NaturalCustomer/ns0:CustInfo/ns0:PersonInfo[1]/ns1:GovIssueIdent[1]/ns1:IdentSerialNumPrefix) } + { data($readCustomerRelationship_Rq1/ns6:NaturalCustomer/ns0:CustInfo/ns0:PersonInfo[1]/ns1:GovIssueIdent[1]/ns1:IdentSerialNum) } + /* + )else( + (:Continuar aqui para otros casos de VB y Registro. Validar cada caso con if:) + ) + ) + } + + + + +}; + +declare variable $readCustomerRelationship_Rq1 as element(ns6:readCustomerRelationship_Rq) external; +declare variable $dvmResponse as element (ns12:readDVM_Rs) external; + +xf:AS400NaturalCustomerInAppSvc_readCustomerRelationship_CanonicalToInput($readCustomerRelationship_Rq1, $dvmResponse) \ No newline at end of file diff --git a/AS400NaturalCustomerInAppSvc/operations/readCustomerRelationship/xq/AS400NaturalCustomerInAppSvc_readCustomerRelationship_InputToCanonical.xqy b/AS400NaturalCustomerInAppSvc/operations/readCustomerRelationship/xq/AS400NaturalCustomerInAppSvc_readCustomerRelationship_InputToCanonical.xqy new file mode 100644 index 0000000..c48166e --- /dev/null +++ b/AS400NaturalCustomerInAppSvc/operations/readCustomerRelationship/xq/AS400NaturalCustomerInAppSvc_readCustomerRelationship_InputToCanonical.xqy @@ -0,0 +1,430 @@ +xquery version "1.0" encoding "utf-8"; + +(:: OracleAnnotationVersion "1.0" ::) + +declare namespace ns7="http://Obi_Wan/EjecutaTRX"; +(:: import schema at "../xsd/AS400NaturalCustomerInAppSvc_readCustomerRelationship.xsd" ::) +(:: import schema at "../xsd/AS400NaturalCustomerInAppSvc_readCustomerRelationship_1122.xsd" ::) +declare namespace ns30="http://xmlns.banesco.com/Service/NaturalCustomerMgmtSvc"; +(:: import schema at "../../../../BanescoCommonArtifacts/xsd/canonical/Services/NaturalCustomerMgmtSvc.xsd" ::) + +declare namespace ns29 = "http://xmlns.banesco.com/EnterpriseObjects/CustCrossReference"; +declare namespace ns25 = "http://xmlns.banesco.com/EnterpriseObjects/Service"; +declare namespace ns26 = "http://xmlns.banesco.com/EnterpriseObjects/Addr"; +declare namespace ns27 = "http://xmlns.banesco.com/EnterpriseObjects/Status"; +declare namespace ns28 = "http://xmlns.banesco.com/EnterpriseObjects/TradeRegistry"; +declare namespace ns21 = "http://xmlns.banesco.com/EnterpriseObjects/PersonInfo_v2.0"; +declare namespace ns22 = "http://xmlns.banesco.com/EnterpriseObjects/EmploymentData_v2.0"; +declare namespace ns23 = "http://xmlns.banesco.com/EnterpriseObjects/MsgRsHdr"; +declare namespace ns24 = "http://xmlns.banesco.com/EnterpriseObjects/Addr_v2.0"; +declare namespace ns20 = "http://xmlns.banesco.com/EnterpriseObjects/Taxes_v2.0"; +declare namespace xf = "http://tempuri.org/AS400NaturalCustomerInAppSvc/operations/readCustomerRelationship/xq/AS400NaturalCustomerInAppSvc_readCustomerRelationship_InputToCanonical/"; +declare namespace ns16 = "http://xmlns.banesco.com/EnterpriseObjects/ContactInfo_v2.0"; +declare namespace ns17 = "http://xmlns.banesco.com/EnterpriseObjects/CommonComplexType"; +declare namespace ns14 = "http://xmlns.banesco.com/EnterpriseObjects/Product"; +declare namespace ns15 = "http://xmlns.banesco.com/EnterpriseObjects/PersonName"; +declare namespace ns18 = "http://xmlns.banesco.com/EnterpriseObjects/Banking"; +declare namespace ns19 = "http://xmlns.banesco.com/EnterpriseObjects/NaturalCustomer"; +declare namespace ns9 = "http://xmlns.banesco.com/EnterpriseObjects/Organization"; +declare namespace ns32 = "http://xmlns.banesco.com/EnterpriseObjects/PersonInfo"; +declare namespace ns33 = "http://xmlns.banesco.com/EnterpriseObjects/Score"; +declare namespace ns12 = "http://xmlns.banesco.com/EnterpriseObjects/Organization_v2.0"; +declare namespace ns5 = "http://xmlns.banesco.com/EnterpriseObjects/Contact"; +declare namespace ns6 = "http://xmlns.banesco.com/EnterpriseObjects/Risk"; +declare namespace ns13 = "http://xmlns.banesco.com/EnterpriseObjects/Chk"; +declare namespace ns31 = "http://xmlns.banesco.com/EnterpriseObjects/AffiliationSvc"; +declare namespace ns10 = "http://xmlns.banesco.com/EnterpriseObjects/Ref_v2.0"; +declare namespace ns11 = "http://xmlns.banesco.com/EnterpriseObjects/Loan"; +declare namespace ns8 = "http://xmlns.banesco.com/EnterpriseObjects/Investment"; +declare namespace ns2 = "http://xmlns.banesco.com/EnterpriseObjects/Fee"; +declare namespace ns1 = "http://xmlns.banesco.com/EnterpriseObjects/RegulatoryInfo"; +declare namespace ns4 = "http://xmlns.banesco.com/EnterpriseObjects/Bankinfo"; +declare namespace ns3 = "http://xmlns.banesco.com/EnterpriseObjects/FinancialInfo"; +declare namespace ns0 = "http://xmlns.banesco.com/EnterpriseObjects/CustVerificationList"; + +declare namespace stat = "http://xmlns.banesco.com/EnterpriseObjects/Status"; + +import module namespace xqu="http://xmlns.banesco.com/xquey-functions" at "../../../../BanescoCommonArtifacts/xq/libraries/AS400Util.xqy", "../../../../BanescoCommonArtifacts/xq/libraries/dateTimeUtil.xqy"; + +declare function xf:AS400NaturalCustomerInAppSvc_readCustomerRelationship_InputToCanonical($ejecutaTRXResponse1 as element(ns7:EjecutaTRXResponse), + $RequestId as xs:string, + $dvm as element(*)) + as element(ns30:readCustomerRelationship_Rs) { + + + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/@NUMREG) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/@NOCDTOSAL) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/@CODTRN) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/@CODSUP) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/@TIPOPER) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/@CONTRN) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/@DSCREG) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/@NUMREG) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/@TIPTRN) } + { $RequestId } + AS400 + + { + if(data($dvm/coderr1)!="" or data($dvm/coderr2)!="" or data($dvm/coderr3)!="" or data($dvm/coderr4)!="" or + fn:boolean(data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/ns7:Respuesta[1]/ns7:MSJERR)))then( + + {xqu:get-status($ejecutaTRXResponse1, $dvm)/*} + + )else( + (:Caso VB8932_Reg2014:) + if(data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta/@NUMREG)="2014")then( + + + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:NUMCTP) } + + + + + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:NACCTP) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:CEDCTP) } + + + + { + for $Respuesta in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta + return + + { + if ((data($Respuesta/ns7:FECINI)!='' and + data($Respuesta/ns7:FECINI)!='00000000')) then( + {xqu:formatDate(data($Respuesta/ns7:FECINI))} + )else() + } + + { + if (data($Respuesta/ns7:FECFIN)!='' and + data($Respuesta/ns7:FECFIN)!='00000000') then( + {xqu:formatDate(data($Respuesta/ns7:FECFIN))} + )else() + } + { data($Respuesta/ns7:TIPOP) } + + { data($Respuesta/ns7:CONSEC) } + + + { data($Respuesta/ns7:NACCTH) } + { data($Respuesta/ns7:CEDCTH) } + + { data($Respuesta/ns7:NUMCTH) } + + } + + )else( + (:Caso VB1835_Reg1119:) + if(data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/@NUMREG)="1119")then( + + + { + for $NROCTE in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:NROCTE + return + { data($NROCTE) } + } + + { + for $Respuesta in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta + return + + { + if ((data($Respuesta/ns7:FECINI)!='' and + data($Respuesta/ns7:FECINI)!='00000000')) then( + {xqu:formatDDMMAAAA(data($Respuesta/ns7:FECINI))} + )else() + } + { + for $TIPREF in $Respuesta/ns7:TIPREF + return + { data($TIPREF) } + } + + { + for $INDREF in $Respuesta/ns7:INDREF + return + { data($INDREF) } + } + + + { + for $FECEMI in $Respuesta/ns7:FECEMI + return + if(data($FECEMI)!='' and data($FECEMI)!='00000000')then( + { xqu:formatDDMMAAAA(data($FECEMI)) } + )else() + } + + + { + for $TIPID in $Respuesta/ns7:TIPID + return + { data($TIPID) } + } + { + for $NACRTE in $Respuesta/ns7:NACRTE + return + { data($NACRTE) } + } + { + for $CEDRTE in $Respuesta/ns7:CEDRTE + return + { data($CEDRTE) } + } + + + { + for $NOMBRE in $Respuesta/ns7:NOMBRE + return + { data($NOMBRE) } + } + + + + HABITACION + { + for $NROTLF in $Respuesta/ns7:NROTLF + return + { data($NROTLF) } + } + + + CELULAR + { + for $CELREF in $Respuesta/ns7:CELREF + return + { data($CELREF) } + } + + + { data($Respuesta/ns7:ANTI) } + + { data($Respuesta/ns7:PAISGREF) } + { data($Respuesta/ns7:EDOGREF) } + + + } + + )else( + (:Caso VB1836_Reg1120:) + if(data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/@NUMREG)="1120")then( + + + { + for $NUMIBS in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:NUMIBS + return + { data($NUMIBS) } + } + + + + + { + for $NACCTE in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:NACCTE + return + { data($NACCTE) } + } + { + for $CEDCTE in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:CEDCTE + return + { data($CEDCTE) } + } + + + + { + for $Respuesta in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta + return + + { + if ((data($Respuesta/ns7:FECIREF)!='' and + data($Respuesta/ns7:FECIREF)!='00000000')) then( + {xqu:formatDDMMAAAA(data($Respuesta/ns7:FECIREF))} + )else() + } + + + { + for $INREF in $Respuesta/ns7:INREF + return + { data($INREF) } + } + + + { + for $NUMCTA in $Respuesta/ns7:NUMCTA + return + { data($NUMCTA) } + } + { + for $NOMREF in $Respuesta/ns7:NOMREF + return + { data($NOMREF) } + } + + { + if ((data($Respuesta/ns7:FECEMI)!='' and + data($Respuesta/ns7:FECEMI)!='00000000')) then( + {xqu:formatDDMMAAAA(data($Respuesta/ns7:FECEMI))} + )else() + } + + { + for $RANGO in $Respuesta/ns7:RANGO + return + {xs:double(data($RANGO))} + } + { + for $CATEGORIA in $Respuesta/ns7:CATEGORIA + return + {data($CATEGORIA)} + } + + { + for $CODBANC in $Respuesta/ns7:CODBANC + return + { data($CODBANC) } + } + + + {data($Respuesta/ns7:TMPANTG)} + + } + + )else( + (:Caso VB1838_Reg1122:) + if(data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/@NUMREG)="1122")then( + + for $Respuesta in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta + return + + + { + for $NUMIBS in $Respuesta/ns7:NUMIBS + return + { data($NUMIBS) } + } + + + + + { + for $NACCTE in $Respuesta/ns7:NACCTE + return + { data($NACCTE) } + } + { + for $CEDCTE in $Respuesta/ns7:CEDCTE + return + { data($CEDCTE) } + } + + + + + { + for $FECINI in $Respuesta/ns7:FECINI + return + if ((data($FECINI)!='' and + data($FECINI)!='00000000')) then( + {xqu:formatDDMMAAAA(data($FECINI))} + )else() + } + { + for $FECVEN in $Respuesta/ns7:FECVEN + return + + if ((data($FECVEN)!='' and + data($FECVEN)!='00000000')) then( + {xqu:formatDDMMAAAA(data($FECVEN))} + )else() + } + { + for $RLACION in $Respuesta/ns7:RLACION + return + { data($RLACION) } + } + + + { + for $NOMREG in $Respuesta/ns7:NOMREG + return + { data($NOMREG) } + } + { + for $NUMREG in $Respuesta/ns7:NUMREG + return + { data($NUMREG) } + } + { + for $TOMO in $Respuesta/ns7:TOMO + return + { data($TOMO) } + } + { + for $FOLIO in $Respuesta/ns7:FOLIO + return + { data($FOLIO) } + } + + + + + + )else( + (:Caso VB1853_Reg1138:) + if(data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/@NUMREG)="1138")then( + + + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:NROCTE) } + + + + + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:NACASO) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:CEDASO) } + + + + { + for $Respuesta in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta + return + + { data($Respuesta/ns7:RELASOC) } + + { data($Respuesta/ns7:NACENTE) } + { data($Respuesta/ns7:CEDENTE) } + + + { data($Respuesta/ns7:NOMASO) } + + + { data($Respuesta/ns7:NOMENTE) } + + + { data($Respuesta/ns7:CARGOEMP) } + { data($Respuesta/ns7:PAISCAR) } + + + } + + )else( + (:Continuar aqui para otros casos de VB y Registro. Validar cada caso con if:) + ) + ) + ) + ) + ) + ) + } + +}; + +declare variable $ejecutaTRXResponse1 as element(ns7:EjecutaTRXResponse) external; +declare variable $RequestId as xs:string external; +declare variable $dvm as element(*) external; + +xf:AS400NaturalCustomerInAppSvc_readCustomerRelationship_InputToCanonical($ejecutaTRXResponse1, + $RequestId, + $dvm) \ No newline at end of file diff --git a/AS400NaturalCustomerInAppSvc/operations/readCustomerRelationship/xsd/AS400NaturalCustomerInAppSvc_readCustomerRelationship.xsd b/AS400NaturalCustomerInAppSvc/operations/readCustomerRelationship/xsd/AS400NaturalCustomerInAppSvc_readCustomerRelationship.xsd new file mode 100644 index 0000000..116ede4 --- /dev/null +++ b/AS400NaturalCustomerInAppSvc/operations/readCustomerRelationship/xsd/AS400NaturalCustomerInAppSvc_readCustomerRelationship.xsd @@ -0,0 +1,330 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/AS400NaturalCustomerInAppSvc/operations/readCustomerRelationship/xsd/AS400NaturalCustomerInAppSvc_readCustomerRelationship_1122.xsd b/AS400NaturalCustomerInAppSvc/operations/readCustomerRelationship/xsd/AS400NaturalCustomerInAppSvc_readCustomerRelationship_1122.xsd new file mode 100644 index 0000000..df84c70 --- /dev/null +++ b/AS400NaturalCustomerInAppSvc/operations/readCustomerRelationship/xsd/AS400NaturalCustomerInAppSvc_readCustomerRelationship_1122.xsd @@ -0,0 +1,294 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/AS400NaturalCustomerInAppSvc/operations/updateCustomerData/proxy/AS400NaturalCustomerInAppSvc_updateCustomerData.pipeline b/AS400NaturalCustomerInAppSvc/operations/updateCustomerData/proxy/AS400NaturalCustomerInAppSvc_updateCustomerData.pipeline new file mode 100644 index 0000000..9a7184c --- /dev/null +++ b/AS400NaturalCustomerInAppSvc/operations/updateCustomerData/proxy/AS400NaturalCustomerInAppSvc_updateCustomerData.pipeline @@ -0,0 +1,736 @@ + + + + + + + AS400NaturalCustomerInAppSvcSOAP + http://xmlns.banesco.com/ApplicationService/AS400NaturalCustomerInAppSvc + + + + 1.0 + + + + + + + + + _ActionId-N3f579cff.77e31d8c.0.156c73c5fb5.N7f69 + + "Node: NOT-DEFINED Stage: NOT-DEFINED" + + + + _ActionId-N3f579cff.77e31d8c.0.156c73c5fb5.N7f68 + + + exists($fault[ctx:location/ctx:stage= "DVMs"]) + + + + _ActionId-N3f579cff.77e31d8c.0.156c73c5fb5.N7f66 + + concat("DVMs ", fn-bea:serialize($dvmRequest)) + + + + + + + exists($fault/ctx:location) + + + + _ActionId-N3f579cff.77e31d8c.0.156c73c5fb5.N7f64 + + concat("Node: ", data($fault/ctx:location/ctx:node), " Stage: ",data($fault/ctx:location/ctx:stage)) + + + + + + + _ActionId-N3f579cff.77e31d8c.0.156c73c5fb5.N7f63 + error + + fn:concat('[',fn:current-dateTime(),'][MessageID : ',$messageID,'][Global Error Handler][',fn:tokenize($inbound/@name,'\$')[last()],'/',$operation,'- message : ',$message,' - fault: ',fn-bea:serialize($fault),' - body : ',fn-bea:serialize($backupBody/*),'][Global Error Handler]') + + Error Global + + + _ActionId-N3f579cff.77e31d8c.0.156c73c5fb5.N7f62 + + Banesco: Oracle Service Bus Error + fatal + + fn:concat('[',fn:current-dateTime(),'][MessageID : ',$messageID,'][Global Error Handler][',fn:tokenize($inbound/@name,'\$')[last()],'/',$operation,'- message : ',$message,' - fault: ',fn-bea:serialize($fault),' - body : ',fn-bea:serialize($backupBody/*),'][Global Error Handler]') + + + + _ActionId-N3f579cff.77e31d8c.0.156c73c5fb5.N7f61 + + + + + $inbound + + + $backupBody + + + $fault + + + + + + _ActionId-N3f579cff.77e31d8c.0.156c73c5fb5.N7f60 + + ./* + + http://xmlns.banesco.com/Service/NaturalCustomerMgmtSvc + + + _ActionId-N3f579cff.77e31d8c.0.156c73c5fb5.N7f5f + + . + + http://xmlns.banesco.com/Service/NaturalCustomerMgmtSvc + + + _ActionId-N3f579cff.77e31d8c.0.156c73c5fb5.N7f5e + + . + + + $message + + + + _ActionId-N3f579cff.77e31d8c.0.156c73c5fb5.N7f5d + + + + + + + + + + _ActionId-a7c048f.N15255722.0.157c4111c0e.N7e51 + + $header + + + + _ActionId-a7c048f.N15255722.0.157c4111c0e.N7e50 + + $body + + + + _ActionId-N56015f30.7f264938.0.15a951a94ef.N7ff2 + + $proxyName + + + + + + + + + + + + + + _ActionId-N3f579cff.77e31d8c.0.156c73c5fb5.N7f14 + + nat:updateCustomerData_Rq + body + + ./nat:updateCustomerData_Rq + + + + + + + + + + + _ActionId-N3f579cff.77e31d8c.0.156c73c5fb5.N7f0c + + readDVM + + dvmRequest + + + dvmResponse + + + + _ActionId-N3f579cff.77e31d8c.0.156c73c5fb5.N7f09 + + + + + $backupBody/nat:updateCustomerData_Rq/nat:MsgRqHdr + + + + + + + + + + + + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7ffd + + . + + + + + + $dvmResponse + + + $body/nat:updateCustomerData_Rq + + + + + + + + + + + + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7f71 + + readProtocoloVB + + vbRequest + + + vbResponse + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7f70 + + + + + $body/direct:EjecutaTRX + + + $backupBody/nat:updateCustomerData_Rq/nat:MsgRqHdr + + + + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7f6f + + + + + fn:upper-case($vbResponse/mes:Status/stat:StatusCode) + "OK" + + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7f6d + + . + + + $vbResponse/direct:EjecutaTRX + + + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7f6c + + . + + + + + + $inbound + + + $vbResponse + + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7f6b + + ./* + + http://xmlns.banesco.com/Service/NaturalCustomerMgmtSvc + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7f6a + + ././* + + http://xmlns.banesco.com/Service/NaturalCustomerMgmtSvc + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7f69 + + + + + + + + + + + + + + + + + + _ActionId-a960f41.6595f72c.0.16be24764de.N7ff3 + + + data($backupBody/nat:updateCustomerData_Rq/nat:MsgRqHdr/msg:NetworkTrnInfo/msg:TransactionCode)='8910N' and +data($backupBody/nat:updateCustomerData_Rq/nat:MsgRqHdr/msg:ApplicantData/msg:Application)='PORTALAGS' + + + + _ActionId-a960f41.6595f72c.0.16be24764de.N7ffd + + ./direct:EjecutaTRX/direct:TRXS/direct:ListaTrxs/direct:TRX/@CODSUP + + + concat(data($backupBody/nat:updateCustomerData_Rq/nat:NaturalCustomer/nat1:CustInfo/nat1:PersonInfo/per:GovIssueIdent/per:IdentSerialNumPrefix),data($backupBody/nat:updateCustomerData_Rq/nat:NaturalCustomer/nat1:CustInfo/nat1:PersonInfo/per:GovIssueIdent/per:IdentSerialNum)) + + + + + + + + + + + + + + + _ActionId-a960f41.4d24e6fd.0.16b2846b7b6.N7fd3 + + $body + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7f62 + + ejec:EjecutaTRX + body + + ./direct:EjecutaTRX + + + + + + + + + + + + + _ActionId-N3f579cff.77e31d8c.0.156c73c5fb5.N7f11 + + ejec:EjecutaTRXResponse + body + + ./direct:EjecutaTRXResponse + + + + + + + + + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7e06 + + "<dvm>" + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7e05 + + + exists($body/direct:EjecutaTRXResponse/direct:EjecutaTRXResult/direct:TRXSResults/direct:Respuestas[1]/direct:Respuesta[1]/@NUMREG) + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7e03 + + readDVM + + dvmRequest + + + dvmResponse + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7e02 + + . + + + + + + "DVM_RESPONSE_CODE" + + + "VC" + + + $body/direct:EjecutaTRXResponse/direct:EjecutaTRXResult/direct:TRXSResults/direct:Respuestas[1]/direct:Respuesta[1]/@NUMREG + + + $backupBody/nat:updateCustomerData_Rq/nat:MsgRqHdr + + + "AS400" + + + + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7e01 + + concat($dvm, "<numreg>",$dvmResponse/ns:Outputs/ns:Output[1]/ns:Attributes/ns:Attribute[1]/ns:Value/text(),"</numreg>") + + + + + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7e00 + + concat($dvm, "<numreg></numreg>") + + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7dff + + "" + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7dfe + + + exists($body/direct:EjecutaTRXResponse/direct:EjecutaTRXResult/direct:TRXSResults/direct:Respuestas[1]/direct:Respuesta/direct:CODERR1) + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7dfc + + concat($errors,$body/direct:EjecutaTRXResponse/direct:EjecutaTRXResult/direct:TRXSResults/direct:Respuestas[1]/direct:Respuesta/direct:CODERR1,",") + + + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7dfb + + concat($dvm, "<coderr1></coderr1>") + + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7dfa + + + exists($body/direct:EjecutaTRXResponse/direct:EjecutaTRXResult/direct:TRXSResults/direct:Respuestas[1]/direct:Respuesta/direct:CODERR2) + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7df8 + + concat($errors,$body/direct:EjecutaTRXResponse/direct:EjecutaTRXResult/direct:TRXSResults/direct:Respuestas[1]/direct:Respuesta/direct:CODERR2, ",") + + + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7df7 + + concat($dvm, "<coderr2></coderr2>") + + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7df6 + + + exists($body/direct:EjecutaTRXResponse/direct:EjecutaTRXResult/direct:TRXSResults/direct:Respuestas[1]/direct:Respuesta/direct:CODERR3) + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7df4 + + concat($errors,$body/direct:EjecutaTRXResponse/direct:EjecutaTRXResult/direct:TRXSResults/direct:Respuestas[1]/direct:Respuesta/direct:CODERR3, ",") + + + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7df3 + + concat($dvm, "<coderr3></coderr3>") + + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7df2 + + + exists($body/direct:EjecutaTRXResponse/direct:EjecutaTRXResult/direct:TRXSResults/direct:Respuestas[1]/direct:Respuesta/direct:CODERR4) + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7df0 + + concat($errors,$body/direct:EjecutaTRXResponse/direct:EjecutaTRXResult/direct:TRXSResults/direct:Respuestas[1]/direct:Respuesta/direct:CODERR4) + + + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7def + + concat($dvm, "<coderr4></coderr4>") + + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7dee + + + + + $errors + "" + + + + + + _ActionId-a960f8a.N5f5dd6ea.0.1692f34a3f5.N7e80 + + + (exists($body/direct:EjecutaTRXResponse/direct:EjecutaTRXResult/direct:TRXSResults/direct:Respuestas/direct:Respuesta/direct:DSCERR1) and data($body/direct:EjecutaTRXResponse/direct:EjecutaTRXResult/direct:TRXSResults/direct:Respuestas/direct:Respuesta/direct:DSCERR1)!='') or +(exists($body/direct:EjecutaTRXResponse/direct:EjecutaTRXResult/direct:TRXSResults/direct:Respuestas/direct:Respuesta/direct:DSCERR2) and data($body/direct:EjecutaTRXResponse/direct:EjecutaTRXResult/direct:TRXSResults/direct:Respuestas/direct:Respuesta/direct:DSCERR2)!='') or +(exists($body/direct:EjecutaTRXResponse/direct:EjecutaTRXResult/direct:TRXSResults/direct:Respuestas/direct:Respuesta/direct:DSCERR3) and data($body/direct:EjecutaTRXResponse/direct:EjecutaTRXResult/direct:TRXSResults/direct:Respuestas/direct:Respuesta/direct:DSCERR3)!='') or +(exists($body/direct:EjecutaTRXResponse/direct:EjecutaTRXResult/direct:TRXSResults/direct:Respuestas/direct:Respuesta/direct:DSCERR4) and data($body/direct:EjecutaTRXResponse/direct:EjecutaTRXResult/direct:TRXSResults/direct:Respuestas/direct:Respuesta/direct:DSCERR4)!='') + + + + _ActionId-a960f8a.N5f5dd6ea.0.1692f34a3f5.N7e7e + + ",data($body/direct:EjecutaTRXResponse/direct:EjecutaTRXResult/direct:TRXSResults/direct:Respuestas/direct:Respuesta/direct:DSCERR1),"",data($body/direct:EjecutaTRXResponse/direct:EjecutaTRXResult/direct:TRXSResults/direct:Respuestas/direct:Respuesta/direct:DSCERR2),"",data($body/direct:EjecutaTRXResponse/direct:EjecutaTRXResult/direct:TRXSResults/direct:Respuestas/direct:Respuesta/direct:DSCERR3),"",data($body/direct:EjecutaTRXResponse/direct:EjecutaTRXResult/direct:TRXSResults/direct:Respuestas/direct:Respuesta/direct:DSCERR4),"")]]> + + + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7dec + + readDVM + + dvmRequest + + + dvmResponse + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7deb + + . + + + + + + "DVM_MESSAGE_ERROR" + + + "MESSAGE" + + + $errors + + + $backupBody/nat:updateCustomerData_Rq/nat:MsgRqHdr + + + "AS400" + + + + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7dea + + ",$dvmResponse/ns:Outputs/ns:Output[1]/ns:Attributes/ns:Attribute[1]/ns:Value/text(),"",$dvmResponse/ns:Outputs/ns:Output[2]/ns:Attributes/ns:Attribute[1]/ns:Value/text(),"",$dvmResponse/ns:Outputs/ns:Output[3]/ns:Attributes/ns:Attribute[1]/ns:Value/text(),"",$dvmResponse/ns:Outputs/ns:Output[4]/ns:Attributes/ns:Attribute[1]/ns:Value/text(),"")]]> + + + + + + + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7de9 + + concat($dvm, "</dvm>") + + + + + + + + + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7de5 + + . + + + + + + $backupBody/nat:updateCustomerData_Rq + + + $body/direct:EjecutaTRXResponse + + + $backupTRX/direct:EjecutaTRX + + + fn-bea:inlinedXML($dvm) + + + + + + + + + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7de1 + + nat:updateCustomerData_Rs + body + + ./nat:updateCustomerData_Rs + + + + + + + + request-a7c048f.N15255722.0.157c4111c0e.N7e53 + response-a7c048f.N15255722.0.157c4111c0e.N7e4f + + + request-N3f579cff.77e31d8c.0.156c73c5fb5.N7f1a + response-N3f579cff.77e31d8c.0.156c73c5fb5.N7f19 + + + + + + _ActionId-N3f579cff.3a5f33bd.0.156c7673296.N7ef9 + + CallVBAny + + + + + + + + proxyName + backupHeader + backupBody + + + \ No newline at end of file diff --git a/AS400NaturalCustomerInAppSvc/operations/updateCustomerData/xq/AS400NaturalCustomerInAppSvc_updateCustomerData_CanonicalToInput.xqy b/AS400NaturalCustomerInAppSvc/operations/updateCustomerData/xq/AS400NaturalCustomerInAppSvc_updateCustomerData_CanonicalToInput.xqy new file mode 100644 index 0000000..88e7a52 --- /dev/null +++ b/AS400NaturalCustomerInAppSvc/operations/updateCustomerData/xq/AS400NaturalCustomerInAppSvc_updateCustomerData_CanonicalToInput.xqy @@ -0,0 +1,623 @@ +xquery version "1.0"; +(:: OracleAnnotationVersion "1.0" ::) + +declare namespace ns6 = "http://Obi_Wan/EjecutaTRX"; +(:: import schema at "../xsd/AS400NaturalCustomerInAppSvc_updateCustomerData.xsd" ::) + +declare namespace ns30 = "http://xmlns.banesco.com/Service/NaturalCustomerMgmtSvc"; +(:: import schema at "../../../../BanescoCommonArtifacts/xsd/canonical/Services/NaturalCustomerMgmtSvc.xsd" ::) + +declare namespace ns34 = "http://xmlns.banesco.com/EnterpriseObjects/Account"; +declare namespace ns29 = "http://xmlns.banesco.com/EnterpriseObjects/CustCrossReference"; +declare namespace ns25 = "http://xmlns.banesco.com/EnterpriseObjects/Addr"; +declare namespace ns26 = "http://xmlns.banesco.com/EnterpriseObjects/MsgRqHdr"; +declare namespace ns27 = "http://xmlns.banesco.com/EnterpriseObjects/Status"; +declare namespace ns28 = "http://xmlns.banesco.com/EnterpriseObjects/TradeRegistry"; +declare namespace ns21 = "http://xmlns.banesco.com/EnterpriseObjects/PersonInfo_v2.0"; +declare namespace ns22 = "http://xmlns.banesco.com/EnterpriseObjects/EmploymentData_v2.0"; +declare namespace ns23 = "http://xmlns.banesco.com/EnterpriseObjects/Addr_v2.0"; +declare namespace ns24 = "http://xmlns.banesco.com/EnterpriseObjects/Service"; +declare namespace ns20 = "http://xmlns.banesco.com/EnterpriseObjects/Taxes_v2.0"; +declare namespace xf = "http://tempuri.org/AS400NaturalCustomerInAppSvc/operations/updateCustomerData/xq/AS400NaturalCustomerInAppSvc_updateCustomerData_CanonicalToInput_base/"; +declare namespace ns16 = "http://xmlns.banesco.com/EnterpriseObjects/ContactInfo_v2.0"; +declare namespace ns17 = "http://xmlns.banesco.com/EnterpriseObjects/CommonComplexType"; +declare namespace ns14 = "http://xmlns.banesco.com/EnterpriseObjects/Product"; +declare namespace ns15 = "http://xmlns.banesco.com/EnterpriseObjects/PersonName"; +declare namespace ns18 = "http://xmlns.banesco.com/EnterpriseObjects/Banking"; +declare namespace ns19 = "http://xmlns.banesco.com/EnterpriseObjects/NaturalCustomer"; +declare namespace ns9 = "http://xmlns.banesco.com/EnterpriseObjects/Organization"; +declare namespace ns32 = "http://xmlns.banesco.com/EnterpriseObjects/PersonInfo"; +declare namespace ns33 = "http://xmlns.banesco.com/EnterpriseObjects/Score"; +declare namespace ns5 = "http://xmlns.banesco.com/EnterpriseObjects/Contact"; +declare namespace ns12 = "http://xmlns.banesco.com/EnterpriseObjects/Organization_v2.0"; +declare namespace ns13 = "http://xmlns.banesco.com/EnterpriseObjects/Chk"; +declare namespace ns31 = "http://xmlns.banesco.com/EnterpriseObjects/AffiliationSvc"; +declare namespace ns7 = "http://xmlns.banesco.com/EnterpriseObjects/Risk"; +declare namespace ns10 = "http://xmlns.banesco.com/EnterpriseObjects/Ref_v2.0"; +declare namespace ns8 = "http://xmlns.banesco.com/EnterpriseObjects/Investment"; +declare namespace ns11 = "http://xmlns.banesco.com/EnterpriseObjects/Loan"; +declare namespace ns2 = "http://xmlns.banesco.com/EnterpriseObjects/Fee"; +declare namespace ns1 = "http://xmlns.banesco.com/EnterpriseObjects/RegulatoryInfo"; +declare namespace ns4 = "http://xmlns.banesco.com/EnterpriseObjects/Bankinfo"; +declare namespace ns3 = "http://xmlns.banesco.com/EnterpriseObjects/FinancialInfo"; +declare namespace ns0 = "http://xmlns.banesco.com/EnterpriseObjects/CustVerificationList"; +declare namespace ns35 = "http://xmlns.banesco.com/Service/MessageEnrichUtilMgmtSvc"; + +import module namespace xqu="http://xmlns.banesco.com/xquey-functions" at "../../../../BanescoCommonArtifacts/xq/libraries/AS400Util.xqy", "../../../../BanescoCommonArtifacts/xq/libraries/dateTimeUtil.xqy"; + +declare function xf:AS400NaturalCustomerInAppSvc_updateCustomerData_CanonicalToInput_base($updateCustomerData_Rq1 as element(ns30:updateCustomerData_Rq), + $readDVM_Rs1 as element(ns35:readDVM_Rs)) + as element(ns6:EjecutaTRX) { + + { data($updateCustomerData_Rq1/ns30:MsgRqHdr/ns26:RequestId) } + { data($updateCustomerData_Rq1/ns30:MsgRqHdr/ns26:OperatorCode) } + { data($updateCustomerData_Rq1/ns30:MsgRqHdr/ns26:NetworkTrnInfo[1]/ns26:AgencyCode) } + { + let $TransactionDate := $updateCustomerData_Rq1/ns30:MsgRqHdr/ns26:NetworkTrnInfo[1]/ns26:TransactionDate + return + + { xqu:day-from-date-leftpadding( data($TransactionDate)) } + { xqu:month-from-date-leftpadding( data($TransactionDate)) } + { xqu:year-from-date-leftpadding( data($TransactionDate)) } + + } + { + let $TransactionTime := $updateCustomerData_Rq1/ns30:MsgRqHdr/ns26:NetworkTrnInfo[1]/ns26:TransactionTime + return + + { xqu:hours-from-time-leftpadding(data($TransactionTime)) } + { xqu:minutes-from-time-leftpadding(data($TransactionTime)) } + { xqu:seconds-from-time-leftpadding(data($TransactionTime)) } + + } + { data($readDVM_Rs1/ns35:Outputs/ns35:Output[1]/ns35:Attributes/ns35:Attribute[./ns35:Name='INDLINEA']/ns35:Value) } + { data($readDVM_Rs1/ns35:Outputs/ns35:Output[1]/ns35:Attributes/ns35:Attribute[./ns35:Name='CRITREV']/ns35:Value) } + { data($readDVM_Rs1/ns35:Outputs/ns35:Output[1]/ns35:Attributes/ns35:Attribute[./ns35:Name='INDCONT']/ns35:Value) } + { data($updateCustomerData_Rq1/ns30:MsgRqHdr/ns26:NetworkTrnInfo[1]/ns26:BankId) } + { data($updateCustomerData_Rq1/ns30:MsgRqHdr/ns26:SourceChannelCode) } + { data($updateCustomerData_Rq1/ns30:MsgRqHdr/ns26:ApplicantData[1]/ns26:IpAddress) } + + + { + (: Caso VB8910_Reg2003 Macro transaccion:) + if(data($readDVM_Rs1/ns35:Outputs/ns35:Output[1]/ns35:Attributes/ns35:Attribute[./ns35:Name='NUMREG']/ns35:Value)='2003' and + data($updateCustomerData_Rq1/ns30:MsgRqHdr/ns26:NetworkTrnInfo/ns26:TransactionCode)='8910N')then( + + + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustId[1]/ns19:CustPermId) } + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:GovIssueIdent[1]/ns21:IdentSerialNumPrefix) } + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:GovIssueIdent[1]/ns21:IdentSerialNum) } + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:PersonName[1]/ns15:LastName) } + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:PersonName[1]/ns15:LastSecondName) } + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:PersonName[1]/ns15:FirstName) } + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:ExecutiveId) } + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:BirthCountry) } + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:NationalityCountry) } + { xqu:year-from-date-leftpadding(data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:BirthDt)) } + { xqu:month-from-date-leftpadding(data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:BirthDt)) } + { xqu:day-from-date-leftpadding(data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:BirthDt)) } + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:Gender) } + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:MaritalStatus) } + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:EmploymentData[1]/ns22:Occupation) } + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:EduBackground) } + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:SonsNumber) } + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustClass) } + + { + for $PhoneNum in $updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:ContactInfo[1]/ns16:PhoneNum + return + if (data($PhoneNum/ns16:PhoneUse) = "HABITACION") then( + fn:substring(data($PhoneNum/ns16:Phone),1,3) + ) else() + } + + + { + for $PhoneNum in $updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:ContactInfo[1]/ns16:PhoneNum + return + if (data($PhoneNum/ns16:PhoneUse) = "HABITACION") then( + fn:substring(data($PhoneNum/ns16:Phone),4) + ) else() + } + + { + for $PhoneNum in $updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:ContactInfo[1]/ns16:PhoneNum + return + if (data($PhoneNum/ns16:PhoneUse) = "OFICINA") then( + {fn:substring(data($PhoneNum/ns16:Phone),1,3)} + ) else() + } + + { + for $PhoneNum in $updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:ContactInfo[1]/ns16:PhoneNum + return + if (data($PhoneNum/ns16:PhoneUse) = "OFICINA") then( + fn:substring(data($PhoneNum/ns16:Phone),4) + )else() + } + + + { + for $PhoneNum in $updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:ContactInfo[1]/ns16:PhoneNum + return + if (data($PhoneNum/ns16:PhoneUse) = "OTROS") then( + fn:substring(data($PhoneNum/ns16:Phone),1,3) + )else() + } + + + { + for $PhoneNum in $updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:ContactInfo[1]/ns16:PhoneNum + return + if (data($PhoneNum/ns16:PhoneUse) = "OTROS") then( + fn:substring(data($PhoneNum/ns16:Phone),4) + ) else() + } + + + { + for $PhoneNum in $updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:ContactInfo[1]/ns16:PhoneNum + return + if (data($PhoneNum/ns16:PhoneUse) = "FAX") then ( + fn:substring(data($PhoneNum/ns16:Phone),1,3) + ) else() + } + + + { + for $PhoneNum in $updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:ContactInfo[1]/ns16:PhoneNum + return + if (data($PhoneNum/ns16:PhoneUse) = "FAX") then ( + fn:substring(data($PhoneNum/ns16:Phone),4) + ) else() + } + + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:EmployeeInd) } + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:CustType) } + + {if(fn:exists($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustVerificationList[1]) and ( + data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustVerificationList[1]/ns0:PEPAssociatedInd)!="" or + data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustVerificationList[1]/ns0:PEPInd)!="" or + data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustVerificationList[1]/ns0:PEPRelationshipInd)!="") + )then( + + + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustId[1]/ns19:CustPermId) } + {data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:GovIssueIdent[1]/ns21:IdentSerialNumPrefix)} + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:GovIssueIdent[1]/ns21:IdentSerialNum) } + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:InmigrationInfo[1]/ns21:PermanenceCondition) } + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:InmigrationInfo[1]/ns21:NationalizationInd) } + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustVerificationList[1]/ns0:WorkingInd) } + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:FinancialInfo[1]/ns3:EconActivity) } + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:ResidenceCountry) } + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:EmploymentData[1]/ns22:RetiredInd) } + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:EmploymentData[1]/ns22:PensionerInd) } + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustVerificationList[1]/ns0:PEPInd) } + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustVerificationList[1]/ns0:PEPAssociatedInd) } + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustVerificationList[1]/ns0:PEPRelationshipInd) } + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:Dependents) } + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:FinancialInfo[1]/ns3:ComCategory) } + + )else()} + { + for $OtherIdentDoc in $updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:OtherIdentDoc + return + + + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustId[1]/ns19:CustPermId) } + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:GovIssueIdent[1]/ns21:IdentSerialNumPrefix) } + {data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:GovIssueIdent[1]/ns21:IdentSerialNum) } + {data($OtherIdentDoc/ns21:IdentSerialNumPrefix) } + { data($OtherIdentDoc/ns21:IdentSerialNum) } + { data($OtherIdentDoc/ns21:Type) } + + { + fn:concat(fn:tokenize(data($OtherIdentDoc/ns21:IssDt),"-")[3], + fn:tokenize(data($OtherIdentDoc/ns21:IssDt),"-")[2], + fn:tokenize(data($OtherIdentDoc/ns21:IssDt),"-")[1]) + } + + + + { + fn:concat(fn:tokenize(data($OtherIdentDoc/ns21:ExpDt),"-")[3], + fn:tokenize(data($OtherIdentDoc/ns21:ExpDt),"-")[2], + fn:tokenize(data($OtherIdentDoc/ns21:ExpDt),"-")[1]) } + + + { + if (data($OtherIdentDoc/ns21:Type)='CI') + then('S') + else('N') + } + + { data($OtherIdentDoc/ns21:Country) } + U + + } + { + for $Addr in $updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:Addr + return + if(exists($Addr/ns23:Province) + and data($Addr/ns23:Province!="") + and exists($Addr/ns23:Parish) + and data($Addr/ns23:Parish)!="")then( + + + + + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustId[1]/ns19:CustPermId) } + { data($Addr/ns23:AddrType) } + { data($Addr/ns23:StreetType1) } + { data($Addr/ns23:Street1) } + { data($Addr/ns23:BuildingType) } + { data($Addr/ns23:Building) } + { data($Addr/ns23:Level) } + { data($Addr/ns23:Number) } + { data($Addr/ns23:SectorType) } + { data($Addr/ns23:Sector) } + { data($Addr/ns23:StateProv) } + { data($Addr/ns23:PostalCode) } + { data($Addr/ns23:City) } + { data($Addr/ns23:PostmanRoute) } + { data($Addr/ns23:P.O.B) } + { fn:substring(data($Addr/ns23:PhoneNum[1]/ns23:Phone),1,string-length(data($Addr/ns23:PhoneNum[1]/ns23:Phone))-7) } + { fn:substring(data($Addr/ns23:PhoneNum[1]/ns23:Phone),string-length(data($Addr/ns23:PhoneNum[1]/ns23:Phone))-6) } + { data($Addr/ns23:AddrSubCod) } + { data($Addr/ns23:CountryCode) } + { data($Addr/ns23:Country) } + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:GovIssueIdent[1]/ns21:IdentSerialNumPrefix) } + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:GovIssueIdent[1]/ns21:IdentSerialNum) } + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:Gender) } + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:MaritalStatus) } + { data($Addr/ns23:AddrCod) } + { if (data($Addr/ns23:AddrUse)="CORRESPONDENCIA") then(1) else(0) } + { data($Addr/ns23:HouseCondition) } + + + + + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustId[1]/ns19:CustPermId) } + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:GovIssueIdent[1]/ns21:IdentSerialNumPrefix) } + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:GovIssueIdent[1]/ns21:IdentSerialNum) } + { data($Addr/ns23:AddrType) } + { data($Addr/ns23:Province) } + { data($Addr/ns23:Parish) } + { data($Addr/ns23:PostmanRoute) } + U + + /* + )else( + + + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustId[1]/ns19:CustPermId) } + { data($Addr/ns23:AddrType) } + { data($Addr/ns23:StreetType1) } + { data($Addr/ns23:Street1) } + { data($Addr/ns23:BuildingType) } + { data($Addr/ns23:Building) } + { data($Addr/ns23:Level) } + { data($Addr/ns23:Number) } + { data($Addr/ns23:SectorType) } + { data($Addr/ns23:Sector) } + { data($Addr/ns23:StateProv) } + { data($Addr/ns23:PostalCode) } + { data($Addr/ns23:City) } + { data($Addr/ns23:PostmanRoute) } + { data($Addr/ns23:P.O.B) } + { fn:substring(data($Addr/ns23:PhoneNum[1]/ns23:Phone),1,string-length(data($Addr/ns23:PhoneNum[1]/ns23:Phone))-7) } + { fn:substring(data($Addr/ns23:PhoneNum[1]/ns23:Phone),string-length(data($Addr/ns23:PhoneNum[1]/ns23:Phone))-6) } + { data($Addr/ns23:AddrSubCod) } + { data($Addr/ns23:CountryCode) } + { data($Addr/ns23:Country) } + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:GovIssueIdent[1]/ns21:IdentSerialNumPrefix) } + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:GovIssueIdent[1]/ns21:IdentSerialNum) } + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:Gender) } + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:MaritalStatus) } + { data($Addr/ns23:AddrCod) } + { if (data($Addr/ns23:AddrUse)="CORRESPONDENCIA") then(1) else(0) } + { data($Addr/ns23:HouseCondition) } + + ) + + } + { + for $Email in $updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:ContactInfo[1]/ns16:Email + return + if (data($Email/ns16:EmailType) = "EMAIL") then ( + if (data($Email/ns16:ActionType) = "A") then ( + (: Caso VB8921_Reg2006 :) + + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustId[1]/ns19:CustPermId) } + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:GovIssueIdent[1]/ns21:IdentSerialNumPrefix) } + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:GovIssueIdent[1]/ns21:IdentSerialNum) } + {data($Email/ns16:EmailUse)} + { fn:substring-after( (fn:substring-before( data($Email/ns16:EmailAddr), '.')), "@") } + { data($Email/ns16:EmailAddr) } + { data($Email/ns16:MainInd) } + U + + )else if(data($Email/ns16:ActionType) = "C") then( + (: Caso VB8920_Reg2006 :) + + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustId[1]/ns19:CustPermId) } + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:GovIssueIdent[1]/ns21:IdentSerialNumPrefix) } + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:GovIssueIdent[1]/ns21:IdentSerialNum) } + {data($Email/ns16:EmailUse)} + { fn:substring-after( (fn:substring-before( data($Email/ns16:EmailAddr), '.')), "@") } + { data($Email/ns16:EmailAddr) } + { data($Email/ns16:MainInd) } + U + + )else() + )else() + } + { + for $EmploymentData in $updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:EmploymentData + return + if(data($EmploymentData/ns22:ActionType)='A')then( + (: Caso VB1844_Reg1126 :) + + + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:GovIssueIdent[1]/ns21:IdentSerialNumPrefix) } + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:GovIssueIdent[1]/ns21:IdentSerialNum) } + { data($EmploymentData/ns22:EmploymentCondition) } + { data($EmploymentData/ns22:OccupDesc) } + { data($EmploymentData/ns22:OrgInfo/ns22:Name) } + { xqu:doubleToAS400(data($EmploymentData/ns22:Income[1]/ns22:Amt)) } + { data($EmploymentData/ns22:Income[1]/ns22:Freq) } + + { + for $LastIncomeDt in $EmploymentData/ns22:Income[1]/ns22:LastIncomeDt + return + xqu:date-to-rafagaYYYYMMDD(data($LastIncomeDt)) + } + + + { + let $fechaIni:=data($EmploymentData/ns22:StartDt) + return + xqu:date-to-rafagaYYYYMMDD(data($fechaIni)) + } + + { data($EmploymentData/ns22:OrgInfo/ns22:CustId/ns22:CustPermId) } + { substring(data($EmploymentData/ns22:OrgInfo/ns22:OrgId),1,1) } + { substring(data($EmploymentData/ns22:OrgInfo/ns22:OrgId),2) } + { data($EmploymentData/ns22:EmployInd) } + { data($EmploymentData/ns22:ExtraIncome[1]/ns22:ExtIncomeSeq) } + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:FinancialInfo[1]/ns3:BankCustQty) } + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:FinancialInfo[1]/ns3:CreditCardCustQty) } + { data($EmploymentData/ns22:OrgInfo/ns22:ComScope) } + { data($EmploymentData/ns22:JobTitle) } + { data($EmploymentData/ns22:ExtraIncome[1]/ns22:IncomeSource) } + + )else if(data($EmploymentData/ns22:ActionType)='C')then( + (: Caso VB1842_Reg1126 :) + + + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:GovIssueIdent[1]/ns21:IdentSerialNumPrefix) } + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:GovIssueIdent[1]/ns21:IdentSerialNum) } + { data($EmploymentData/ns22:EmploymentCondition) } + { data($EmploymentData/ns22:OccupDesc) } + { data($EmploymentData/ns22:OrgInfo/ns22:Name) } + { xqu:doubleToAS400(data($EmploymentData/ns22:Income[1]/ns22:Amt)) } + { data($EmploymentData/ns22:Income[1]/ns22:Freq) } + + { + for $LastIncomeDt in $EmploymentData/ns22:Income[1]/ns22:LastIncomeDt + return + xqu:date-to-rafagaYYYYMMDD(data($LastIncomeDt)) + } + + + { + let $fechaIni:=data($EmploymentData/ns22:StartDt) + return + xqu:date-to-rafagaYYYYMMDD(data($fechaIni)) + } + + { data($EmploymentData/ns22:OrgInfo/ns22:CustId/ns22:CustPermId) } + { substring(data($EmploymentData/ns22:OrgInfo/ns22:OrgId),1,1) } + { substring(data($EmploymentData/ns22:OrgInfo/ns22:OrgId),2) } + { data($EmploymentData/ns22:EmployInd) } + { data($EmploymentData/ns22:ExtraIncome[1]/ns22:ExtIncomeSeq) } + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:FinancialInfo[1]/ns3:BankCustQty) } + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:FinancialInfo[1]/ns3:CreditCardCustQty) } + { data($EmploymentData/ns22:OrgInfo/ns22:ComScope) } + { data($EmploymentData/ns22:JobTitle) } + { data($EmploymentData/ns22:ExtraIncome[1]/ns22:IncomeSource) } + + )else() + + } + { + for $Email in $updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:ContactInfo[1]/ns16:Email + return + if (data($Email/ns16:EmailType) = "REDES") then ( + + + + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustId[1]/ns19:CustPermId) } + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:GovIssueIdent[1]/ns21:IdentSerialNumPrefix) } + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:GovIssueIdent[1]/ns21:IdentSerialNum) } + { data($Email/ns16:EmailUse) } + { data($Email/ns16:EmailAddr) } + { data($Email/ns16:MainInd) } + { data($Email/ns16:EmailStatus[1]/ns16:Status) } + U + + + )else() + } + /* + )else if(data($readDVM_Rs1/ns35:Outputs/ns35:Output[1]/ns35:Attributes/ns35:Attribute[./ns35:Name='NUMREG']/ns35:Value)='2005' and + data($updateCustomerData_Rq1/ns30:MsgRqHdr/ns26:NetworkTrnInfo/ns26:TransactionCode)='8204')then( + (:Caso para Actualizar la Direccion basica y direccion extendida:) + for $Addr in $updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:Addr + return + if(exists($Addr/ns23:Province) + and data($Addr/ns23:Province!="") + and exists($Addr/ns23:Parish) + and data($Addr/ns23:Parish)!="")then( + + + + + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustId[1]/ns19:CustPermId) } + { data($Addr/ns23:AddrType) } + { data($Addr/ns23:StreetType1) } + { data($Addr/ns23:Street1) } + { data($Addr/ns23:BuildingType) } + { data($Addr/ns23:Building) } + { data($Addr/ns23:Level) } + { data($Addr/ns23:Number) } + { data($Addr/ns23:SectorType) } + { data($Addr/ns23:Sector) } + { data($Addr/ns23:StateProv) } + { data($Addr/ns23:PostalCode) } + { data($Addr/ns23:City) } + { data($Addr/ns23:PostmanRoute) } + { data($Addr/ns23:P.O.B) } + { fn:substring(data($Addr/ns23:PhoneNum[1]/ns23:Phone),1,string-length(data($Addr/ns23:PhoneNum[1]/ns23:Phone))-7) } + { fn:substring(data($Addr/ns23:PhoneNum[1]/ns23:Phone),string-length(data($Addr/ns23:PhoneNum[1]/ns23:Phone))-6) } + { data($Addr/ns23:AddrSubCod) } + { data($Addr/ns23:CountryCode) } + { data($Addr/ns23:Country) } + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:GovIssueIdent[1]/ns21:IdentSerialNumPrefix) } + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:GovIssueIdent[1]/ns21:IdentSerialNum) } + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:Gender) } + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:MaritalStatus) } + { data($Addr/ns23:AddrCod) } + { if (data($Addr/ns23:AddrUse)="CORRESPONDENCIA") then(1) else(0) } + { data($Addr/ns23:HouseCondition) } + + + + + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustId[1]/ns19:CustPermId) } + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:GovIssueIdent[1]/ns21:IdentSerialNumPrefix) } + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:GovIssueIdent[1]/ns21:IdentSerialNum) } + { data($Addr/ns23:AddrType) } + { data($Addr/ns23:Province) } + { data($Addr/ns23:Parish) } + { data($Addr/ns23:PostmanRoute) } + U + + /* + )else( + + + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustId[1]/ns19:CustPermId) } + { data($Addr/ns23:AddrType) } + { data($Addr/ns23:StreetType1) } + { data($Addr/ns23:Street1) } + { data($Addr/ns23:BuildingType) } + { data($Addr/ns23:Building) } + { data($Addr/ns23:Level) } + { data($Addr/ns23:Number) } + { data($Addr/ns23:SectorType) } + { data($Addr/ns23:Sector) } + { data($Addr/ns23:StateProv) } + { data($Addr/ns23:PostalCode) } + { data($Addr/ns23:City) } + { data($Addr/ns23:PostmanRoute) } + { data($Addr/ns23:P.O.B) } + { fn:substring(data($Addr/ns23:PhoneNum[1]/ns23:Phone),1,string-length(data($Addr/ns23:PhoneNum[1]/ns23:Phone))-7) } + { fn:substring(data($Addr/ns23:PhoneNum[1]/ns23:Phone),string-length(data($Addr/ns23:PhoneNum[1]/ns23:Phone))-6) } + { data($Addr/ns23:AddrSubCod) } + { data($Addr/ns23:CountryCode) } + { data($Addr/ns23:Country) } + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:GovIssueIdent[1]/ns21:IdentSerialNumPrefix) } + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:GovIssueIdent[1]/ns21:IdentSerialNum) } + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:Gender) } + { data($updateCustomerData_Rq1/ns30:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:MaritalStatus) } + { data($Addr/ns23:AddrCod) } + { if (data($Addr/ns23:AddrUse)="CORRESPONDENCIA") then(1) else(0) } + { data($Addr/ns23:HouseCondition) } + + ) + + )else( + (:Continuar aqui para otros casos de VB y Registro. Validar cada caso con if:) + ) + } + + + +}; + +declare variable $updateCustomerData_Rq1 as element(ns30:updateCustomerData_Rq) external; +declare variable $readDVM_Rs1 as element(ns35:readDVM_Rs) external; + +xf:AS400NaturalCustomerInAppSvc_updateCustomerData_CanonicalToInput_base($updateCustomerData_Rq1, + $readDVM_Rs1) \ No newline at end of file diff --git a/AS400NaturalCustomerInAppSvc/operations/updateCustomerData/xq/AS400NaturalCustomerInAppSvc_updateCustomerData_InputToCanonical.xqy b/AS400NaturalCustomerInAppSvc/operations/updateCustomerData/xq/AS400NaturalCustomerInAppSvc_updateCustomerData_InputToCanonical.xqy new file mode 100644 index 0000000..872530e --- /dev/null +++ b/AS400NaturalCustomerInAppSvc/operations/updateCustomerData/xq/AS400NaturalCustomerInAppSvc_updateCustomerData_InputToCanonical.xqy @@ -0,0 +1,173 @@ +xquery version "1.0" encoding "utf-8"; + +(:: OracleAnnotationVersion "1.0" ::) + +declare namespace ns6="http://Obi_Wan/EjecutaTRX"; +(:: import schema at "../xsd/AS400NaturalCustomerInAppSvc_updateCustomerData.xsd" ::) +declare namespace ns22="http://xmlns.banesco.com/Service/NaturalCustomerMgmtSvc"; +(:: import schema at "../../../../BanescoCommonArtifacts/xsd/canonical/Services/NaturalCustomerMgmtSvc.xsd" ::) + +declare namespace ns42 = "http://xmlns.banesco.com/EnterpriseObjects/EmploymentData_v2.0"; +declare namespace ns41 = "http://xmlns.banesco.com/EnterpriseObjects/Taxes_v2.0"; +declare namespace ns40 = "http://xmlns.banesco.com/EnterpriseObjects/NaturalCustomer"; +declare namespace ns46 = "http://xmlns.banesco.com/EnterpriseObjects/AffiliationSvc"; +declare namespace ns45 = "http://xmlns.banesco.com/EnterpriseObjects/SelRangeDt"; +declare namespace ns44 = "http://xmlns.banesco.com/EnterpriseObjects/Addr_v2.0"; +declare namespace ns43 = "http://xmlns.banesco.com/EnterpriseObjects/Service"; +declare namespace ns48 = "http://xmlns.banesco.com/EnterpriseObjects/EmploymentData"; +declare namespace ns47 = "http://xmlns.banesco.com/EnterpriseObjects/Score"; +declare namespace xf = "http://tempuri.org/AS400NaturalCustomerInAppSvc/operations/updateCustomerData/xq/AS400NaturalCustomerInAppSvc_updateCustomerData_InputToCanonical/"; +declare namespace ns16 = "http://xmlns.banesco.com/EnterpriseObjects/MsgRsHdr"; +declare namespace ns17 = "http://xmlns.banesco.com/EnterpriseObjects/Addr"; +declare namespace ns14 = "http://xmlns.banesco.com/EnterpriseObjects/CustPref"; +declare namespace ns15 = "http://xmlns.banesco.com/EnterpriseObjects/PersonInfo_v2.0"; +declare namespace ns18 = "http://xmlns.banesco.com/EnterpriseObjects/MsgRqHdr"; +declare namespace ns19 = "http://xmlns.banesco.com/EnterpriseObjects/Status"; +declare namespace ns12 = "http://xmlns.banesco.com/EnterpriseObjects/CommonComplexType"; +declare namespace ns13 = "http://xmlns.banesco.com/EnterpriseObjects/User"; +declare namespace ns10 = "http://xmlns.banesco.com/EnterpriseObjects/PersonName"; +declare namespace ns11 = "http://xmlns.banesco.com/EnterpriseObjects/Customer"; +declare namespace ns29 = "http://xmlns.banesco.com/EnterpriseObjects/FinancialInfo"; +declare namespace ns25 = "http://xmlns.banesco.com/EnterpriseObjects/Bureau"; +declare namespace ns26 = "http://xmlns.banesco.com/EnterpriseObjects/RegulatoryInfo"; +declare namespace ns27 = "http://xmlns.banesco.com/EnterpriseObjects/GenericValue"; +declare namespace ns28 = "http://xmlns.banesco.com/EnterpriseObjects/SecurityIdentification"; +declare namespace ns21 = "http://xmlns.banesco.com/EnterpriseObjects/CustCrossReference"; +declare namespace ns23 = "http://xmlns.banesco.com/EnterpriseObjects/PersonInfo"; +declare namespace ns24 = "http://xmlns.banesco.com/EnterpriseObjects/IntRateInfo"; +declare namespace ns20 = "http://xmlns.banesco.com/EnterpriseObjects/TradeRegistry"; +declare namespace ns38 = "http://xmlns.banesco.com/EnterpriseObjects/Guarantor"; +declare namespace ns39 = "http://xmlns.banesco.com/EnterpriseObjects/Banking"; +declare namespace ns36 = "http://xmlns.banesco.com/EnterpriseObjects/ContactInfo_v2.0"; +declare namespace ns37 = "http://xmlns.banesco.com/EnterpriseObjects/Ref"; +declare namespace ns9 = "http://xmlns.banesco.com/EnterpriseObjects/Product"; +declare namespace ns34 = "http://xmlns.banesco.com/EnterpriseObjects/Chk"; +declare namespace ns35 = "http://xmlns.banesco.com/EnterpriseObjects/Organization_v2.0"; +declare namespace ns32 = "http://xmlns.banesco.com/EnterpriseObjects/Loan"; +declare namespace ns33 = "http://xmlns.banesco.com/EnterpriseObjects/Ref_v2.0"; +declare namespace ns5 = "http://xmlns.banesco.com/EnterpriseObjects/Contact"; +declare namespace ns30 = "http://xmlns.banesco.com/EnterpriseObjects/Investment"; +declare namespace ns31 = "http://xmlns.banesco.com/EnterpriseObjects/Documentation"; +declare namespace ns7 = "http://xmlns.banesco.com/EnterpriseObjects/Risk"; +declare namespace ns8 = "http://xmlns.banesco.com/EnterpriseObjects/Organization"; +declare namespace ns2 = "http://xmlns.banesco.com/EnterpriseObjects/Fee"; +declare namespace ns1 = "http://xmlns.banesco.com/EnterpriseObjects/LegalCustomer"; +declare namespace ns4 = "http://xmlns.banesco.com/EnterpriseObjects/Bankinfo"; +declare namespace ns3 = "http://xmlns.banesco.com/EnterpriseObjects/Account"; +declare namespace ns0 = "http://xmlns.banesco.com/EnterpriseObjects/CustVerificationList"; + +declare namespace stat = "http://xmlns.banesco.com/EnterpriseObjects/Status"; + +import module namespace xqu="http://xmlns.banesco.com/xquey-functions" at "../../../../BanescoCommonArtifacts/xq/libraries/AS400Util.xqy", "../../../../BanescoCommonArtifacts/xq/libraries/dateTimeUtil.xqy"; + +declare function xf:AS400NaturalCustomerInAppSvc_updateCustomerData_InputToCanonical($ejecutaTRXResponse1 as element(ns6:EjecutaTRXResponse), + $ejecutaTRX1 as element(ns6:EjecutaTRX), + $updateCustomerData_Rq1 as element(ns22:updateCustomerData_Rq), + $dvm as element(*)) + as element(ns22:updateCustomerData_Rs) { + + + { data($ejecutaTRXResponse1/ns6:EjecutaTRXResult/ns6:TRXSResults/ns6:Respuestas[1]/ns6:Respuesta[1]/@NUMREG) } + { data($ejecutaTRXResponse1/ns6:EjecutaTRXResult/ns6:TRXSResults/ns6:Respuestas[1]/@NOCDTOSAL) } + { data($ejecutaTRXResponse1/ns6:EjecutaTRXResult/ns6:TRXSResults/ns6:Respuestas[1]/@CODTRN) } + { data($ejecutaTRXResponse1/ns6:EjecutaTRXResult/ns6:TRXSResults/ns6:Respuestas[1]/@CODSUP) } + { data($ejecutaTRXResponse1/ns6:EjecutaTRXResult/ns6:TRXSResults/ns6:Respuestas[1]/@TIPOPER) } + { data($ejecutaTRXResponse1/ns6:EjecutaTRXResult/ns6:TRXSResults/ns6:Respuestas[1]/@CONTRN) } + { data($ejecutaTRXResponse1/ns6:EjecutaTRXResult/ns6:TRXSResults/ns6:Respuestas[1]/@DSCREG) } + { data($ejecutaTRXResponse1/ns6:EjecutaTRXResult/ns6:TRXSResults/ns6:Respuestas[1]/ns6:Respuesta[1]/@NUMREG) } + { data($ejecutaTRXResponse1/ns6:EjecutaTRXResult/ns6:TRXSResults/ns6:Respuestas[1]/@TIPTRN) } + { data($updateCustomerData_Rq1/ns22:MsgRqHdr/ns18:RequestId) } + AS400 + + { + if((data($ejecutaTRXResponse1/ns6:EjecutaTRXResult/ns6:TRXSResults/ns6:Respuestas[1]/@CODTRN)="8910" and data($updateCustomerData_Rq1/ns22:MsgRqHdr/ns18:SourceChannelCode)!="MGS") and + (fn:boolean(data($ejecutaTRXResponse1/ns6:EjecutaTRXResult/ns6:TRXSResults/ns6:Respuestas[1]/ns6:Respuesta[1]/ns6:CODERR1)) or + fn:boolean(data($ejecutaTRXResponse1/ns6:EjecutaTRXResult/ns6:TRXSResults/ns6:Respuestas[1]/ns6:Respuesta[1]/ns6:CODERR2)) or + fn:boolean(data($ejecutaTRXResponse1/ns6:EjecutaTRXResult/ns6:TRXSResults/ns6:Respuestas[1]/ns6:Respuesta[1]/ns6:CODERR3)) or + fn:boolean(data($ejecutaTRXResponse1/ns6:EjecutaTRXResult/ns6:TRXSResults/ns6:Respuestas[1]/ns6:Respuesta[1]/ns6:CODERR4))))then( + + {xqu:get-status($ejecutaTRXResponse1, $dvm)/*} + + )else if((data($ejecutaTRXResponse1/ns6:EjecutaTRXResult/ns6:TRXSResults/ns6:Respuestas[1]/@CODTRN)="8910" and data($updateCustomerData_Rq1/ns22:MsgRqHdr/ns18:SourceChannelCode)!="MGS") and + fn:boolean(data($ejecutaTRXResponse1/ns6:EjecutaTRXResult/ns6:TRXSResults/ns6:Respuestas[1]/ns6:Respuesta[1]/ns6:MSJERR)))then( + (: Caso especifico para manejar el tipo de error por timeout :) + if(contains(data($ejecutaTRXResponse1/ns6:EjecutaTRXResult/ns6:TRXSResults/ns6:Respuestas[1]/ns6:Respuesta[1]/ns6:MSJERR),"Fallo de llamada de servicio saliente JCA con error de conex"))then( + + {"OSB-380002"} + {"TIMEOUT"} + { data($ejecutaTRXResponse1/ns6:EjecutaTRXResult/ns6:TRXSResults/ns6:Respuestas[1]/ns6:Respuesta[1]/ns6:NOMPRG) } + { xs:int($ejecutaTRXResponse1/ns6:EjecutaTRXResult/ns6:TRXSResults/ns6:Respuestas[1]/ns6:Respuesta[1]/ns6:NUMLIN) } + + )else( + + {xqu:get-status($ejecutaTRXResponse1, $dvm)/*} + + ) + )else if(data($ejecutaTRXResponse1/ns6:EjecutaTRXResult/ns6:TRXSResults/ns6:Respuestas[1]/ns6:Respuesta[1]/@NUMREG)="0001")then( + (: Caso Reg0001 Exito sin data :) + + OK + Transaccion finalizada con exito + + )else if(data($ejecutaTRXResponse1/ns6:EjecutaTRXResult/ns6:TRXSResults/ns6:Respuestas[1]/@CODTRN)="8910")then( + (: Caso VB8910_Reg2003 Macro Transaccion :) + (: En este caso particular se valida por el codigo de transaccion ya que para el VB8910 en esta seccion se contempla el caso de exito y error por multigestion :) + + { + let $Respuestas := count($ejecutaTRXResponse1/ns6:EjecutaTRXResult/ns6:TRXSResults/ns6:Respuestas) + let $TRX := count($ejecutaTRX1/ns6:TRXS/ns6:ListaTrxs/ns6:TRX) + return + (: Por cada respuesta obtenida validamos si fue exito o error :) + if(data($Respuestas)=data($TRX) and + not(exists($ejecutaTRXResponse1/ns6:EjecutaTRXResult/ns6:TRXSResults/ns6:Respuestas/ns6:Respuesta/ns6:CODERR1)) and + not(exists($ejecutaTRXResponse1/ns6:EjecutaTRXResult/ns6:TRXSResults/ns6:Respuestas/ns6:Respuesta/ns6:MSJERR)))then( + + {"0001"} + {"OPERACION EXITOSA"} + /* + )else( + + {"ERROR"} + {"OPERACION FALLIDA"} + { + for $Respuestas in $ejecutaTRXResponse1/ns6:EjecutaTRXResult/ns6:TRXSResults/ns6:Respuestas + return + (: Por cada respuesta obtenida validamos si fue exito o error :) + if(fn:boolean(data($Respuestas/ns6:Respuesta[1]/ns6:CODERR1)))then( + + {concat("VB",data($Respuestas/@CODTRN))} + {data($Respuestas/ns6:Respuesta[1]/ns6:CODERR1)} + {"Transaccion Rechazada"} + + )else if(fn:boolean(data($Respuestas/ns6:Respuesta[1]/ns6:MSJERR)))then( + + {concat("VB",data($Respuestas/@CODTRN))} + {data($Respuestas/ns6:Respuesta[1]/ns6:MSJERR)} + {"Transaccion Rechazada"} + + )else( + + {concat("VB",data($Respuestas/@CODTRN))} + {"000"} + {"Transaccion finalizada con exito"} + + ) + } + /* + ) + } + + )else() + } + +}; + +declare variable $ejecutaTRXResponse1 as element(ns6:EjecutaTRXResponse) external; +declare variable $ejecutaTRX1 as element(ns6:EjecutaTRX) external; +declare variable $updateCustomerData_Rq1 as element(ns22:updateCustomerData_Rq) external; +declare variable $dvm as element(*) external; + +xf:AS400NaturalCustomerInAppSvc_updateCustomerData_InputToCanonical($ejecutaTRXResponse1, + $ejecutaTRX1, + $updateCustomerData_Rq1, + $dvm) \ No newline at end of file diff --git a/AS400NaturalCustomerInAppSvc/operations/updateCustomerData/xsd/AS400NaturalCustomerInAppSvc_updateCustomerData.xsd b/AS400NaturalCustomerInAppSvc/operations/updateCustomerData/xsd/AS400NaturalCustomerInAppSvc_updateCustomerData.xsd new file mode 100644 index 0000000..70c79fc --- /dev/null +++ b/AS400NaturalCustomerInAppSvc/operations/updateCustomerData/xsd/AS400NaturalCustomerInAppSvc_updateCustomerData.xsd @@ -0,0 +1,325 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/AS400NaturalCustomerInAppSvc/operations/updateCustomerInterview/proxy/AS400NaturalCustomerInAppSvc_updateCustomerInterview.pipeline b/AS400NaturalCustomerInAppSvc/operations/updateCustomerInterview/proxy/AS400NaturalCustomerInAppSvc_updateCustomerInterview.pipeline new file mode 100644 index 0000000..194f1b0 --- /dev/null +++ b/AS400NaturalCustomerInAppSvc/operations/updateCustomerInterview/proxy/AS400NaturalCustomerInAppSvc_updateCustomerInterview.pipeline @@ -0,0 +1,214 @@ + + + + + + + AS400NaturalCustomerInAppSvcSOAP + http://xmlns.banesco.com/ApplicationService/AS400NaturalCustomerInAppSvc + + + + 1.0 + + + + + + + + nat:updateCustomerInterview_Rq + + ./nat:updateCustomerInterview_Rq + + + + + + + + + + + + + + + $body/nat:updateCustomerInterview_Rq/nat:MsgRqHdr + + + + + + + + + + + + + + + + + $dvmResponse + + + $body/nat:updateCustomerInterview_Rq + + + + + + + + + + + + + + + + + $body/direct:EjecutaTRX + + + $backupBody/nat:updateCustomerInterview_Rq/nat:MsgRqHdr + + + + + + + + http://xmlns.banesco.com/Service/NaturalCustomerMgmtSvc + + + + + http://xmlns.banesco.com/Service/NaturalCustomerMgmtSvc + + + + + + + + + + + ejec:EjecutaTRX + + + + + + ejec:EjecutaTRXResponse + + + + + + + + + "DVM_RESPONSE_CODE" + + + "VC" + + + $body/direct:EjecutaTRXResponse/direct:EjecutaTRXResult/direct:TRXSResults/direct:Respuestas[1]/direct:Respuesta[1]/@NUMREG + + + $backupBody/nat:updateCustomerInterview_Rq/nat:MsgRqHdr + + + "AS400" + + + + + + + + + + + + "DVM_MESSAGE_ERROR" + + + "MESSAGE" + + + $errors + + + $backupBody/nat:updateCustomerInterview_Rq/nat:MsgRqHdr + + + "AS400" + + + + + + + + + + + + + + + + + $backupBody/nat:updateCustomerInterview_Rq + + + $body/direct:EjecutaTRXResponse + + + fn-bea:inlinedXML($dvm) + + + + + + + + + + + + + + + nat:updateCustomerInterview_Rs + + ./nat:updateCustomerInterview_Rs + + + + + + + + + + + http://xmlns.banesco.com/Service/NaturalCustomerMgmtSvc + + + + + http://xmlns.banesco.com/Service/NaturalCustomerMgmtSvc + + + + + + \ No newline at end of file diff --git a/AS400NaturalCustomerInAppSvc/operations/updateCustomerInterview/xq/AS400NaturalCustomerInAppSvc_updateCustomerInterview_CanonicalToInput.xqy b/AS400NaturalCustomerInAppSvc/operations/updateCustomerInterview/xq/AS400NaturalCustomerInAppSvc_updateCustomerInterview_CanonicalToInput.xqy new file mode 100644 index 0000000..75e06be --- /dev/null +++ b/AS400NaturalCustomerInAppSvc/operations/updateCustomerInterview/xq/AS400NaturalCustomerInAppSvc_updateCustomerInterview_CanonicalToInput.xqy @@ -0,0 +1,248 @@ +xquery version "1.0" encoding "utf-8"; + +(:: OracleAnnotationVersion "1.0" ::) + +declare namespace ns6="http://Obi_Wan/EjecutaTRX"; +(:: import schema at "../xsd/AS400NaturalCustomerInAppSvc_updateCustomerInterview.xsd" ::) +declare namespace ns29="http://xmlns.banesco.com/Service/NaturalCustomerMgmtSvc"; +(:: import schema at "../../../../BanescoCommonArtifacts/xsd/canonical/Services/NaturalCustomerMgmtSvc.xsd" ::) + +declare namespace ns25 = "http://xmlns.banesco.com/EnterpriseObjects/Addr"; +declare namespace ns26 = "http://xmlns.banesco.com/EnterpriseObjects/MsgRqHdr"; +declare namespace ns27 = "http://xmlns.banesco.com/EnterpriseObjects/Status"; +declare namespace ns28 = "http://xmlns.banesco.com/EnterpriseObjects/TradeRegistry"; +declare namespace ns21 = "http://xmlns.banesco.com/EnterpriseObjects/PersonInfo_v2.0"; +declare namespace ns22 = "http://xmlns.banesco.com/EnterpriseObjects/EmploymentData_v2.0"; +declare namespace ns23 = "http://xmlns.banesco.com/EnterpriseObjects/Addr_v2.0"; +declare namespace ns24 = "http://xmlns.banesco.com/EnterpriseObjects/Service"; +declare namespace ns20 = "http://xmlns.banesco.com/EnterpriseObjects/Taxes_v2.0"; +declare namespace xf = "http://tempuri.org/AS400NaturalCustomerInAppSvc/operations/updateCustomerInterview/xq/AS400NaturalCustomerInAppSvc_updateCustomerInterview_CanonicalToInput/"; +declare namespace ns16 = "http://xmlns.banesco.com/EnterpriseObjects/ContactInfo_v2.0"; +declare namespace ns17 = "http://xmlns.banesco.com/EnterpriseObjects/CommonComplexType"; +declare namespace ns14 = "http://xmlns.banesco.com/EnterpriseObjects/Product"; +declare namespace ns15 = "http://xmlns.banesco.com/EnterpriseObjects/PersonName"; +declare namespace ns18 = "http://xmlns.banesco.com/EnterpriseObjects/Banking"; +declare namespace ns19 = "http://xmlns.banesco.com/EnterpriseObjects/NaturalCustomer"; +declare namespace ns9 = "http://xmlns.banesco.com/EnterpriseObjects/Organization"; +declare namespace ns32 = "http://xmlns.banesco.com/EnterpriseObjects/PersonInfo"; +declare namespace ns33 = "http://xmlns.banesco.com/EnterpriseObjects/Score"; +declare namespace ns30 = "http://xmlns.banesco.com/Service/MessageEnrichUtilMgmtSvc"; +declare namespace ns12 = "http://xmlns.banesco.com/EnterpriseObjects/Organization_v2.0"; +declare namespace ns5 = "http://xmlns.banesco.com/EnterpriseObjects/Contact"; +declare namespace ns13 = "http://xmlns.banesco.com/EnterpriseObjects/Chk"; +declare namespace ns31 = "http://xmlns.banesco.com/EnterpriseObjects/AffiliationSvc"; +declare namespace ns7 = "http://xmlns.banesco.com/EnterpriseObjects/Risk"; +declare namespace ns10 = "http://xmlns.banesco.com/EnterpriseObjects/Ref_v2.0"; +declare namespace ns8 = "http://xmlns.banesco.com/EnterpriseObjects/Investment"; +declare namespace ns11 = "http://xmlns.banesco.com/EnterpriseObjects/Loan"; +declare namespace ns2 = "http://xmlns.banesco.com/EnterpriseObjects/Fee"; +declare namespace ns1 = "http://xmlns.banesco.com/EnterpriseObjects/RegulatoryInfo"; +declare namespace ns4 = "http://xmlns.banesco.com/EnterpriseObjects/Bankinfo"; +declare namespace ns3 = "http://xmlns.banesco.com/EnterpriseObjects/FinancialInfo"; +declare namespace ns0 = "http://xmlns.banesco.com/EnterpriseObjects/CustVerificationList"; + +import module namespace xqu="http://xmlns.banesco.com/xquey-functions" at "../../../../BanescoCommonArtifacts/xq/libraries/AS400Util.xqy", "../../../../BanescoCommonArtifacts/xq/libraries/dateTimeUtil.xqy"; + +declare function xf:AS400NaturalCustomerInAppSvc_updateCustomerInterview_CanonicalToInput($updateCustomerInterview_Rq1 as element(ns29:updateCustomerInterview_Rq), + $readDVM_Rs1 as element(ns30:readDVM_Rs)) + as element(ns6:EjecutaTRX) { + + { data($updateCustomerInterview_Rq1/ns29:MsgRqHdr/ns26:RequestId) } + { data($updateCustomerInterview_Rq1/ns29:MsgRqHdr/ns26:OperatorCode) } + { data($updateCustomerInterview_Rq1/ns29:MsgRqHdr/ns26:NetworkTrnInfo[1]/ns26:AgencyCode) } + + { xqu:day-from-date-leftpadding(data($updateCustomerInterview_Rq1/ns29:MsgRqHdr/ns26:NetworkTrnInfo[1]/ns26:TransactionDate)) } + { xqu:month-from-date-leftpadding(data($updateCustomerInterview_Rq1/ns29:MsgRqHdr/ns26:NetworkTrnInfo[1]/ns26:TransactionDate)) } + { xqu:year-from-date-leftpadding(data($updateCustomerInterview_Rq1/ns29:MsgRqHdr/ns26:NetworkTrnInfo[1]/ns26:TransactionDate)) } + + + { xqu:hours-from-time-leftpadding(data($updateCustomerInterview_Rq1/ns29:MsgRqHdr/ns26:NetworkTrnInfo[1]/ns26:TransactionTime)) } + { xqu:minutes-from-time-leftpadding(data($updateCustomerInterview_Rq1/ns29:MsgRqHdr/ns26:NetworkTrnInfo[1]/ns26:TransactionTime)) } + { xqu:seconds-from-time-leftpadding(data($updateCustomerInterview_Rq1/ns29:MsgRqHdr/ns26:NetworkTrnInfo[1]/ns26:TransactionTime)) } + + { data($readDVM_Rs1/ns30:Outputs/ns30:Output[1]/ns30:Attributes/ns30:Attribute[./ns30:Name='INDLINEA']/ns30:Value) } + { data($readDVM_Rs1/ns30:Outputs/ns30:Output[1]/ns30:Attributes/ns30:Attribute[./ns30:Name='CRITREV']/ns30:Value) } + { data($readDVM_Rs1/ns30:Outputs/ns30:Output[1]/ns30:Attributes/ns30:Attribute[./ns30:Name='INDCONT']/ns30:Value) } + { data($updateCustomerInterview_Rq1/ns29:MsgRqHdr/ns26:NetworkTrnInfo[1]/ns26:BankId) } + { data($updateCustomerInterview_Rq1/ns29:MsgRqHdr/ns26:SourceChannelCode) } + { data($updateCustomerInterview_Rq1/ns29:MsgRqHdr/ns26:NetworkTrnInfo[1]/ns26:ChannelUserId) } + + + { + if(data($readDVM_Rs1/ns30:Outputs/ns30:Output[1]/ns30:Attributes/ns30:Attribute[./ns30:Name='NUMREG']/ns30:Value)='1128')then( + for $PartySvcAcctRelSel in $updateCustomerInterview_Rq1/ns29:NaturalCustomer[1]/ns19:PartySvcAcctRelSel + return + (: Caso VB1845_Reg1128 :) + + A + { data($PartySvcAcctRelSel/ns19:CustInfo/ns19:PersonInfo[1]/ns21:GovIssueIdent[1]/ns21:IdentSerialNumPrefix) } + { data($PartySvcAcctRelSel/ns19:CustInfo/ns19:PersonInfo[1]/ns21:GovIssueIdent[1]/ns21:IdentSerialNum) } + { data($PartySvcAcctRelSel/ns19:Account/ns19:AcctId) } + { + if ((exists($PartySvcAcctRelSel/ns19:Account/ns19:AcctType) and data($PartySvcAcctRelSel/ns19:Account/ns19:AcctType) = "1026") and + (exists($PartySvcAcctRelSel/ns19:RegulatoryInfo/ns1:RegInfoType) and data($PartySvcAcctRelSel/ns19:RegulatoryInfo/ns1:RegInfoType) = "VN" ) or (exists($PartySvcAcctRelSel/ns19:Account/ns19:AcctType) and data($PartySvcAcctRelSel/ns19:Account/ns19:AcctType) = "1046") and + (exists($PartySvcAcctRelSel/ns19:RegulatoryInfo/ns1:RegInfoType) and data($PartySvcAcctRelSel/ns19:RegulatoryInfo/ns1:RegInfoType) = "VN" ))then( + (: Caso Cliente POSEE Cta VERDE producto 1027 Encuesta tipo VJ :) + + { data($PartySvcAcctRelSel/ns19:RegulatoryInfo/ns1:AcctUse) } + { data($PartySvcAcctRelSel/ns19:RegulatoryInfo/ns1:FundsSrc) } + { data($PartySvcAcctRelSel/ns19:RegulatoryInfo/ns1:FundsDest) } + { data($PartySvcAcctRelSel/ns19:RegulatoryInfo/ns1:BalanceInfo[1]/ns1:BalanceRange) } + { data($PartySvcAcctRelSel/ns19:SvcReason) } + + + + + + + + + /* + )else + if ((exists($updateCustomerInterview_Rq1/ns29:NaturalCustomer/ns19:PartySvcAcctRelSel/ns19:Account/ns19:AcctId) and data($updateCustomerInterview_Rq1/ns29:NaturalCustomer/ns19:PartySvcAcctRelSel/ns19:Account/ns19:AcctId) != "")) then( + (: Caso Cliente con numero de cuenta :) + + { data($updateCustomerInterview_Rq1/ns29:NaturalCustomer/ns19:PartySvcAcctRelSel/ns19:RegulatoryInfo/ns1:FundsSrc) } + { data($updateCustomerInterview_Rq1/ns29:NaturalCustomer/ns19:PartySvcAcctRelSel/ns19:RegulatoryInfo/ns1:AcctUse) } + { data($updateCustomerInterview_Rq1/ns29:NaturalCustomer/ns19:PartySvcAcctRelSel/ns19:RegulatoryInfo/ns1:DepositsInfo[1]/ns1:DepositsRange) } + { data($updateCustomerInterview_Rq1/ns29:NaturalCustomer/ns19:PartySvcAcctRelSel/ns19:RegulatoryInfo/ns1:DepositsInfo[1]/ns1:DepositsQty) } + { data($updateCustomerInterview_Rq1/ns29:NaturalCustomer/ns19:PartySvcAcctRelSel/ns19:RegulatoryInfo/ns1:WithdrawalsInfo[1]/ns1:WithdrawalsQty) } + { data($updateCustomerInterview_Rq1/ns29:NaturalCustomer/ns19:PartySvcAcctRelSel/ns19:RegulatoryInfo/ns1:WithdrawalsInfo[1]/ns1:WithdrawalsRange) } + { data($updateCustomerInterview_Rq1/ns29:NaturalCustomer/ns19:PartySvcAcctRelSel/ns19:RegulatoryInfo/ns1:ElecTransInfo[1]/ns1:ElecTransQty) } + { data($updateCustomerInterview_Rq1/ns29:NaturalCustomer/ns19:PartySvcAcctRelSel/ns19:RegulatoryInfo/ns1:ElecTransInfo[1]/ns1:ElecTransRange) } + { data($updateCustomerInterview_Rq1/ns29:NaturalCustomer/ns19:PartySvcAcctRelSel/ns19:RegulatoryInfo/ns1:CurrencyOpe/ns1:CurrencyName) } + { data($updateCustomerInterview_Rq1/ns29:NaturalCustomer/ns19:PartySvcAcctRelSel/ns19:RegulatoryInfo/ns1:TransferInfo[./ns1:TransferType='Origen']/ns1:TransferCountry) } + { data($updateCustomerInterview_Rq1/ns29:NaturalCustomer/ns19:PartySvcAcctRelSel/ns19:RegulatoryInfo/ns1:TransferInfo[./ns1:TransferType='Destino']/ns1:TransferCountry) } + + + /* + )else( + (: Caso Cliente sin numero de cuenta :) + + { data($updateCustomerInterview_Rq1/ns29:NaturalCustomer/ns19:PartySvcAcctRelSel/ns19:SvcReason) } + { data($updateCustomerInterview_Rq1/ns29:NaturalCustomer/ns19:PartySvcAcctRelSel/ns19:EmploymentData/ns22:Income/ns22:Amt) } + { data($updateCustomerInterview_Rq1/ns29:NaturalCustomer/ns19:PartySvcAcctRelSel/ns19:EmploymentData/ns22:ExtraIncome/ns22:Amt) } + { data($updateCustomerInterview_Rq1/ns29:NaturalCustomer/ns19:PartySvcAcctRelSel/ns19:CustVerificationList/ns0:ForeignTransfersInd) } + { data($updateCustomerInterview_Rq1/ns29:NaturalCustomer/ns19:PartySvcAcctRelSel/ns19:RegulatoryInfo/ns1:TransferInfo[1]/ns1:TransferCountry[1]) } + { data($updateCustomerInterview_Rq1/ns29:NaturalCustomer/ns19:PartySvcAcctRelSel/ns19:RegulatoryInfo/ns1:TransferInfo[2]/ns1:TransferCountry[1]) } + { data($updateCustomerInterview_Rq1/ns29:NaturalCustomer/ns19:PartySvcAcctRelSel/ns19:RegulatoryInfo/ns1:TransferInfo[3]/ns1:TransferCountry[1]) } + { data($updateCustomerInterview_Rq1/ns29:NaturalCustomer/ns19:PartySvcAcctRelSel/ns19:Product/ns19:ProdDesc) } + { data($updateCustomerInterview_Rq1/ns29:NaturalCustomer/ns19:PartySvcAcctRelSel/ns19:DeclineInfoReason) } + + + + + /* + ) + } + + )else if(data($readDVM_Rs1/ns30:Outputs/ns30:Output[1]/ns30:Attributes/ns30:Attribute[./ns30:Name='NUMREG']/ns30:Value)='1065')then( + (: Caso VB1762_Reg1065 :) + + A + { data($updateCustomerInterview_Rq1/ns29:NaturalCustomer/ns19:CustId[1]/ns19:CustPermId) } + + { + if ((data($updateCustomerInterview_Rq1/ns29:MsgRqHdr/ns26:ApplicantData/ns26:Application) = "PORTALAGS" and + data($updateCustomerInterview_Rq1/ns29:MsgRqHdr/ns26:NetworkTrnInfo[1]/ns26:TransactionCode) = "1762")) then + ("001") + else + () + } + + { data($updateCustomerInterview_Rq1/ns29:NaturalCustomer/ns19:CustInfo/ns19:CustType) } + { data($updateCustomerInterview_Rq1/ns29:NaturalCustomer/ns19:CustVerificationList[1]/ns0:AnswInterwInd) } + { data($updateCustomerInterview_Rq1/ns29:NaturalCustomer/ns19:Addr[1]/ns23:City) } + { data($updateCustomerInterview_Rq1/ns29:NaturalCustomer/ns19:Addr[1]/ns23:Addr1) } + { data($updateCustomerInterview_Rq1/ns29:NaturalCustomer/ns19:CustInfo/ns19:ContactInfo[1]/ns16:PhoneNum[1]/ns16:Phone) } + { data($updateCustomerInterview_Rq1/ns29:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:BirthCountry) } + { data($updateCustomerInterview_Rq1/ns29:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:ResidenceCountry) } + { data($updateCustomerInterview_Rq1/ns29:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:SecondNationality) } + { data($updateCustomerInterview_Rq1/ns29:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:OtherIdentDoc[./ns21:Type='NUMERO TIN']/ns21:IdentSerialNum) } + { data($updateCustomerInterview_Rq1/ns29:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:OtherIdentDoc[./ns21:Type='NUMERO SEGURO SOCIAL']/ns21:IdentSerialNum) } + { data($updateCustomerInterview_Rq1/ns29:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:OtherIdentDoc[./ns21:Type='GREENCAR']/ns21:IdentSerialNum) } + { data($updateCustomerInterview_Rq1/ns29:NaturalCustomer/ns19:Organization[1]/ns12:IncAgrmt/ns12:FormedCountry) } + { data($updateCustomerInterview_Rq1/ns29:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:OtherIdentDoc[./ns21:Type='NUMERO GIN']/ns21:IdentSerialNum) } + { data($updateCustomerInterview_Rq1/ns29:NaturalCustomer/ns19:CustVerificationList[1]/ns0:PayOtherTaxesInd) } + { data($updateCustomerInterview_Rq1/ns29:NaturalCustomer/ns19:CustVerificationList[1]/ns0:USAFlyerInd) } + { data($updateCustomerInterview_Rq1/ns29:NaturalCustomer/ns19:CustVerificationList[1]/ns0:RelUSAlnd) } + { data($updateCustomerInterview_Rq1/ns29:NaturalCustomer/ns19:CustVerificationList[1]/ns0:AcctUSAlnd) } + + { + let $IssDt := $updateCustomerInterview_Rq1/ns29:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:OtherIdentDoc[./ns21:Type='NUMERO TIN']/ns21:IssDt + return + if(data($IssDt)!='')then( + xqu:date-to-rafagaDDMMYYYY($IssDt) + )else() + } + + + { + let $ExpDt := $updateCustomerInterview_Rq1/ns29:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:OtherIdentDoc[./ns21:Type='NUMERO TIN']/ns21:ExpDt + return + if(data($ExpDt)!='')then( + xqu:date-to-rafagaDDMMYYYY($ExpDt) + )else() + } + + + { + let $IssDt := $updateCustomerInterview_Rq1/ns29:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:OtherIdentDoc[./ns21:Type='GREENCAR']/ns21:IssDt + return + if(data($IssDt)!='')then( + xqu:date-to-rafagaDDMMYYYY($IssDt) + )else() + } + + + { + let $ExpDt := $updateCustomerInterview_Rq1/ns29:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:OtherIdentDoc[./ns21:Type='GREENCAR']/ns21:ExpDt + return + if(data($ExpDt)!='')then( + xqu:date-to-rafagaDDMMYYYY($ExpDt) + )else() + } + + + { + let $IssDt := $updateCustomerInterview_Rq1/ns29:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:OtherIdentDoc[./ns21:Type='NUMERO GIN']/ns21:IssDt + return + if(data($IssDt)!='')then( + xqu:date-to-rafagaDDMMYYYY($IssDt) + )else() + } + + + { + let $ExpDt := $updateCustomerInterview_Rq1/ns29:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:OtherIdentDoc[./ns21:Type='NUMERO GIN']/ns21:ExpDt + return + if(data($ExpDt)!='')then( + xqu:date-to-rafagaDDMMYYYY($ExpDt) + )else() + } + + + )else( + (:Continuar aqui para otros casos de VB y Registro. Validar cada caso con else if:) + ) + } + + + +}; + +declare variable $updateCustomerInterview_Rq1 as element(ns29:updateCustomerInterview_Rq) external; +declare variable $readDVM_Rs1 as element(ns30:readDVM_Rs) external; + +xf:AS400NaturalCustomerInAppSvc_updateCustomerInterview_CanonicalToInput($updateCustomerInterview_Rq1, + $readDVM_Rs1) \ No newline at end of file diff --git a/AS400NaturalCustomerInAppSvc/operations/updateCustomerInterview/xq/AS400NaturalCustomerInAppSvc_updateCustomerInterview_InputToCanonical.xqy b/AS400NaturalCustomerInAppSvc/operations/updateCustomerInterview/xq/AS400NaturalCustomerInAppSvc_updateCustomerInterview_InputToCanonical.xqy new file mode 100644 index 0000000..8090b76 --- /dev/null +++ b/AS400NaturalCustomerInAppSvc/operations/updateCustomerInterview/xq/AS400NaturalCustomerInAppSvc_updateCustomerInterview_InputToCanonical.xqy @@ -0,0 +1,190 @@ +xquery version "1.0" encoding "utf-8"; + +(:: OracleAnnotationVersion "1.0" ::) + +declare namespace ns7="http://Obi_Wan/EjecutaTRX"; +(:: import schema at "../xsd/AS400NaturalCustomerInAppSvc_updateCustomerInterview.xsd" ::) +declare namespace ns30="http://xmlns.banesco.com/Service/NaturalCustomerMgmtSvc"; +(:: import schema at "../../../../BanescoCommonArtifacts/xsd/canonical/Services/NaturalCustomerMgmtSvc.xsd" ::) + +declare namespace ns29 = "http://xmlns.banesco.com/EnterpriseObjects/TradeRegistry"; +declare namespace ns25 = "http://xmlns.banesco.com/EnterpriseObjects/Service"; +declare namespace ns26 = "http://xmlns.banesco.com/EnterpriseObjects/Addr"; +declare namespace ns27 = "http://xmlns.banesco.com/EnterpriseObjects/MsgRqHdr"; +declare namespace ns28 = "http://xmlns.banesco.com/EnterpriseObjects/Status"; +declare namespace ns21 = "http://xmlns.banesco.com/EnterpriseObjects/PersonInfo_v2.0"; +declare namespace ns22 = "http://xmlns.banesco.com/EnterpriseObjects/EmploymentData_v2.0"; +declare namespace ns23 = "http://xmlns.banesco.com/EnterpriseObjects/MsgRsHdr"; +declare namespace ns24 = "http://xmlns.banesco.com/EnterpriseObjects/Addr_v2.0"; +declare namespace ns20 = "http://xmlns.banesco.com/EnterpriseObjects/Taxes_v2.0"; +declare namespace xf = "http://tempuri.org/AS400NaturalCustomerInAppSvc/operations/updateCustomerInterview/xq/AS400NaturalCustomerInAppSvc_updateCustomerInterview_InputToCanonical/"; +declare namespace ns16 = "http://xmlns.banesco.com/EnterpriseObjects/ContactInfo_v2.0"; +declare namespace ns17 = "http://xmlns.banesco.com/EnterpriseObjects/CommonComplexType"; +declare namespace ns14 = "http://xmlns.banesco.com/EnterpriseObjects/Product"; +declare namespace ns15 = "http://xmlns.banesco.com/EnterpriseObjects/PersonName"; +declare namespace ns18 = "http://xmlns.banesco.com/EnterpriseObjects/Banking"; +declare namespace ns19 = "http://xmlns.banesco.com/EnterpriseObjects/NaturalCustomer"; +declare namespace ns9 = "http://xmlns.banesco.com/EnterpriseObjects/Organization"; +declare namespace ns32 = "http://xmlns.banesco.com/EnterpriseObjects/PersonInfo"; +declare namespace ns33 = "http://xmlns.banesco.com/EnterpriseObjects/Score"; +declare namespace ns12 = "http://xmlns.banesco.com/EnterpriseObjects/Organization_v2.0"; +declare namespace ns5 = "http://xmlns.banesco.com/EnterpriseObjects/Contact"; +declare namespace ns13 = "http://xmlns.banesco.com/EnterpriseObjects/Chk"; +declare namespace ns31 = "http://xmlns.banesco.com/EnterpriseObjects/AffiliationSvc"; +declare namespace ns6 = "http://xmlns.banesco.com/EnterpriseObjects/Risk"; +declare namespace ns10 = "http://xmlns.banesco.com/EnterpriseObjects/Ref_v2.0"; +declare namespace ns8 = "http://xmlns.banesco.com/EnterpriseObjects/Investment"; +declare namespace ns11 = "http://xmlns.banesco.com/EnterpriseObjects/Loan"; +declare namespace ns2 = "http://xmlns.banesco.com/EnterpriseObjects/Fee"; +declare namespace ns1 = "http://xmlns.banesco.com/EnterpriseObjects/RegulatoryInfo"; +declare namespace ns4 = "http://xmlns.banesco.com/EnterpriseObjects/Bankinfo"; +declare namespace ns3 = "http://xmlns.banesco.com/EnterpriseObjects/FinancialInfo"; +declare namespace ns0 = "http://xmlns.banesco.com/EnterpriseObjects/CustVerificationList"; + +declare namespace stat = "http://xmlns.banesco.com/EnterpriseObjects/Status"; + +import module namespace xqu="http://xmlns.banesco.com/xquey-functions" at "../../../../BanescoCommonArtifacts/xq/libraries/AS400Util.xqy", "../../../../BanescoCommonArtifacts/xq/libraries/dateTimeUtil.xqy"; + +declare function xf:AS400NaturalCustomerInAppSvc_updateCustomerInterview_InputToCanonical($ejecutaTRXResponse1 as element(ns7:EjecutaTRXResponse), + $updateCustomerInterview_Rq1 as element(ns30:updateCustomerInterview_Rq), + $dvm as element(*)) + as element(ns30:updateCustomerInterview_Rs) { + + + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/ns7:Respuesta[1]/@NUMREG) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/@NOCDTOSAL) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/@CODTRN) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/@CODSUP) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/@TIPOPER) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/@CONTRN) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/@DSCREG) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/ns7:Respuesta[1]/@NUMREG) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/@TIPTRN) } + { data($updateCustomerInterview_Rq1/ns30:MsgRqHdr/ns27:RequestId) } + AS400 + + { + if(fn:boolean(data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:CODERR1)) or + fn:boolean(data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:CODERR2)) or + fn:boolean(data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:CODERR3)) or + fn:boolean(data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:CODERR4)) or + fn:boolean(data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/ns7:Respuesta[1]/ns7:MSJERR)))then( + + {xqu:get-status($ejecutaTRXResponse1, $dvm)/*} + + )else if(data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/ns7:Respuesta[1]/@NUMREG)="0001")then( + (: Caso Reg0001 Exito sin data :) + + OK + Transaccion finalizada con exito + + )else if(data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/ns7:Respuesta[1]/@NUMREG)="1128")then( + (: Caso VB1845_Reg1128 :) + if ((exists($updateCustomerInterview_Rq1/ns30:NaturalCustomer[1]/ns19:PartySvcAcctRelSel/ns19:Account/ns19:AcctType) and + data($updateCustomerInterview_Rq1/ns30:NaturalCustomer[1]/ns19:PartySvcAcctRelSel/ns19:Account/ns19:AcctType) = "1026") or (exists($updateCustomerInterview_Rq1/ns30:NaturalCustomer[1]/ns19:PartySvcAcctRelSel/ns19:Account/ns19:AcctType) and + data($updateCustomerInterview_Rq1/ns30:NaturalCustomer[1]/ns19:PartySvcAcctRelSel/ns19:Account/ns19:AcctType) = "1046"))then( + (: Cliente POSEE una Cta Verde :) + + + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/ns7:Respuesta[1]/ns7:RESP5) } + + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/ns7:Respuesta[1]/ns7:RESP1) } + + + { xqu:montoRafagaToDouble(xqu:complete-amt9(data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/ns7:Respuesta[1]/ns7:RESP4))) } + + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/ns7:Respuesta[1]/ns7:RESP2) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/ns7:Respuesta[1]/ns7:RESP3) } + + + + )else + if ((exists($updateCustomerInterview_Rq1/ns30:NaturalCustomer/ns19:PartySvcAcctRelSel/ns19:Account/ns19:AcctId) and data($updateCustomerInterview_Rq1/ns30:NaturalCustomer/ns19:PartySvcAcctRelSel/ns19:Account/ns19:AcctId) != "")) then( + (: Caso Cliente con numero de cuenta :) + + + + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/ns7:Respuesta[1]/ns7:RESP2) } + + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/ns7:Respuesta[1]/ns7:RESP4) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/ns7:Respuesta[1]/ns7:RESP3) } + + + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/ns7:Respuesta[1]/ns7:RESP5) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/ns7:Respuesta[1]/ns7:RESP6) } + + + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/ns7:Respuesta[1]/ns7:RESP7) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/ns7:Respuesta[1]/ns7:RESP8) } + + + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/ns7:Respuesta[1]/ns7:RESP10) } + Origen + + + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/ns7:Respuesta[1]/ns7:RESP11) } + Destino + + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/ns7:Respuesta[1]/ns7:RESP1) } + + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/ns7:Respuesta[1]/ns7:RESP9) } + + + + + )else( + (: Caso Cliente sin numero de cuenta :) + + + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/ns7:Respuesta[1]/ns7:RESP9) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/ns7:Respuesta[1]/ns7:RESP1) } + + + { + for $RESP2 in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/ns7:Respuesta[1]/ns7:RESP2 + return + { xqu:montoRafagaToDouble(xqu:complete-amt9(data($RESP2))) } + } + + + { + for $RESP3 in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/ns7:Respuesta[1]/ns7:RESP3 + return + { xqu:montoRafagaToDouble(xqu:complete-amt9(data($RESP3))) } + } + + + + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/ns7:Respuesta[1]/ns7:RESP4) } + + + + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/ns7:Respuesta[1]/ns7:RESP5) } + + + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/ns7:Respuesta[1]/ns7:RESP6) } + + + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/ns7:Respuesta[1]/ns7:RESP7) } + + + + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/ns7:Respuesta[1]/ns7:RESP8) } + + + + ) + )else( + (:Continuar aqui para otros casos de VB y Registro. Validar cada caso con else if:) + ) + } + +}; + +declare variable $ejecutaTRXResponse1 as element(ns7:EjecutaTRXResponse) external; +declare variable $updateCustomerInterview_Rq1 as element(ns30:updateCustomerInterview_Rq) external; +declare variable $dvm as element(*) external; + +xf:AS400NaturalCustomerInAppSvc_updateCustomerInterview_InputToCanonical($ejecutaTRXResponse1, + $updateCustomerInterview_Rq1, + $dvm) \ No newline at end of file diff --git a/AS400NaturalCustomerInAppSvc/operations/updateCustomerInterview/xsd/AS400NaturalCustomerInAppSvc_updateCustomerInterview.xsd b/AS400NaturalCustomerInAppSvc/operations/updateCustomerInterview/xsd/AS400NaturalCustomerInAppSvc_updateCustomerInterview.xsd new file mode 100644 index 0000000..6d6b0f6 --- /dev/null +++ b/AS400NaturalCustomerInAppSvc/operations/updateCustomerInterview/xsd/AS400NaturalCustomerInAppSvc_updateCustomerInterview.xsd @@ -0,0 +1,261 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/AS400NaturalCustomerInAppSvc/operations/updateCustomerRelationship/proxy/AS400NaturalCustomerInAppSvc_updateCustomerRelationship.pipeline b/AS400NaturalCustomerInAppSvc/operations/updateCustomerRelationship/proxy/AS400NaturalCustomerInAppSvc_updateCustomerRelationship.pipeline new file mode 100644 index 0000000..084f065 --- /dev/null +++ b/AS400NaturalCustomerInAppSvc/operations/updateCustomerRelationship/proxy/AS400NaturalCustomerInAppSvc_updateCustomerRelationship.pipeline @@ -0,0 +1,214 @@ + + + + + + + AS400NaturalCustomerInAppSvcSOAP + http://xmlns.banesco.com/ApplicationService/AS400NaturalCustomerInAppSvc + + + + 1.0 + + + + + + + + nat:updateCustomerRelationship_Rq + + ./nat:updateCustomerRelationship_Rq + + + + + + + + + + + + + + + $body/nat:updateCustomerRelationship_Rq/nat:MsgRqHdr + + + + + + + + + + + + + + + + + $dvmResponse + + + $body/nat:updateCustomerRelationship_Rq + + + + + + + + + + + + + + + + + $body/direct:EjecutaTRX + + + $backupBody/nat:updateCustomerRelationship_Rq/nat:MsgRqHdr + + + + + + + + http://xmlns.banesco.com/Service/NaturalCustomerMgmtSvc + + + + + http://xmlns.banesco.com/Service/NaturalCustomerMgmtSvc + + + + + + + + + + + ejec:EjecutaTRX + + + + + + ejec:EjecutaTRXResponse + + + + + + + + + "DVM_RESPONSE_CODE" + + + "VC" + + + $body/direct:EjecutaTRXResponse/direct:EjecutaTRXResult/direct:TRXSResults/direct:Respuestas[1]/direct:Respuesta[1]/@NUMREG + + + $backupBody/nat:updateCustomerRelationship_Rq/nat:MsgRqHdr + + + "AS400" + + + + + + + + + + + + "DVM_MESSAGE_ERROR" + + + "MESSAGE" + + + $errors + + + $backupBody/nat:updateCustomerRelationship_Rq/nat:MsgRqHdr + + + "AS400" + + + + + + + + + + + + + + + + + $body/direct:EjecutaTRXResponse + + + $backupBody/nat:updateCustomerRelationship_Rq + + + fn-bea:inlinedXML($dvm) + + + + + + + + + + + + + + + nat:updateCustomerRelationship_Rs + + ./nat:updateCustomerRelationship_Rs + + + + + + + + + + + http://xmlns.banesco.com/Service/NaturalCustomerMgmtSvc + + + + + http://xmlns.banesco.com/Service/NaturalCustomerMgmtSvc + + + + + + \ No newline at end of file diff --git a/AS400NaturalCustomerInAppSvc/operations/updateCustomerRelationship/xq/AS400NaturalCustomerInAppSvc_updateCustomerRelationship_CanonicalToInput.xqy b/AS400NaturalCustomerInAppSvc/operations/updateCustomerRelationship/xq/AS400NaturalCustomerInAppSvc_updateCustomerRelationship_CanonicalToInput.xqy new file mode 100644 index 0000000..5eda2c5 --- /dev/null +++ b/AS400NaturalCustomerInAppSvc/operations/updateCustomerRelationship/xq/AS400NaturalCustomerInAppSvc_updateCustomerRelationship_CanonicalToInput.xqy @@ -0,0 +1,234 @@ +xquery version "1.0" encoding "utf-8"; + +(:: OracleAnnotationVersion "1.0" ::) + +declare namespace ns6="http://Obi_Wan/EjecutaTRX"; +(:: import schema at "../xsd/AS400NaturalCustomerInAppSvc_updateCustomerRelationship.xsd" ::) +declare namespace ns29="http://xmlns.banesco.com/Service/NaturalCustomerMgmtSvc"; +(:: import schema at "../../../../BanescoCommonArtifacts/xsd/canonical/Services/NaturalCustomerMgmtSvc.xsd" ::) + +declare namespace ns25 = "http://xmlns.banesco.com/EnterpriseObjects/Addr"; +declare namespace ns26 = "http://xmlns.banesco.com/EnterpriseObjects/MsgRqHdr"; +declare namespace ns27 = "http://xmlns.banesco.com/EnterpriseObjects/Status"; +declare namespace ns28 = "http://xmlns.banesco.com/EnterpriseObjects/TradeRegistry"; +declare namespace ns21 = "http://xmlns.banesco.com/EnterpriseObjects/PersonInfo_v2.0"; +declare namespace ns22 = "http://xmlns.banesco.com/EnterpriseObjects/EmploymentData_v2.0"; +declare namespace ns23 = "http://xmlns.banesco.com/EnterpriseObjects/Addr_v2.0"; +declare namespace ns24 = "http://xmlns.banesco.com/EnterpriseObjects/Service"; +declare namespace ns20 = "http://xmlns.banesco.com/EnterpriseObjects/Taxes_v2.0"; +declare namespace xf = "http://tempuri.org/AS400NaturalCustomerInAppSvc/operations/updateCustomerRelationship/xq/AS400NaturalCustomerInAppSvc_updateCustomerRelationship_CanonicalToInput/"; +declare namespace ns16 = "http://xmlns.banesco.com/EnterpriseObjects/ContactInfo_v2.0"; +declare namespace ns17 = "http://xmlns.banesco.com/EnterpriseObjects/CommonComplexType"; +declare namespace ns14 = "http://xmlns.banesco.com/EnterpriseObjects/Product"; +declare namespace ns15 = "http://xmlns.banesco.com/EnterpriseObjects/PersonName"; +declare namespace ns18 = "http://xmlns.banesco.com/EnterpriseObjects/Banking"; +declare namespace ns19 = "http://xmlns.banesco.com/EnterpriseObjects/NaturalCustomer"; +declare namespace ns9 = "http://xmlns.banesco.com/EnterpriseObjects/Organization"; +declare namespace ns32 = "http://xmlns.banesco.com/EnterpriseObjects/PersonInfo"; +declare namespace ns33 = "http://xmlns.banesco.com/EnterpriseObjects/Score"; +declare namespace ns30 = "http://xmlns.banesco.com/Service/MessageEnrichUtilMgmtSvc"; +declare namespace ns12 = "http://xmlns.banesco.com/EnterpriseObjects/Organization_v2.0"; +declare namespace ns5 = "http://xmlns.banesco.com/EnterpriseObjects/Contact"; +declare namespace ns13 = "http://xmlns.banesco.com/EnterpriseObjects/Chk"; +declare namespace ns31 = "http://xmlns.banesco.com/EnterpriseObjects/AffiliationSvc"; +declare namespace ns7 = "http://xmlns.banesco.com/EnterpriseObjects/Risk"; +declare namespace ns10 = "http://xmlns.banesco.com/EnterpriseObjects/Ref_v2.0"; +declare namespace ns8 = "http://xmlns.banesco.com/EnterpriseObjects/Investment"; +declare namespace ns11 = "http://xmlns.banesco.com/EnterpriseObjects/Loan"; +declare namespace ns2 = "http://xmlns.banesco.com/EnterpriseObjects/Fee"; +declare namespace ns1 = "http://xmlns.banesco.com/EnterpriseObjects/RegulatoryInfo"; +declare namespace ns4 = "http://xmlns.banesco.com/EnterpriseObjects/Bankinfo"; +declare namespace ns3 = "http://xmlns.banesco.com/EnterpriseObjects/FinancialInfo"; +declare namespace ns0 = "http://xmlns.banesco.com/EnterpriseObjects/CustVerificationList"; + +import module namespace xqu="http://xmlns.banesco.com/xquey-functions" at "../../../../BanescoCommonArtifacts/xq/libraries/AS400Util.xqy", "../../../../BanescoCommonArtifacts/xq/libraries/dateTimeUtil.xqy"; + +declare function xf:AS400NaturalCustomerInAppSvc_updateCustomerRelationship_CanonicalToInput($updateCustomerRelationship_Rq1 as element(ns29:updateCustomerRelationship_Rq), + $readDVM_Rs1 as element(ns30:readDVM_Rs)) + as element(ns6:EjecutaTRX) { + + { data($updateCustomerRelationship_Rq1/ns29:MsgRqHdr/ns26:OperatorCode) } + { data($updateCustomerRelationship_Rq1/ns29:MsgRqHdr/ns26:NetworkTrnInfo/ns26:AgencyCode) } + { data($readDVM_Rs1/ns30:Outputs/ns30:Output[1]/ns30:Attributes/ns30:Attribute[./ns30:Name='INDLINEA']/ns30:Value) } + { data($readDVM_Rs1/ns30:Outputs/ns30:Output[1]/ns30:Attributes/ns30:Attribute[./ns30:Name='CRITREV']/ns30:Value) } + { data($readDVM_Rs1/ns30:Outputs/ns30:Output[1]/ns30:Attributes/ns30:Attribute[./ns30:Name='INDCONT']/ns30:Value) } + { data($updateCustomerRelationship_Rq1/ns29:MsgRqHdr/ns26:NetworkTrnInfo/ns26:BankId) } + { data($updateCustomerRelationship_Rq1/ns29:MsgRqHdr/ns26:SourceChannelCode) } + { data($updateCustomerRelationship_Rq1/ns29:MsgRqHdr/ns26:NetworkTrnInfo/ns26:ChannelUserId) } + + { xqu:day-from-date-leftpadding(data($updateCustomerRelationship_Rq1/ns29:MsgRqHdr/ns26:NetworkTrnInfo/ns26:TransactionDate)) } + { xqu:month-from-date-leftpadding(data($updateCustomerRelationship_Rq1/ns29:MsgRqHdr/ns26:NetworkTrnInfo/ns26:TransactionDate)) } + { xqu:year-from-date-leftpadding(data($updateCustomerRelationship_Rq1/ns29:MsgRqHdr/ns26:NetworkTrnInfo/ns26:TransactionDate)) } + + + { xqu:hours-from-time-leftpadding(data($updateCustomerRelationship_Rq1/ns29:MsgRqHdr/ns26:NetworkTrnInfo/ns26:TransactionTime)) } + { xqu:minutes-from-time-leftpadding(data($updateCustomerRelationship_Rq1/ns29:MsgRqHdr/ns26:NetworkTrnInfo/ns26:TransactionTime)) } + { xqu:seconds-from-time-leftpadding(data($updateCustomerRelationship_Rq1/ns29:MsgRqHdr/ns26:NetworkTrnInfo/ns26:TransactionTime)) } + + + + { + (:Caso VB8931_Reg2008:) + if(data($readDVM_Rs1/ns30:Outputs/ns30:Output[1]/ns30:Attributes/ns30:Attribute[./ns30:Name='NUMREG']/ns30:Value)='2008')then( + for $CustRelInfo in $updateCustomerRelationship_Rq1/ns29:NaturalCustomer/ns19:CustRelInfo + return + + { data($updateCustomerRelationship_Rq1/ns29:NaturalCustomer/ns19:CustId/ns19:CustPermId) } + { data($updateCustomerRelationship_Rq1/ns29:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo/ns21:GovIssueIdent/ns21:IdentSerialNumPrefix) } + { data($updateCustomerRelationship_Rq1/ns29:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo/ns21:GovIssueIdent/ns21:IdentSerialNum) } + { data($CustRelInfo/ns19:CustRelType) } + { data($CustRelInfo/ns19:CustPermId) } + { data($CustRelInfo/ns19:IdentDoc/ns19:IdentSerialNumPrefix) } + { data($CustRelInfo/ns19:IdentDoc/ns19:IdentSerialNum) } + { data($CustRelInfo/ns19:RelId/ns19:CustRelIdType) } + + { + for $StartDt in $CustRelInfo/ns19:StartDt + return + if(data($StartDt)!='')then( + xqu:date-to-rafagaYYYYMMDD(data($StartDt)) + )else() + } + + + { + for $EndDt in $CustRelInfo/ns19:EndDt + return + if(data($EndDt)!='')then( + xqu:date-to-rafagaYYYYMMDD(data($EndDt)) + )else() + } + + { data($CustRelInfo/ns19:RelCons) } + + )else if(data($readDVM_Rs1/ns30:Outputs/ns30:Output[1]/ns30:Attributes/ns30:Attribute[./ns30:Name='NUMREG']/ns30:Value)='1124')then( + (:Caso VB1840_Reg1124:) + for $CustRelInfo in $updateCustomerRelationship_Rq1/ns29:NaturalCustomer/ns19:CustRelInfo + return + + { data($updateCustomerRelationship_Rq1/ns29:NaturalCustomer/ns19:CustId/ns19:CustPermId) } + { data($CustRelInfo/ns19:IdentDoc/ns19:IdentSerialNumPrefix) } + { data($CustRelInfo/ns19:IdentDoc/ns19:IdentSerialNum) } + { xqu:date-to-rafagaDDMMYYYY(data($CustRelInfo/ns19:StartDt)) } + { data($CustRelInfo/ns19:CustRelType) } + { data($CustRelInfo/ns19:PersonInfo/ns21:FullName) } + + { + for $PhoneNum in ($CustRelInfo/ns19:ContactInfo/ns16:PhoneNum) + return + if (upper-case(data($PhoneNum/ns16:PhoneType)) = 'OTROS') then + (data($PhoneNum/ns16:Phone)) + else + () + } + + { xqu:date-to-rafagaDDMMYYYY(data($CustRelInfo/ns19:Ref/ns10:IssueDt)) } + { data($CustRelInfo/ns19:RelFrom) } + { data($CustRelInfo/ns19:RelId/ns19:CustRelId) } + { data($CustRelInfo/ns19:IdentDoc/ns19:Type) } + U + + { + for $PhoneNum in ($CustRelInfo/ns19:ContactInfo/ns16:PhoneNum) + return + if (upper-case(data($PhoneNum/ns16:PhoneType)) = 'CELULAR') then + (data($PhoneNum/ns16:Phone)) + else + () + } + + { data($updateCustomerRelationship_Rq1/ns29:NaturalCustomer/ns19:Addr/ns23:StateProv) } + { data($updateCustomerRelationship_Rq1/ns29:NaturalCustomer/ns19:Addr/ns23:Country) } + + )else if(data($readDVM_Rs1/ns30:Outputs/ns30:Output[1]/ns30:Attributes/ns30:Attribute[./ns30:Name='NUMREG']/ns30:Value)='1125')then( + (:Caso VB1841_Reg1125:) + for $CustRelInfo in $updateCustomerRelationship_Rq1/ns29:NaturalCustomer/ns19:CustRelInfo + return + + { data($updateCustomerRelationship_Rq1/ns29:NaturalCustomer/ns19:CustId/ns19:CustPermId) } + { data($updateCustomerRelationship_Rq1/ns29:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo/ns21:GovIssueIdent/ns21:IdentSerialNumPrefix) } + { data($updateCustomerRelationship_Rq1/ns29:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo/ns21:GovIssueIdent/ns21:IdentSerialNum) } + { data($CustRelInfo/ns19:Ref/ns10:ProductId) } + { xqu:date-to-rafagaDDMMYYYY(data($CustRelInfo/ns19:StartDt)) } + { data($CustRelInfo/ns19:Ref/ns10:IssuingIdent/ns10:Name) } + { data($CustRelInfo/ns19:Ref/ns10:AverageAmount) } + { data($CustRelInfo/ns19:Ref/ns10:AverageAmountDesc) } + { xqu:date-to-rafagaDDMMYYYY(data($CustRelInfo/ns19:Ref/ns10:IssueDt)) } + { data($CustRelInfo/ns19:RelFrom) } + { data($CustRelInfo/ns19:RelId/ns19:CustRelId) } + U + { data($CustRelInfo/ns19:Ref/ns10:ProdDesc) } + + )else if(data($readDVM_Rs1/ns30:Outputs/ns30:Output[1]/ns30:Attributes/ns30:Attribute[./ns30:Name='NUMREG']/ns30:Value)='1127')then( + (:Caso VB1843_Reg1127:) + + { data($updateCustomerRelationship_Rq1/ns29:NaturalCustomer/ns19:CustId/ns19:CustPermId) } + { data($updateCustomerRelationship_Rq1/ns29:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo/ns21:GovIssueIdent/ns21:IdentSerialNumPrefix) } + { data($updateCustomerRelationship_Rq1/ns29:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo/ns21:GovIssueIdent/ns21:IdentSerialNum) } + { data($updateCustomerRelationship_Rq1/ns29:NaturalCustomer/ns19:CustRelInfo/ns19:CustRelType) } + { data($updateCustomerRelationship_Rq1/ns29:NaturalCustomer/ns19:CustRelInfo/ns19:OrgInfo/ns19:TradeRegistry/ns19:RegistryName) } + { data($updateCustomerRelationship_Rq1/ns29:NaturalCustomer/ns19:CustRelInfo/ns19:OrgInfo/ns19:TradeRegistry/ns19:RegistryNum) } + { data($updateCustomerRelationship_Rq1/ns29:NaturalCustomer/ns19:CustRelInfo/ns19:OrgInfo/ns19:TradeRegistry/ns19:Volume) } + { data($updateCustomerRelationship_Rq1/ns29:NaturalCustomer/ns19:CustRelInfo/ns19:OrgInfo/ns19:TradeRegistry/ns19:FolioNumber) } + { xqu:date-to-rafagaDDMMYYYY(data($updateCustomerRelationship_Rq1/ns29:NaturalCustomer/ns19:CustRelInfo/ns19:OrgInfo/ns19:TradeRegistry/ns19:RegistryDt)) } + { xqu:date-to-rafagaDDMMYYYY(data($updateCustomerRelationship_Rq1/ns29:NaturalCustomer/ns19:CustRelInfo/ns19:OrgInfo/ns19:TradeRegistry/ns19:RegistryExpDt)) } + M + + )else if(data($readDVM_Rs1/ns30:Outputs/ns30:Output[1]/ns30:Attributes/ns30:Attribute[./ns30:Name='NUMREG']/ns30:Value)='1137')then( + (:Caso VB1852_Reg1137:) + for $CustRelInfo in $updateCustomerRelationship_Rq1/ns29:NaturalCustomer/ns19:CustRelInfo + return + + { data($updateCustomerRelationship_Rq1/ns29:NaturalCustomer/ns19:CustId[1]/ns19:CustPermId) } + { data($updateCustomerRelationship_Rq1/ns29:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:GovIssueIdent[1]/ns21:IdentSerialNumPrefix) } + { data($updateCustomerRelationship_Rq1/ns29:NaturalCustomer/ns19:CustInfo/ns19:PersonInfo[1]/ns21:GovIssueIdent[1]/ns21:IdentSerialNum) } + { data($CustRelInfo/ns19:CustRelType) } + { data($CustRelInfo/ns19:IdentDoc[1]/ns19:IdentSerialNumPrefix) } + { data($CustRelInfo/ns19:IdentDoc[1]/ns19:IdentSerialNum) } + { data($CustRelInfo/ns19:CustPermId) } + { data($CustRelInfo/ns19:OrgInfo[1]/ns19:LegalName) } + { data($updateCustomerRelationship_Rq1/ns29:NaturalCustomer/ns19:EmploymentData[1]/ns22:JobTitle) } + { data($updateCustomerRelationship_Rq1/ns29:NaturalCustomer/ns19:EmploymentData[1]/ns22:Country) } + { data($updateCustomerRelationship_Rq1/ns29:NaturalCustomer/ns19:CustRelInfo[1]/ns19:RelCons) } + { data($updateCustomerRelationship_Rq1/ns29:MsgRqHdr/ns26:RequestedOperationType) } + + )else( + (:Continuar aqui para otros casos de VB y Registro. Validar cada caso con if:) + ) + + } + + + +}; + +declare variable $updateCustomerRelationship_Rq1 as element(ns29:updateCustomerRelationship_Rq) external; +declare variable $readDVM_Rs1 as element(ns30:readDVM_Rs) external; + +xf:AS400NaturalCustomerInAppSvc_updateCustomerRelationship_CanonicalToInput($updateCustomerRelationship_Rq1, + $readDVM_Rs1) \ No newline at end of file diff --git a/AS400NaturalCustomerInAppSvc/operations/updateCustomerRelationship/xq/AS400NaturalCustomerInAppSvc_updateCustomerRelationship_InputToCanonical.xqy b/AS400NaturalCustomerInAppSvc/operations/updateCustomerRelationship/xq/AS400NaturalCustomerInAppSvc_updateCustomerRelationship_InputToCanonical.xqy new file mode 100644 index 0000000..47d42b7 --- /dev/null +++ b/AS400NaturalCustomerInAppSvc/operations/updateCustomerRelationship/xq/AS400NaturalCustomerInAppSvc_updateCustomerRelationship_InputToCanonical.xqy @@ -0,0 +1,106 @@ +xquery version "1.0" encoding "utf-8"; + +(:: OracleAnnotationVersion "1.0" ::) + +declare namespace ns7="http://Obi_Wan/EjecutaTRX"; +(:: import schema at "../xsd/AS400NaturalCustomerInAppSvc_updateCustomerRelationship.xsd" ::) +declare namespace ns30="http://xmlns.banesco.com/Service/NaturalCustomerMgmtSvc"; +(:: import schema at "../../../../BanescoCommonArtifacts/xsd/canonical/Services/NaturalCustomerMgmtSvc.xsd" ::) + +declare namespace ns29 = "http://xmlns.banesco.com/EnterpriseObjects/TradeRegistry"; +declare namespace ns25 = "http://xmlns.banesco.com/EnterpriseObjects/Service"; +declare namespace ns26 = "http://xmlns.banesco.com/EnterpriseObjects/Addr"; +declare namespace ns27 = "http://xmlns.banesco.com/EnterpriseObjects/MsgRqHdr"; +declare namespace ns28 = "http://xmlns.banesco.com/EnterpriseObjects/Status"; +declare namespace ns21 = "http://xmlns.banesco.com/EnterpriseObjects/PersonInfo_v2.0"; +declare namespace ns22 = "http://xmlns.banesco.com/EnterpriseObjects/EmploymentData_v2.0"; +declare namespace ns23 = "http://xmlns.banesco.com/EnterpriseObjects/MsgRsHdr"; +declare namespace ns24 = "http://xmlns.banesco.com/EnterpriseObjects/Addr_v2.0"; +declare namespace ns20 = "http://xmlns.banesco.com/EnterpriseObjects/Taxes_v2.0"; +declare namespace xf = "http://tempuri.org/AS400NaturalCustomerInAppSvc/operations/updateCustomerRelationship/xq/AS400NaturalCustomerInAppSvc_updateCustomerRelationship_InputToCanonical/"; +declare namespace ns16 = "http://xmlns.banesco.com/EnterpriseObjects/ContactInfo_v2.0"; +declare namespace ns17 = "http://xmlns.banesco.com/EnterpriseObjects/CommonComplexType"; +declare namespace ns14 = "http://xmlns.banesco.com/EnterpriseObjects/Product"; +declare namespace ns15 = "http://xmlns.banesco.com/EnterpriseObjects/PersonName"; +declare namespace ns18 = "http://xmlns.banesco.com/EnterpriseObjects/Banking"; +declare namespace ns19 = "http://xmlns.banesco.com/EnterpriseObjects/NaturalCustomer"; +declare namespace ns9 = "http://xmlns.banesco.com/EnterpriseObjects/Organization"; +declare namespace ns32 = "http://xmlns.banesco.com/EnterpriseObjects/PersonInfo"; +declare namespace ns33 = "http://xmlns.banesco.com/EnterpriseObjects/Score"; +declare namespace ns12 = "http://xmlns.banesco.com/EnterpriseObjects/Organization_v2.0"; +declare namespace ns5 = "http://xmlns.banesco.com/EnterpriseObjects/Contact"; +declare namespace ns13 = "http://xmlns.banesco.com/EnterpriseObjects/Chk"; +declare namespace ns31 = "http://xmlns.banesco.com/EnterpriseObjects/AffiliationSvc"; +declare namespace ns6 = "http://xmlns.banesco.com/EnterpriseObjects/Risk"; +declare namespace ns10 = "http://xmlns.banesco.com/EnterpriseObjects/Ref_v2.0"; +declare namespace ns8 = "http://xmlns.banesco.com/EnterpriseObjects/Investment"; +declare namespace ns11 = "http://xmlns.banesco.com/EnterpriseObjects/Loan"; +declare namespace ns2 = "http://xmlns.banesco.com/EnterpriseObjects/Fee"; +declare namespace ns1 = "http://xmlns.banesco.com/EnterpriseObjects/RegulatoryInfo"; +declare namespace ns4 = "http://xmlns.banesco.com/EnterpriseObjects/Bankinfo"; +declare namespace ns3 = "http://xmlns.banesco.com/EnterpriseObjects/FinancialInfo"; +declare namespace ns0 = "http://xmlns.banesco.com/EnterpriseObjects/CustVerificationList"; + +declare namespace stat = "http://xmlns.banesco.com/EnterpriseObjects/Status"; + +import module namespace xqu="http://xmlns.banesco.com/xquey-functions" at "../../../../BanescoCommonArtifacts/xq/libraries/AS400Util.xqy", "../../../../BanescoCommonArtifacts/xq/libraries/dateTimeUtil.xqy"; + +declare function xf:AS400NaturalCustomerInAppSvc_updateCustomerRelationship_InputToCanonical($ejecutaTRXResponse1 as element(ns7:EjecutaTRXResponse), + $updateCustomerRelationship_Rq1 as element(ns30:updateCustomerRelationship_Rq), + $dvm as element(*)) + as element(ns30:updateCustomerRelationship_Rs) { + + + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/@NUMREG) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/@NOCDTOSAL) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/@CODTRN) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/@CODSUP) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/@TIPOPER) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/@CONTRN) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/@DSCREG) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/@NUMREG) } + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/@TIPTRN) } + { data($updateCustomerRelationship_Rq1/ns30:MsgRqHdr/ns27:RequestId) } + AS400 + + { + if(fn:boolean(data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:CODERR1)) or + fn:boolean(data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:CODERR2)) or + fn:boolean(data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:CODERR3)) or + fn:boolean(data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:CODERR4)) or + fn:boolean(data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas[1]/ns7:Respuesta[1]/ns7:MSJERR)))then( + (:Caso Fallido:) + + {xqu:get-status($ejecutaTRXResponse1, $dvm)/*} + + )else if(data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/@NUMREG)="0001")then( + (: Caso Exito sin data - VB1840_Reg1124, VB1841_Reg1125, VB1843_Reg1127 :) + + OK + { data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/@DSCREG) } + + )else if(data($ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/@NUMREG)="2008")then( + (:Caso VB8931_Reg2008:) + + + { + for $CONS in $ejecutaTRXResponse1/ns7:EjecutaTRXResult/ns7:TRXSResults/ns7:Respuestas/ns7:Respuesta[1]/ns7:CONS + return + { data($CONS) } + } + + + )else( + (:Continuar aqui para otros casos de VB y Registro. Seguir anidando con else if como el anterior:) + ) + } + +}; + +declare variable $ejecutaTRXResponse1 as element(ns7:EjecutaTRXResponse) external; +declare variable $updateCustomerRelationship_Rq1 as element(ns30:updateCustomerRelationship_Rq) external; +declare variable $dvm as element(*) external; + +xf:AS400NaturalCustomerInAppSvc_updateCustomerRelationship_InputToCanonical($ejecutaTRXResponse1, + $updateCustomerRelationship_Rq1, + $dvm) \ No newline at end of file diff --git a/AS400NaturalCustomerInAppSvc/operations/updateCustomerRelationship/xsd/AS400NaturalCustomerInAppSvc_updateCustomerRelationship.xsd b/AS400NaturalCustomerInAppSvc/operations/updateCustomerRelationship/xsd/AS400NaturalCustomerInAppSvc_updateCustomerRelationship.xsd new file mode 100644 index 0000000..39615fa --- /dev/null +++ b/AS400NaturalCustomerInAppSvc/operations/updateCustomerRelationship/xsd/AS400NaturalCustomerInAppSvc_updateCustomerRelationship.xsd @@ -0,0 +1,331 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/AS400NaturalCustomerInAppSvc/pom.xml b/AS400NaturalCustomerInAppSvc/pom.xml new file mode 100644 index 0000000..fe0108c --- /dev/null +++ b/AS400NaturalCustomerInAppSvc/pom.xml @@ -0,0 +1,20 @@ + + + + 4.0.0 + + + com.oracle.servicebus + sbar-project-common + 12.2.1-5-0 + + + AS400NaturalCustomerInAppSvc + AS400NaturalCustomerInAppSvc + 1.0-SNAPSHOT + + sbar + + + + \ No newline at end of file diff --git a/AS400NaturalCustomerInAppSvc/proxy/AS400NaturalCustomerInAppSvc.pipeline b/AS400NaturalCustomerInAppSvc/proxy/AS400NaturalCustomerInAppSvc.pipeline new file mode 100644 index 0000000..9fe42fd --- /dev/null +++ b/AS400NaturalCustomerInAppSvc/proxy/AS400NaturalCustomerInAppSvc.pipeline @@ -0,0 +1,40 @@ + + + + + + + AS400NaturalCustomerInAppSvcSOAP + http://xmlns.banesco.com/ApplicationService/AS400NaturalCustomerInAppSvc + + + + 1.0 + + + + + + + + + {fn:concat("AS400NaturalCustomerInAppSvc/operations/",$operation,"/proxy/AS400NaturalCustomerInAppSvc_",$operation)} + {data($operation)} +]]> + + + + + + http://xmlns.banesco.com/Service/NaturalCustomerMgmtSvc + + + + + http://xmlns.banesco.com/Service/NaturalCustomerMgmtSvc + + + + + + \ No newline at end of file diff --git a/AS400NaturalCustomerInAppSvc/proxy/AS400NaturalCustomerInAppSvc.proxy b/AS400NaturalCustomerInAppSvc/proxy/AS400NaturalCustomerInAppSvc.proxy new file mode 100644 index 0000000..7480363 --- /dev/null +++ b/AS400NaturalCustomerInAppSvc/proxy/AS400NaturalCustomerInAppSvc.proxy @@ -0,0 +1,35 @@ + + + + + + + + + + AS400NaturalCustomerInAppSvcSOAPQSPort + http://xmlns.banesco.com/ApplicationService/AS400NaturalCustomerInAppSvc + + + + + + full + 30000 + + + + + no-policies + + + + 1.0 + + + + local + true + + + \ No newline at end of file diff --git a/AS400NaturalCustomerInAppSvc/servicebus.sboverview b/AS400NaturalCustomerInAppSvc/servicebus.sboverview new file mode 100644 index 0000000..000577b --- /dev/null +++ b/AS400NaturalCustomerInAppSvc/servicebus.sboverview @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/AS400NaturalCustomerInAppSvc/wsdl/AS400NaturalCustomerInAppSvc.wsdl b/AS400NaturalCustomerInAppSvc/wsdl/AS400NaturalCustomerInAppSvc.wsdl new file mode 100644 index 0000000..754d2ac --- /dev/null +++ b/AS400NaturalCustomerInAppSvc/wsdl/AS400NaturalCustomerInAppSvc.wsdl @@ -0,0 +1,209 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..e69de29 diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..c5e44ff --- /dev/null +++ b/pom.xml @@ -0,0 +1,21 @@ + + + + 4.0.0 + + AS400NaturalCustomerInAppSvc + AS400NaturalCustomerInAppSvc + 1.0-SNAPSHOT + + pom + + + System + BanescoCommonArtifacts + AS400NaturalCustomerInAppSvc + SocketAdapterUtilParser + SocketAdapterUtilMgmtSvc + MessageEnrichUtilMgmtSvc + + + \ No newline at end of file