Question George Hodder · Feb 19, 2021

Hi,

I am wanting to get the results of SYS.Database class's List query into a result set.

I have code that does it, but I get a cursor error at the end.... should I just to a try/catch and ignore this error below?  Or can I call this in a different way to avoid the error?  
My code, in the %SYS namespace
Set Statement=##class(%SQL.Statement).%New()
Set status=Statement.%PrepareClassQuery("SYS.Database","List")

2
0 392
Question George Hodder · Feb 16, 2018

I am trying to use the automated unittest class for a %CSP.Rest service.

So my Unittest code set's %request and %response from %CSP.Req/resp respectively

I build a tProxy with the fields I need for the post and set it %ToJson... I have tried seting %request.Content = tProxy (and not)

I call the method for the post url directly... 

  When that method calls %fromJson to set an object with the info. I passed... 

      - when I don't set %request.content.. I get a error '5035 - premature end of data code 12'

7
2 1264
Question George Hodder · Feb 2, 2018

Hi.. I have an issue where we are using OAuth2.0 with the ZAUTHENTICATE routine.  Once our token is validated we are using a users lan id (passed on the ID token) to find a software defined username in a Cache Global.

That is all working fine in ZAUTHENTICATE.. I am setting the software defined username in the Properties("Comment") array and wanting to reference it in the Rest Service Dispatch class.

6
0 935
Question George Hodder · Jul 17, 2017

Hi,

I am new to coding web services and trying to connect to an API that returns its format in xml or json.

I have a class as follows.. when I run I get back a 6059 in my status - Unable to open TCP/IP socket to server

Can someone help me identify what I am missing?  Thanks

12
0 3320