When using the XML to JSON node, the data in the ‘ng3StatusCode’ key is changing. Any ideas?
The Input on the ‘XML-JSON Works Order Details’ Node is (ng3:StatusCode = ISS):
<SOAP-ENV:Envelope xmlns:SOAP-ENV=“http://schemas.xmlsoap.org/soap/envelope/”>SOAP-ENV:Header/SOAP-ENV:Body<ng3:GET_WORKS_ORDERS_DETAIL xmlns:ng3=“http://www.sx3.com/GetWorksOrdersDetailResponse” xmlns:tns1=“http://www.sx3.com/sx3returnedmessages” xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”>ng3:WorksOrdersDetailResponseng3:APIReturnSUCCESS</ng3:APIReturn>ng3:APIMessages/ng3:WorksOrdersDetailng3:Assetng3:PropRefDELAFIELDHOUSELFT</ng3:PropRef>ng3:PropAddress< Lifts >, Delafield House, Christian Street, London, E1 1QD</ng3:PropAddress>ng3:PropTypeAUN</ng3:PropType>ng3:PhoneHome/ng3:RTBApplicationN</ng3:RTBApplication>ng3:AdminArea/ng3:AsbestosName/</ng3:Asset>ng3:Tenantng3:TenancyNameBUILDING</ng3:TenancyName>ng3:TenantEmail/ng3:SMSContacts/</ng3:Tenant>ng3:Callerng3:ReportedBy/ng3:PhoneContact/</ng3:Caller>ng3:WorksOrderng3:TransactionId1565045</ng3:TransactionId>ng3:WorSrqNo11637755</ng3:WorSrqNo>ng3:WorSeqno1</ng3:WorSeqno>ng3:WovVersionNo1</ng3:WovVersionNo>ng3:WovStatusN</ng3:WovStatus>ng3:WorAlternativeRef/ng3:DateRaised2023-04-11T13:05:48</ng3:DateRaised>ng3:DateIssued2023-04-11T13:09:11</ng3:DateIssued>ng3:DateDueComplete2023-04-12T13:09:11</ng3:DateDueComplete>ng3:Descriptionkeys have dropped down the lift shaft please recover</ng3:Description>ng3:PriorityIdE</ng3:PriorityId>ng3:LocationId/ng3:LocationNotesaun</ng3:LocationNotes>ng3:RightToRepairN</ng3:RightToRepair>ng3:CommentsFahim Hussain, Key Gray/red fob keychain… logo Manchester united, has name on keys Fahim and a set of keys GDPR question asked please contact him on 07768624275</ng3:Comments>ng3:AccessCodeAPPOINTMEN</ng3:AccessCode>ng3:AccessAMYYYYYNN</ng3:AccessAM>ng3:AccessPMYYYYYNN</ng3:AccessPM>ng3:AccessNotesAs Per Appointment</ng3:AccessNotes>ng3:ConfirmationIndN</ng3:ConfirmationInd>ng3:RechargeableFlagN</ng3:RechargeableFlag>ng3:ContractNumberPLSCON</ng3:ContractNumber>ng3:WorkProgrammeREP_LIFT</ng3:WorkProgramme>ng3:VariationReasonCode/ng3:VariationComments/ng3:Neighbourhood/ng3:AreaCodeBERNERNORTH BERNER ESTATE (NORTH) E1</ng3:AreaCode>ng3:StatusCodeISS</ng3:StatusCode>ng3:PolicyCodePOLICY1</ng3:PolicyCode>ng3:WorCreatedByMPUNTER</ng3:WorCreatedBy>ng3:UserMICHELLE PUNTER</ng3:User>ng3:Alerts/ng3:Jobsng3:Jobng3:SORCode7LD080101</ng3:SORCode>ng3:JobDescriptionLift:Attend to breakdown callout during normal working hours, undertake initial diagnosis of callout, repair lift not requiring any major parts or major repair, test operation of lift, return lift to full working order and complete lift log and service vis</ng3:JobDescription>ng3:Quantity1</ng3:Quantity>ng3:NetCost47.24</ng3:NetCost><ng3:TaxCost xsi:nil=“true”/>ng3:IsTenantRechargeableN</ng3:IsTenantRechargeable><ng3:AmountRechargeable xsi:nil=“true”/>ng3:JobOrderSeqno10</ng3:JobOrderSeqno>ng3:LocationNotesaun</ng3:LocationNotes>ng3:Classification/ng3:JobComments/ng3:ExpendCodePLS.6371.ELEC</ng3:ExpendCode>ng3:RootJobRefno6990215</ng3:RootJobRefno>ng3:JobRefno6990215</ng3:JobRefno></ng3:Job></ng3:Jobs>ng3:Appointments/ng3:VarWarnings/</ng3:WorksOrder></ng3:WorksOrdersDetail>ng3:APIVersionVer1.2 22/06/2020</ng3:APIVersion>ng3:APIRunid35167211</ng3:APIRunid></ng3:WorksOrdersDetailResponse>tns1:MESSAGE_RETURN_INFOtns1:SUCCESS_FLAGTRUE</tns1:SUCCESS_FLAG>tns1:MESSAGES_EXISTFALSE</tns1:MESSAGES_EXIST>tns1:RETURNED_MESSAGES/</tns1:MESSAGE_RETURN_INFO></ng3:GET_WORKS_ORDERS_DETAIL></SOAP-ENV:Body></SOAP-ENV:Envelope>
The JSON out is (ng3:StatusCode is now “CAN”):
[
{
“SOAP-ENV:Envelope”:{
“xmlns:SOAP-ENV”:“http://schemas.xmlsoap.org/soap/envelope/”,
“SOAP-ENV:Header”:“”,
“SOAP-ENV:Body”:{
“ng3:GET_WORKS_ORDERS_DETAIL”:{
“xmlns:ng3”:“http://www.sx3.com/GetWorksOrdersDetailResponse”,
“xmlns:tns1”:“http://www.sx3.com/sx3returnedmessages”,
“xmlns:xsi”:“http://www.w3.org/2001/XMLSchema-instance”,
“ng3:WorksOrdersDetailResponse”:{
“ng3:APIReturn”:“SUCCESS”,
“ng3:APIMessages”:“”,
“ng3:WorksOrdersDetail”:{
“ng3:Asset”:{
“ng3:PropRef”:“DELAFIELDHOUSELFT”,
“ng3:PropAddress”:“< Lifts >, Delafield House, Christian Street, London, E1 1QD”,
“ng3:PropType”:“AUN”,
“ng3:PhoneHome”:“”,
“ng3:RTBApplication”:“N”,
“ng3:AdminArea”:“”,
“ng3:AsbestosName”:“”
},
“ng3:Tenant”:{
“ng3:TenancyName”:“BUILDING”,
“ng3:TenantEmail”:“”,
“ng3:SMSContacts”:“”
},
“ng3:Caller”:{
“ng3:ReportedBy”:“”,
“ng3:PhoneContact”:“”
},
“ng3:WorksOrder”:{
“ng3:TransactionId”:“1565045”,
“ng3:WorSrqNo”:“11637755”,
“ng3:WorSeqno”:“1”,
“ng3:WovVersionNo”:“1”,
“ng3:WovStatus”:“N”,
“ng3:WorAlternativeRef”:“”,
“ng3:DateRaised”:“2023-04-11T13:05:48”,
“ng3:DateIssued”:“2023-04-11T13:09:11”,
“ng3:DateDueComplete”:“2023-04-12T13:09:11”,
“ng3:Description”:“keys have dropped down the lift shaft please recover”,
“ng3:PriorityId”:“20D”,
“ng3:LocationId”:“”,
“ng3:LocationNotes”:“aun”,
“ng3:RightToRepair”:“N”,
“ng3:Comments”:“Fahim Hussain, Key Gray/red fob keychain… logo Manchester united, has name on keys Fahim and a set of keys GDPR question asked please contact him on 07768624275”,
“ng3:AccessCode”:“APPOINTMEN”,
“ng3:AccessAM”:“YYYYYNN”,
“ng3:AccessPM”:“YYYYYNN”,
“ng3:AccessNotes”:“As Per Appointment”,
“ng3:ConfirmationInd”:“N”,
“ng3:RechargeableFlag”:“N”,
“ng3:ContractNumber”:“PLSCON”,
“ng3:WorkProgramme”:“REP_LIFT”,
“ng3:VariationReasonCode”:“”,
“ng3:VariationComments”:“”,
“ng3:Neighbourhood”:“”,
“ng3:AreaCode”:“BERNERNORTH BERNER ESTATE (NORTH) E1”,
“ng3:StatusCode”:“CAN”
“ng3:PolicyCode”:“POLICY1”,
“ng3:WorCreatedBy”:“MPUNTER”,
“ng3:User”:“MICHELLE PUNTER”,
“ng3:Alerts”:“”,
“ng3:Jobs”:{
“ng3:Job”:{
“ng3:SORCode”:“7LD080101”,
“ng3:JobDescription”:“Lift:Attend to breakdown callout during normal working hours, undertake initial diagnosis of callout, repair lift not requiring any major parts or major repair, test operation of lift, return lift to full working order and complete lift log and service vis”,
“ng3:Quantity”:“1”,
“ng3:NetCost”:“47.24”,
“ng3:TaxCost”:{…}, // 1 items
“ng3:IsTenantRechargeable”:“N”,
“ng3:AmountRechargeable”:{…}, // 1 items
“ng3:JobOrderSeqno”:“10”,
“ng3:LocationNotes”:“aun”,
“ng3:Classification”:“”,
“ng3:JobComments”:“”,
“ng3:ExpendCode”:“PLS.6371.ELEC”,
“ng3:RootJobRefno”:“6990215”,
“ng3:JobRefno”:“6990215”
}
},
“ng3:Appointments”:“”,
“ng3:VarWarnings”:“”
}
},
“ng3:APIVersion”:“Ver1.2 22/06/2020”,
“ng3:APIRunid”:“35167211”
},
“tns1:MESSAGE_RETURN_INFO”:{
“tns1:SUCCESS_FLAG”:“TRUE”,
“tns1:MESSAGES_EXIST”:“FALSE”,
“tns1:RETURNED_MESSAGES”:“”
}
}
}
}
}
]
Appreciate any help, and to save me going insane
It is worth adding, it looks like it is only the ng3:StatusCode value that changes.
Many thanks
Information on your n8n setup
- n8n version: Latest
- Database (default: SQLite): SQLite
- n8n EXECUTIONS_PROCESS setting (default: own, main): main
- Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
- Operating system: Ubuntu