go to post Eduard Lebedyuk · Jul 18, 2017 301 is "Moved permanently". Try setting Set aa.FollowRedirect = $$$YES
go to post Eduard Lebedyuk · Jul 18, 2017 You can use method generators: ClassMethod OnCompile() [ CodeMode = objectgenerator ] { do $system.OBJ.Compile("class") quit $$$OK } If method generator produces no code, then it would not be created, only ran at compile time.
go to post Eduard Lebedyuk · Jul 18, 2017 That would send request to the remote server using http. To use https, try adding: Set aa.Https = $$$YES Set aa.SSLConfiguration = "NameOfSSLConfiguration" You'll also need client SSL Configuration, here's documentation.
go to post Eduard Lebedyuk · Jul 18, 2017 set stream = aa.HttpResponse.Data while 'stream.AtEnd { write stream.Read($$$MaxStringLength) } Read argument is the number of charachers to read from the list. 32000 by default.
go to post Eduard Lebedyuk · Jul 17, 2017 Do you sign \r\n on Solaris? In your previous post you wrote that you need to sign:{Date}{newline}{Password}{newline}{etc}{Message Body}Maybe {newline} can only be \r\n? Also, compare (using hex compare tool) {Message Body} you sign and {Message Body} you actually send. It seems like in your case they should be identical (that is not always the case).
go to post Eduard Lebedyuk · Jul 17, 2017 To convert to Big Endian and Little Endian you can use $zcvt: >zzdump $zcvt("12","O","UnicodeBig") 0000: 00 31 00 32 .1.2 >zzdump $zcvt("12","O","UnicodeLittle") 0000: 31 00 32 00 1.2.
go to post Eduard Lebedyuk · Jul 17, 2017 It depends on the signing method. I'd try to sign a stream without new lines at all.Do you know if openssl uses the line-end to know up the where to sign and does it line by line, or does it include the line endings in the value that should be signed?openssl signs incoming byte stream, not a character stream, so there's no distinction.
go to post Eduard Lebedyuk · Jul 17, 2017 You need to restart Caché after making and saving the changes.
go to post Eduard Lebedyuk · Jul 16, 2017 It depends on a queries you want to run. For example you want to get all parents' ids which have a child with a specific property value. In a child class you can index for one or several properties, and execute this query: SELECT parentId FROM child WHERE propertyA = 'value' Documentation on indexes. Or you can define a computed property in your parent class and index that.
go to post Eduard Lebedyuk · Jul 14, 2017 I thought you needed an alphabetical consumption. What order do you need?You can get one of these fairly easy:Name - the name of the file (the default)Type - file typeDateCreated - the date the file was createdDateModified - the date the file was last modifiedSize - the file size
go to post Eduard Lebedyuk · Jul 14, 2017 Pool size = 1 should be enough.Call stack:EnsLib.File.InboundAdapter class, OnInit methodEnsLib.File.Common class, DeepList queryEnsLib.File.Common class, FileList query%File class, FileSet query (without providing sortby argument)FileSet query then sorts by filename in lowercase (with added whitespace in the beginning).
go to post Eduard Lebedyuk · Jul 14, 2017 Code should be stored in source control and there should be some sort of installer that does all required steps to get an application running.That said, ^%qCacheMsg is stored in CACHELIB, which is Read-Only by default. <PROTECT> means either read or write error, so you need to add roles to your current user and/or make CACHELIB writable temporaly.
go to post Eduard Lebedyuk · Jul 14, 2017 Thank you.I thought about using prepare, but I'm searching for solutions without it."ON AXIS" should work
go to post Eduard Lebedyuk · Jul 14, 2017 Object serialized to $lb does not contain metainformation about properties, etc.You can write a method generator that would iterate over storage schema and generate a method that gets id of object as an input, retrieves $lb value and outputs it as JSON.
go to post Eduard Lebedyuk · Jul 14, 2017 Stop CachéStart Caché in emergency access modeActivate UnknownUser in SMP or terminal (do ^SECURITY)Stop CachéStart Caché as usual
go to post Eduard Lebedyuk · Jul 14, 2017 When you define a query: Query MyQuery() As %Query { QUERY TEXT } Or Query MyQuery() As %SQLQuery { QUERY TEXT } That means that this query implements an interface provided by %Library.Query or %Library.SQLQuery respectively. They define method generators for Fetch/Execute/Func methods (more on them). Each method of the interface class gets called during compilation You can subclass %Library.Query or %Library.SQLQuery to define your own methods. Here's custom query interface that does 2 things: Changes ROWSPEC to Id123:%String It can be seen in class definition after compilation<QueryName>GetInfo and <QueryName>GetODBCInfo methods also reflect new ROWSPEC properlyGenerates <QueryName>GetText method that returns query text Class Utils.MyQuery Extends %SQLQuery { /// This method would be ran before others and changes ROWSPEC to "Id123:%String" ClassMethod %ChangeRowspec() [ CodeMode = objectgenerator, ServerOnly = 1 ] { // quit if we're not compiling a query if %mode="method" quit $$$OK set class = %class.Name set query = %compiledmethod.parent.Name set rowspec = "Id123:%String" // Modify query definition $$$defSubMemberSet(class,$$$cCLASSquery,query,$$$cQUERYparameter,"ROWSPEC",rowspec) // Modify compiled query definition $$$comSubMemberSet(class,$$$cCLASSquery,query,$$$cQUERYparameter,"ROWSPEC",rowspec) // Update compile-time parameter value set %parameter("ROWSPEC") = rowspec // Update class definition do UpdClsDef^%occLibrary(class) quit $$$OK } /// GetText is a method that is used to get query text as a %String ClassMethod GetText() As %String [ CodeMode = objectgenerator, ServerOnly = 1 ] { if %mode="method" quit $$$OK $$$comMemberKeyGetLvar(query,%classname,$$$cCLASSquery,%property,$$$cQUERYsqlquery) do %code.WriteLine(" quit " _ $$$quote(query)) quit $$$OK } } And here's a test class with our new query: Class Utils.MyQueryTest { Query ABC() As Utils.MyQuery { SELECT 1 } } After Utils.MyQueryTest is compiled it looks like this: Class Utils.MyQueryTest { Query ABC() As Utils.MyQuery(ROWSPEC = "Id123:%String") { SELECT 1 } } You can modify this interface to get any behavior you want. Code is available on GitHub.
go to post Eduard Lebedyuk · Jul 12, 2017 What about it?It says that class methods can be jobbed as ..Method() instead of ##class(Package.Class).Method(), if we're in a class context.
go to post Eduard Lebedyuk · Jul 12, 2017 Please consider clarifying your question.InterSystems Caché is a database, so adding 200 fields is fairly straightforward.InterSystems Ensemble is a ESB. It has Business Hosts (Business services, Business processes, Business operations). They manipulate data stored in Caché database based on arbitrary rules.
go to post Eduard Lebedyuk · Jul 12, 2017 Only class methods can be used for jobs, otherwise where does the object belong - to a parent or child process?
go to post Eduard Lebedyuk · Jul 12, 2017 Func is documented in release notes, and in a queries interface class. But I do agree that it's fairly difficult to find without prior knowledge of it (I searched for Func keyword).