Replies: 2 comments 1 reply
-
How about posting valid JSON first? |
Beta Was this translation helpful? Give feedback.
1 reply
-
Hello, problem solved. It was enough to add a .toString here:
greetings, |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
we are trying to read the content of a node.
We use the following piece of code:
The result is that msaStatus is empty. I expected to get the value: "KO".
We start from the following Json.
r.message is the content of "message".
We extract the HL7 message from the tag responseContent,
and then we try to read the value of: MSA/MSA.6/CE.1
{
"results" : {
"1111" : {
"status" : "SENT",
"message" : "<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/\">SOAP-ENV:Header/<SOAP-ENV:Body xmlns:ns2="urn:it.cup2000.cup.servizi">ns2:sendMessageResponsens2:statusOK</ns2:status>ns2:responseContent<?xml version="1.0"?>\r\n<SRR_S01 xmlns="urn:hl7-org:v2xml">\r\n <MSH>\r\n <MSH.1>|</MSH.1>\r\n <MSH.2>^~\&</MSH.2>\r\n <MSH.3>\r\n <HD.1>CUP2000</HD.1>\r\n </MSH.3>\r\n <MSH.4>\r\n <HD.1>CUP2000</HD.1>\r\n </MSH.4>\r\n <MSH.7>\r\n <TS.1>202110271727</TS.1>\r\n </MSH.7>\r\n <MSH.9>\r\n <MSG.1>SRR</MSG.1>\r\n <MSG.2>S01</MSG.2>\r\n <MSG.3>SRR_S01</MSG.3>\r\n </MSH.9>\r\n <MSH.10>FB7A943D3C0BDF87AABB</MSH.10>\r\n <MSH.11>\r\n <PT.1>P</PT.1>\r\n </MSH.11>\r\n <MSH.12>\r\n <VID.1>2.5</VID.1>\r\n </MSH.12>\r\n <MSH.13>1</MSH.13>\r\n </MSH>\r\n <MSA>\r\n <MSA.1>AE</MSA.1>\r\n <MSA.6>\r\n <CE.1>KO</CE.1>\r\n </MSA.6>\r\n </MSA>\r\n <ERR>\r\n <ERR.3>\r\n <CWE.1>207</CWE.1>\r\n <CWE.2>Application internal error</CWE.2>\r\n </ERR.3>\r\n <ERR.4>E</ERR.4>\r\n <ERR.5>\r\n <CWE.1>APP.102</CWE.1>\r\n <CWE.2>Errore durante il parsing del messaggio ricevuto</CWE.2>\r\n </ERR.5>\r\n <ERR.8>APP.102 - Errore durante il parsing del messaggio ricevuto</ERR.8>\r\n </ERR>\r\n</SRR_S01>\r\n</ns2:responseContent>ns2:responseVersion1.0.000</ns2:responseVersion>ns2:responseDate2021-10-27T17:27:00.984+02:00</ns2:responseDate></ns2:sendMessageResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>",
"duration" : "PT0.355S",
"startTime" : "2021-10-27T17:27:00.511"
}
},
"statuses" : {
"SENT" : 2
},
"runDuration" : "PT0.386S"
}
This is the content of "messageContent", stripped of the name space declaration.:
<SRR_S01>
<MSH.1>|</MSH.1>
<MSH.2>^~&</MSH.2>
<MSH.3>
<HD.1>CUP2000</HD.1>
</MSH.3>
<MSH.4>
<HD.1>CUP2000</HD.1>
</MSH.4>
<MSH.7>
<TS.1>202110271727</TS.1>
</MSH.7>
<MSH.9>
<MSG.1>SRR</MSG.1>
<MSG.2>S01</MSG.2>
<MSG.3>SRR_S01</MSG.3>
</MSH.9>
<MSH.10>65971446D96FC92E852D</MSH.10>
<MSH.11>
<PT.1>P</PT.1>
</MSH.11>
<MSH.12>
<VID.1>2.5</VID.1>
</MSH.12>
<MSH.13>1</MSH.13>
<MSA.1>AE</MSA.1>
<MSA.6>
<CE.1>KO</CE.1>
</MSA.6>
<ERR.3>
<CWE.1>207</CWE.1>
<CWE.2>Application internal error</CWE.2>
</ERR.3>
<ERR.4>E</ERR.4>
<ERR.5>
<CWE.1>APP.102</CWE.1>
<CWE.2>Errore durante il parsing del messaggio ricevuto</CWE.2>
</ERR.5>
<ERR.8>APP.102 - Errore durante il parsing del messaggio ricevuto</ERR.8>
</SRR_S01>
greetings,
Fabio
Beta Was this translation helpful? Give feedback.
All reactions