go to post Michael Lundberg · Sep 10 Thanks Eduard! I was just looking at something similar. I will try it out /Michael
go to post Michael Lundberg · Sep 9 After further research, it does not seem possible to use object script to write directly to the Windows event log without using a bridge such as PowerShell or similar
go to post Michael Lundberg · Apr 17 Thanks Manel It worked great. Admittedly, I got the surrounding text out when I actually wanted the XML out. But by your example I was able to turn it around and get the XML out. Working string: XMLstr set xmlheadstart=$f(XMLstr,"<?xml ")-6set xmlheadend=$f(XMLstr,">",xmlheadstart)-1set firsttag=$tr($p($e(XMLstr,xmlheadend+1,*),">",1)_">",$c(13,10))set tag=$p($e($p(firsttag," ",1),2,*),">",1)set xmlend=$f(XMLstr,"</"_tag_">")set NewXMLstr = $EXTRACT(XMLstr,xmlheadstart,xmlend-1) Quit NewXMLstr The NewXMLstr variable now contains the entire XML fragment. Many thanks! Regards Michael
go to post Michael Lundberg · Apr 16 HelloYes probably. For the text that is before the XML block. The problem is that it is also text after the end tag. And the end tag can have different names.
go to post Michael Lundberg · Apr 16 Hello and thanks for your answers. However, it is not possible to parse the stream to %XML.TextReader as it is without the status reporting error. This is due to the fact that it is not a pure XML but rubbish from other content. I probably have to sit and extract the XML content manually as Julius describes. Thought I could get away with it :0)
go to post Michael Lundberg · Jul 10, 2023 Hi Victoria and thank you for taking the time to reply. I do something similar today and it gives an empty tag anyway. The condition is that if a certain tag has no children, none of that tag should be presented- Example: <Parent> ....... ....... <Child> ... </Child><Parent> Above XML is to be presented. <Parent> .........</Parent Above XML should NOT be presented. I try in the transformation:If source.Parent.(k1).Child.(1)="" <False> Do the map</False> I first expected a null exception if the Child tag didn't exist but HC seems to be able to handle that. I also tried changing the condition to your suggestion: If ..Length(source.Parent.(k1).Child.(1)>1) <True> .......</True> But it gave the same result unfortunately. Sincerely, Michael
go to post Michael Lundberg · Jul 7, 2023 Hello again Previous experience that I have (with health connect), underlying tags can be mandatory to a tag that is optional. So only if the parent-tag is included, the children that are mandatory must be included. I tried with:<xs:element name="Analysis" maxOccurs="unbounded" minOccurs="0">and it could pass the transformation but still had no effect. Right now I remove the tag afterwards using objectscript. It does work, but is still a more cumbersome way to solve it. It would be best if it could be removed already in the transformation. Sincerely, Michael
go to post Michael Lundberg · Jul 6, 2023 Hello and thank you for taking the time to reply.Yes, I have imported the XSD file into the namespace and it is mandatory as you ask (see image).In the XSD file itself it is stated:<xs:element name="Analysis" maxOccurs="unbounded">. I tried changing to:<xs:element name="Analysis" minOccurs="0"/>but it gave error in the transformation.
go to post Michael Lundberg · Aug 15, 2022 Hey! You are absolutely right! I was also starting to think it was the html presentation. But I initially thought it would be like wysiwyg in the SQL window of the portal. Thank you so much and you explained the "conundrum" for me :O) Regards, Michael
go to post Michael Lundberg · Aug 15, 2022 Thanks for reply. This was tricky. Maybe I'm being visually deceived. The text I am trying to enter is 24 characters long. If I take the selected value after and paste it into notepad, it shows the length 21. But your suggestion to try SQL select length on that column/value shows the value 23 /Michael
go to post Michael Lundberg · Apr 27, 2022 Hello and many thanks for the help! It worked. I think I read your answer a little too fast the first time and thought you meant that I should read the stream FROM the linked file instead of TO. Thanks again! I should have seen or tested binary data myself, I think :0(. Regards Michael
go to post Michael Lundberg · Apr 27, 2022 Thanks Jeffrey for your answer! I looked at a solution earlier with "LinkToFile" but since I do not know where the file is physically located I abandoned that idea. We are connected to a POP account against an MS Exchange server and I do not even know if it is possible to access the file physically. But we will take a closer look at that possibility. Otherwise it seems like we must use %Net.POP3. I otherwise thought that there were advantages to using EnsLib.EMail.InboundAdapter as it has several functions automatically such as scanning for and deleting mail etc. Regards Michael
go to post Michael Lundberg · Mar 15, 2022 ***Solved*** s theResponse = ##class(%ListOfObjects).%New()s SQLQuery = "{call TheProcedure }"s tSC = ..Adapter.ExecuteProcedure(.theResponse , ,SQLQuery) s tSnapshot = theResponse.GetAt(1)
go to post Michael Lundberg · Mar 15, 2022 Hi and thanks for your reply! Since this is not a stored procedure in Iris database but in an MS SQL server, syntax does not work"SELECT PackageName.ClassName_ProcedureName ('parameter')" Normal call is Execute procedure name. For example, when I call a procedure that does not use an output parameter, I use"..Adapter.ExecuteQuery (.tResult, tQuery) Quit: $$$ ISERR (tStatus)" However, because this procedure fills an output parameter, this call does not work. It then returns "Error! Function must return a value". So i suppose i need to use ExecuteProcedure Sincerely, Michael
go to post Michael Lundberg · Sep 4, 2021 Hello again! Thanks for your answers and it was our service provider who turned out to have problems, just like you thought. They have corrected (but still have some problems) and it works pretty well now Regards Michael
go to post Michael Lundberg · Sep 1, 2021 Hello and thank you very much for your answer! That/this was/is the response in SOAP log (I just deleted Style/css info): **************************************************** Input to Web client with SOAP action = urn: submitFile ERROR # 6243: HTTP request to SOAP WebService returned response with unexpected CONTENT-TYPE: text / html; charset = utf-8. Input to Web client with SOAP action = urn: submitFile ERROR # 6243: HTTP request to SOAP WebService returned response with unexpected CONTENT-TYPE: text / html; charset = utf-8. HTTP Status 500 - Internal Server Error. The server encountered an unexpected condition that prevented it from fulfilling the request. javax.servlet.ServletException: An error occurred see.fohm.sminet.util.CheckFilter.doFilter (CheckFilter.java:38) org.apache.catalina.filters.ExpiresFilter.doFilter (ExpiresFilter.java:1232). Apache Tomcat / 8.5.39 (Ubuntu) End. ************************************************ We run in windows, not Ubuntu so it must come from their service Regards Michael
go to post Michael Lundberg · Mar 31, 2021 Thanks for your reply! It can be very helpful and we will try your suggestion and hope we can get something done. Regards Michael
go to post Michael Lundberg · Mar 29, 2021 Hi and thanks for your reply. It is not possible to queue up the requests from the external systems themselves, but they will be sent to our HC- integration regardless of how many we already have in our queue. The answer (response) may take a maximum of 15 seconds, otherwise the response must be saved in the database and delivered at a later request. The problem is knowing how long a message has waited (in a queue) before it is sent to the business process, if the queue exceeds what our business service can process at the time. Our allowed time to process the request will then be 15 seconds minus the waiting time in the queue. I hope I am clear enough with what I mean. Regards Michael
go to post Michael Lundberg · Apr 24, 2020 Hello I don't think so. This is a proxy-class of type %SerialObject which I populate and embed in to the request class /Michael