Kurro Lopez · Mar 3, 2017 go to post

Solved...

I'm very sorry for this question, the answer was in my face and I didn't see it.

The plus sign is a special character in URL, so it should be replaced with "%2b" to escape the character.

I'm ashamed to think that this problem was too simple

I should call

http://localhost:57772/MyApp/login?login=flopez@salutic.es&password=7d%2brcUBPWF0wtMs4PHiluA==&app=MYAPP

Best regards,

Francisco

Kurro Lopez · Mar 3, 2017 go to post

In addiction to that answer, don't forget to set the Application Role to %All (or other role that you need), or it always returns a "Forbidden" error.

Best regards,

Francisco

Kurro Lopez · Jan 30, 2017 go to post

mmm... I see

The name of the variable is under double quote, and I'm calling the variable directly. Let me check in my solution.

USER>set obj = ##class(%DynamicObject).%FromJSON("{""A_B"":""HELLO WORLD""}")
USER>w obj.A_B
W obj.A_B
^
<UNDEFINED> *B
USER>w obj."A_B"
HELLO WORLD

Kurro Lopez · Jan 30, 2017 go to post

Thanks Eduard, my JSon has this underscore as part of the name of variable but is not supported (or it seems). With my workaround it works

Kurro Lopez · Jan 27, 2017 go to post

Hi all,

I've found the "ghost in the code". The problem was the JSon structure has some fields with "_" as part of the name of the property. When it tries to convert JSon to a class, this kind of name is not good for ensemble.

How have I solved? easy... replacing the content and remove all "_" (I'm sure that there is not values with "_")

    set content = tHttpResponse.Data.Read()
    $$$TRACE(content)
    $$$TRACE($LENGTH(content))
    
    set content = $REPLACE(content,"_","") // Remove all _ as part of the field name
    
    set objJson = ##class(%DynamicObject).%FromJSON(content)

    set b64 = objJson.Result.RES.DATA.DATAB64   // Instead of DATA_B64

Take care with this problem if you are developing Api and Cache wink

Best regards

Kurro Lopez · Jan 9, 2017 go to post

Thanks for the answer, it was configured to -1, I've updated this value and this error doesn't appears anymore

Kurro Lopez · Dec 20, 2016 go to post

My cache version is:

Cache for Windows (x86-64) 2016.2.1 (Build 803U) Wed Oct 26 2016 12:31:28 EDT [HealthShare Modules:Core:15.01.171 + Linkage Engine:15.0.171]