We are working on it...
- Log in to post comments
We are working on it...
Hello,
Can I see how to make the call?
I need to make a similar call and I can not find how to do it.
Thanks!
Hello, I restarted the instance and then compile the class producction. And now It's working.
Hi, I have the same problem. Could you solve it? If so, could you tell me how?
Hi,
You can do it as in any CSP page/class. With %request, which is object of class %CSP.Request
And headers available in property CgiEnvs, where every http header appear with a prefix HTTP_
try that better
set login = %request.GetCgiEnv("HTTP_LOGIN")Hi!
I think that this course is great for you.
https://learning.intersystems.com/course/view.php?id=83
You can also start reading this documentation
http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=EREST_operation
Thanks!!
Instead of using $LENGTH(pDni) '= 8 I can use $GET(pDni)?8N
Hi,
I tried to explain a bit that is the DNI updating the post.
Hello,
I have the same problem and I can't resolve this...
I try the solutions but it's not working.
If you have:
set json = "{""name"":""Sara""}"
You can get the data stored :
set dynObj = ##class(%DynamicObject).%FromJSON(json)
write dynObj.name
Hello,
i'm asking about positive number beacause when I try, for example:
<?xml version="1.0" encoding="UTF-8"?> <MsgFile Language="en"> <MsgDomain Domain="asd"> <Message Id="100" Name="ErrorNumber">Message about some error number</Message> <Message Id="b" Name="ErrorName2">Message about some error 2 %1 %2</Message> </MsgDomain> </MsgFile>
And then I use the terminal, but this doesn't work in the same way as letters or negative number..
>Write ##class(%MessageDictionary).Import("C:\--\CodigosError_20170628.xml")
1
>Set status=$System.Status.Error("100")
>Do $SYSTEM.OBJ.DisplayError(status)
ERROR #100: Código estado desconocido: 100 )Does it let you put positive numbers in the XML file ?
#dim list As %ListOfDataTypes
d ##class(%ZEN.Auxiliary.jsonProvider).%ConvertJSONToObject("[""a"",""b"",""c""]",,.list)
w list.Count(),!Ok!
I have been investigating...
I found a approximation that i want to do...
First of all, I want to iterate over JSON and capture de information
set a = "[{""Center"" : ""DKV"",""Nif"" :""00000001T"",""NumberCenter"" :""DKV_1"",""Name"" : ""Nombre_DKV""},{""Center"" : ""Vivisol"",""Nif"" : ""00000002T"",""NumberCenter"" : ""Vivisol_1"",""Name"" : ""Nombre_vivisol"",},{""Center"" : ""Stacks"",""Nif"" : ""00000003T"",""NumberCenter"" : ""Stacks_1"",""Name"" : ""Nombre_Stacks"",}]"
set JSON = ##class(%DynamicAbstractObject).%FromJSON(a)
set iter = JSON.%GetIterator()
while iter.%GetNext(.key,.value){write "Center = " _value.Center ,! }Second i want to put it in my object... still investigating more about this
I'm sorry I think that i'm not explain very good. I'll try to do better...
I create a Operation REST API , when I call to my client trough this REST API, my cliente returns list of object in JSON, like that:
[
{
"Center" : "aaaaaaaaaa",
"Nif" : "00000000T",
"NumberCenter" : "00000000",
"Name" : "ppppp",
},
{
"Center" : "aaaaaaaaaa",
"Nif" : "00000000T",
"NumberCenter" : "00000000",
"Name" : "ppppp",
},
{
"Center" : "aaaaaaaaaa",
"Nif" : "00000000T",
"NumberCenter" : "00000000",
"Name" : "ppppp",
}
]
On the other hand, I have in my Ensemble, Two class:
Class A --> lisf of class B
Class B --> Center, Nif,NumberCenter, Name
I need to iterate over JSON and capture de information a put this in my object A
Over Caché %Collection
I call a external REST API and this returns a list of object in JSON
Ok! I have just one more question ...
s ret = {}
s ret.IdClient.= "123"
How can i do something like that ?:
s ret.client.name = "peter"
When i try ... <INVALID OREF>
Hello,
Firstly, thank for your answer. I try this method, but my object isn't %DynamicAbstractObject, for this reason not found using %ToJSON() :-(
Cache for Windows (x86-64) 2016.2.1 (Build 803U)