Please will correct the code:
a is a perse Unicode to Unicode mapping value.Str=other status. It is how to convert English to french .
abcd
sInterSystems Caché is a multi-model DBMS and application server. See more details here.
Please will correct the code:
a is a perse Unicode to Unicode mapping value.Str=other status. It is how to convert English to french .
abcd
sI am sending an HTTP request to cache class:
s rObj=##class(%Net.HttpRequest).%New()s rObj.Server="www.xyz.com"s rObj.Https=1s rObj.SSLConfiguration="xyz"s rObj.ContentType="application/json"d rObj.EntityBody.Write("payload in json format")s sc=rObj.Post("/csp/ns/xyz.cls")The request gets to the OnPreHTTP class method
Class xyz Extends %CSP.Page [ ProcedureBlock ]
{
ClassMethod OnPreHTTP() As %Boolean
{
q 1
}
}The question is how to retrieve the request payload in the OnPreHTTP method.
I am trying to write some code that takes in a string and does a serverside transformation of it to find embedded URLs and replace it with clickable links. I found the following regex for Javascript which is rated highly on StackOverflow;
replacePattern1 = /(\b(https?|ftp):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gim;
replacedText = inputText.replace(replacePattern1, '<a href="$1" target="_blank">$1</a>');And I tried to do the following in Caché ObjectScript but it's not working:
set matcher=##class(%Regex.Matcher).%New("/(\b(https?|ftp):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A
I use Cache Instance. I'm trying to implement OAuth 2.0 in Cache instance.
Is it possible to use Cache instance as Client and Server?
And What is the Difference between CLIENT and AUTHSERVER instance?
Why is it used? I want to know which instance use which type of application?
Has anyone ever worked with a load balance for ECP servers access? If yes, wich one?
What are the pros and cons of such a solution? We use ECP servers as data servers via ODBC, thanks!
I created the sample rest services in Cache, I also set output in JSON format.
Can anyone explain how to pass JSON in Rest Services using POSTMAN?
Thanks.
Hi all,
I've created a WebApi and I've deployed in our development environment. So we test calling http://localhost:57772/Client/login and it works.
Now, I wondering how to change the port to call in pre production environment.
I've changed the port in the business service object, but it is ignored.
Other workaround is change the WebServerPort in System > Configuration > Startup Setting but it changes for all environment (connect to managment portal, etc..)
Is there any way to change the port of the WebApi to redirect to 80 (for example) u other one?
Best regards,
Francisco
I created a simple CRUD operation using Rest Services in Cache.
Class EX.example Extends %CSP.REST{XData UrlMap{<Routes><Route Url="/insert/:loc/:ssn/:name" Method="GET" Call="hello"/><Route Url="/update/:key/:loc/:ssn/:name" Method="GET" Call="iam"/><Route Url="/delete/:key" Method="GET" Call="there"/><Route Url="/findid/:key" Method="GET" Call="now"/></Routes>}ClassMethod hello(name As %String, ssn As %String, loc As %String) As %Status{s mName=$zcvt(name,"U"),mKey=ssn,mLoc=locs ns=$namespaceznspace "USER"try{s obj=##class(Sample.Classes).%New()s obj.nHi all,
I have the following problem with a WebApi that I've developed in EBS.
I have a GET method that reads the parameters and puts into a message to process.
Class MyApp.BS.ServiceRestBase Extends (%CSP.REST, Ens.BusinessService)
XData UrlMap [ XMLNamespace = "http://www.intersystems.com/urlmap" ]
{
<Routes>
<Route Url="/login" Method="GET" Call="Login"/>
</Routes>
}
/// Login
ClassMethod Login() As %Status
{
// Get the parameters
set login = %request.Get("login")
set password = %request.Get("password")
set app = %request.Get("app")
....
}
The password is a value in Base64, if I call the WebApi with the
I'm trying to implement Crud operation in rest services.
I'm confused about this implementation.
Is it possible to call rest services method in CSP pages?
If not means, can you tell me another way?
I need some examples or reference to implement Crud operations.
Thanks
Hi, I tried the new rest file in User namespace. But I couldn't run it.
Here the Code:
Class com.Testing Extends %CSP.REST{XData UrlMap{<Routes><Route Url="/insert" Method="POST" Call="one"/><Route Url="/print" Method="POST" Call="two"/><Route Url="/update" Method="POST" Call="three"/></Routes>}ClassMethod one(){Write "This is 1st Method!!"Quit}ClassMethod two(){Write !,"This is 2nd method"Quit}ClassMethod three(){Write !,"This is 3rd Method"Quit}}I tried it in the below link:
http://localhost:57772/csp/user/testing/insert
Can anyone
As more people join Developer Community, and with increasing efforts to promote code sharing, I'd like to draw fresh attention to this post I wrote a year ago. It spotlights a feature within the class compiler which is both useful and dangerous. When importing code (e.g. from an XML export of classes received from someone), it's worth considering the risks.
Even if that post doesn't seem relevant to you at the moment you may wish to note it for the future. A handy way of doing this is to click the star icon at the end of it.
This is the code here:

I got error in form tag declaring
Can anyone help me to resolve this error!!
Any recommendations, to this VMware disk type debate, with Cache installations in particular?
Thick Provision Lazy Zeroed
Thick Provision Eager Zeroed
Thin Provision
Hi!
Consider I have a class Package.Data with Property UniqueStringValue as %String.
I introduced the Index for this property:
Index ValueIndex on UniqueStringValue [Unique];
It works well. But if I try to check if there is an object with the certain value in code like this:
if ##class(Package.Data).ValueIndexExists(value)
this expression fails, if value="value", even if there is an instance with instance.UniqueStingValue="Value"
How can I set the index to prevent saving case sensitive values in this class?
The recent announcement of a collision for the SHA-1 hash algorithm has caused some consternation:
Here is some background to help put this in perspective.
Cryptographic hash functions can have a variety of properties. The property at issue here is:
"Collision resistance - it is computationally infeasible to find any two distinct inputs x, x' which hash to the same output, i.e., such that h(x) = h(x')."
(Menezes, van Oorchot, and Vanstone, "Handbook of Applied Cryptography", section 9.2.2)
What properties are required depends on the application for which the hash function is
Hi everyone, I have and Zen Mojo application, it's all working but I have some doubts about what is recommended to use: There is some reports of employees, for example, and actually I'm using some plugins : "Excelent export" to generate Excel reports and "jspdf" to generate PDF reports in client side.
I have an REST service, that receives the request, process and returns JSON, after client side receive the response it's processed.
- This can be slow/bad in applications with large data?
- It's better/recommended to use ZenReports even with ZenMojo applications?
- Or Zen Mojo, like any other
While I can see the benefits that $ZSTORAGE could have if used properly, I have not seen it used in the environments I have worked in. I was wondering if there are any developers that promote its usage.
If used properly, I would imagine it could be highly effective in maximizing free memory since some processes will never go over X amount, while others may very well need much more.
I'm new to learn Rest Services in Cache.
I have REST.DocServer class file in local system. When I tried to run this file I have the error as HTTP ERROR 403.
Can anyone help me to run this sample Rest Services program?
Thanks in Advance.
If you had to choose Angular 1 or 2 for a new web project using Caché/Ensemble as a backend, Which one would you choose?
I'm trying to figure this out with a short pros/cons list:
Hi!
I'm trying to implement %OnAfterDelete ClassMethod for persistent class. As a parameter it gets oid As %ObjectIdentity for the deleted object.
ClassMethod %OnAfterDelete(oid As %ObjectIdentity) As %Status
My question is: how to get ID value from %ObjectIdentity ?
I am pleased to announce that Caché and Ensemble 2017.1 Release Candidate versions are now available for all platforms.
We appreciate the many customers who have downloaded, tried it, and given us feedback over the past few months.
Some things not in the original field test that you may want to check out include:
There have been over 300 additions and corrections since the beginning of Field Test.
Hi,
I am trying the following command in order to freeze the instance before backup is done:
csession CACHE -U%SYS "##Class(Backup.General).ExternalFreeze()"
The command requires user name and password to be supplied when prompted. Is there any way that this command can be run where it doesn't query the credentials? I am wondering if it can use OS level permissions (root or effective user who owns Cache processes etc) .
My test is on a CentOS 6 machine if that helps.
Thanks,
Raghu
Please Give a simple program for how to export data to Xls format in Cache Objects.
Hopefully this is a simple questions to respond to. Can you do Delegated Authentication for SOAP web service calls. I ask as I am not seeing this work as expected. I have this authentication turned on and enabled in for he CSP Web Application yet I keep getting a "Security Token could not be Authenticated. And a global I was setting to capture some of the available data is not being loaded.
I use the HS_IHE_ATNA_Repository.Aggregation table a lot. Someone just referred me to the HS_IHE_ATNA_Repository.Document table, which has an AggregationId column.
I assume that column references the ID column in the .Aggregation table. If so, does this mean that if the same document was requested 1,000 times that there will be 1,000 entries for it in the .Document table? This seems inefficient to me. Why not have one record in the document table and have a DocumentId column in the Aggregation table?
Hi,
First of all, do Cache instance and databases have UUIDs? If so, is there a simple way to obtain these from command line?
Thanks,
Raghu
I have a property, Emails, that needs to contain a list of comma-delimited values, or "". Is there a benefit to making this property a list of %String, a Collection[list] (or however you do it), an array, or anything other than a simple %String type?
I just need to store some values, and return these values in SQL -- so it needs to be SQL compatible. I don't need to index the values or use individual values in the SQL statement (e.g. Select * from table where emails [ "email@co.com" -- I don't need to do this, although maybe this would work anyway if it's of type %String).
What's the
Hi, is possible rewind results of %SQL.StatementResult?
I not find a solution.
Amongst the large fonts and chunky icons of Portal's pages, the Menu button in the top left corner is easily overlooked:

When clicked, it often produces the following menu:

When I remember it's there, I find the "View Console Log" option particularly handy.
I wrote "often" above because I've also noticed that the Menu contents change when I'm on a page within the Ensemble section of Portal:

Maybe the contents are context-sensitive elsewhere too and I just haven't noticed yet.