go to post Peter Pozerski · Dec 22, 2023 Have had a similar problem. Likely the issue is your FTP server needs to increase its timeout settings. You could try extending the FTP adapter and overriding the delete method as follows: Method delete(pFilename As %String, pFileDir As %String) As %Boolean{Set tSC=..setFilePath(pFileDir,.tOldDir) If $$$ISERR(tSC) { $$$LOGSTATUS(tSC) Quit 0 }Set tOK=$S(..%isSFTP:..FTP.DeleteSSH(pFilename),1:..FTP.Delete(pFilename)) if 'tOK { if ..Connected set tSC=..Disconnect(1)Set tSC=..Connect(..ConnectTimeout,1)Set tOK=$S(..%isSFTP:..FTP.DeleteSSH(pFilename),1:..FTP.Delete(pFilename)) }Do:'tOK ..disconnectOnNetErr(,1)If ..Connected { Set tSC=..restoreFilePath(tOldDir) If $$$ISERR(tSC) $$$LOGSTATUS(tSC) Quit 0 }Quit tOK} If tOK returns an error, you failed to delete. this change will disconnect from the server, reconnect and delete again. As the most likely issue is you are not connected this will work around your ftp server's timeout. The other option is to update your FTP server to have a larger timeout window.
go to post Peter Pozerski · Dec 22, 2023 Have had a similar problem. Likely the issue is your FTP server needs to increase its timeout settings. You could try extending the FTP adapter and overriding the delete method as follows: Method delete(pFilename As %String, pFileDir As %String) As %Boolean{Set tSC=..setFilePath(pFileDir,.tOldDir) If $$$ISERR(tSC) { $$$LOGSTATUS(tSC) Quit 0 }Set tOK=$S(..%isSFTP:..FTP.DeleteSSH(pFilename),1:..FTP.Delete(pFilename)) if 'tOK { if ..Connected set tSC=..Disconnect(1)Set tSC=..Connect(..ConnectTimeout,1)Set tOK=$S(..%isSFTP:..FTP.DeleteSSH(pFilename),1:..FTP.Delete(pFilename)) }Do:'tOK ..disconnectOnNetErr(,1)If ..Connected { Set tSC=..restoreFilePath(tOldDir) If $$$ISERR(tSC) $$$LOGSTATUS(tSC) Quit 0 }Quit tOK} If tOK returns an error, you failed to delete. this change will disconnect from the server, reconnect and delete again. As the most likely issue is you are not connected this will work around your ftp server's timeout. The other option is to update your FTP server to have a larger timeout window.
go to post Peter Pozerski · Jun 22, 2020 It looks like they are sending: " PID||5520005629|0102163||JINDAL^ASHOKI KR^^||19490901|M" and not: "PID||5520005629|0102163||JINDAL^ASHOKI KR^^||19490901|M" note the leading white space in the first entry
go to post Peter Pozerski · Jun 15, 2020 In the past I had to do something similar. I just used a code block to call a classmethod. The classmethod accepted the context variable by reference. All you would need to do is loop on the OBX segments and clone the message for each segment which meets your criteria. Then you would need to remove any extraneous segments. Once complete you would just need to add each message to an index you created in the context variable. That way you could loop, transform and send each message in the index in your BP using a foreach.
go to post Peter Pozerski · Jun 15, 2020 Given the error message I assume the message itself is corrupt. I would try pushing it through the business service test function. Paying close attention to the message to make sure none of the segments have any corruption.
go to post Peter Pozerski · Jun 11, 2020 Given the error message, ' PID', it appears your PID segment has a leading white space.
go to post Peter Pozerski · Nov 7, 2019 If you add the following to your generated classes they will ignore any new tags the vendor sends. Parameter XMLIGNOREINVALIDTAG =1;
go to post Peter Pozerski · Oct 1, 2019 Are you asking about something like this? From an Ensemble perspective this is returning something of type %GlobalCharacterStream. There is no wrapper class around the %GlobalCharacterStream. For the consumer of your web service this will appear as a string in the WSDL.Method SomeMethodName(FacilityID As %String) As %GlobalCharacterStream [ WebMethod ]{ // where the response of this method is an object of type %GlobalCharacterStreamquit ##class(SomeClassName).ReturnAStream(FacilityID)}