Tomas Vaverka · May 3, 2018 go to post

Please, could you also post values of given variables pstrNamespacepstrGlobalNamepstrOutputPath? What OS/Caché version it is?
Try to also use "d" parameter instead of "-d" and check the status returned by method:

  Set sc = ##class(%Library.Global).Export(pstrNamespace, pstrGlobalName, pstrOutputPath,,,"-d")
  Do $system.OBJ.DIsplayError(sc)

It should return more information about the error.

Generally it tries to use device (file?) which was not opened, given line in version 2017.2.1 is:
    Xecute code Quit:'$t 0 Use dev Quit 1

Tomas Vaverka · Apr 30, 2018 go to post

Is it your own Zen page? If yes, could you post the code here? The text comes from the page itself so I would like to see where the text comes from, what component is used etc.

Tomas Vaverka · Apr 24, 2018 go to post

What is a definition of oracle table, what format is EFFECTIVE_START_DATE?

I understand that on Caché side it was generated as %Date but you changed it to %String? It then worked in SMP and not in Terminal?

And if you changed it back to %Date, it doesn't work in SMP?

Tomas Vaverka · Apr 4, 2018 go to post

Hi,

This message in cconsole.log is a warning that you have enabled Caché SOAP log (^ISCSOAP global) in given namespace. It can generate a lot of data and create a big file, therefore there is a danger it can fill-up your disk. 

Caché SOAP log shouldn't be enabled for long time, its meaning is only for debugging purposes - e.g. investigation of some SOAP issue.

More about ISCSOAP log can be found in Caché Documentation
http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=GSOAP_debug_info_soap_log

Tomas Vaverka · Apr 3, 2018 go to post

The collation 20 is Portuguese2.

USER>zn "%SYS"
%SYS>Do ^COLLATE
Status       Number   Abbrev   Name
----------   ------   ------   ----------------------
Built-in        0     OANS     ISM Pre-6.2
Built-in        1     ANSI     ISM 6.2->6.4
Built-in        2     COBR     Ipsum/Cobra
Built-in        3     DTMC     DTM-compatible
Built-in        4     CBR2     Ipsum/Cobra-2
Built-in        5     UNIC     Cache standard
Not loaded     10     GER1     German1
Not loaded     11     POR1     Portuguese1
Not loaded     12     POL1     Polish1
Not loaded     13     GER2     German2
Not loaded     14     SPA1     Spanish1
Not loaded     15     DAN1     Danish1
Not loaded     16     CYR1     Cyrillic1
Not loaded     17     GRE1     Greek1
Available      18     CZE1     Czech1
Available      19     CZE2     Czech2
Not loaded     20     POR2     Portuguese2

To be able to mount database with such collation, you need to install Portuguese NLS locale to Caché (Management Portal > System Administration > Configuration > National Language Settings >  Locale Definitions). 

If you need further help, please contact InterSystems Worldwide Response Center (WRC).

Tomas Vaverka · Mar 26, 2018 go to post

The issue is that following method:

##class(%ZEN.Auxiliary.jsonProvider).%ObjectToJSON(soapresponse,.result,,"s")

doesn't set variable result, but only writes out the contents of object instance soapresponse  to the current device using JSON notation, as you can find in %ZEN.Auxiliary.jsonProvider class documentation.

To output the content in JSON format I would recommend to use %DynamicObject and its %ToJSON() method:

/// return json
Method infoJson() As %String [ WebMethod ]
{
    set soapresponse=##class(%DynamicObject).%New()
    set soapresponse.CustomerID="1"
    set soapresponse.Name="2"
    set soapresponse.Street="3"
    set soapresponse.City="4"
    set soapresponse.State="5"
    set soapresponse.Zip="6"
    resultinfo=soapresponse.%ToJSON()
    resultinfo
}

It should help to retrieve JSON string.

Tomas Vaverka · Mar 20, 2018 go to post

For pre-flight request (OPTIONS):

The problem is caused by the way how the OPTIONS request is handled. According to documentation, OPTIONS request doesn't need the authorization even if the CSP application requires it. But the CSP process still needs to access given REST class to get response for OPTIONS request. The problem is that given process is run under the user which logs from CSP Gateway to Caché - this is set in CSP Gateway Management page > Server Access.

If given user doesn't have right to access given namespace/database, it gets the <PROTECT> error on server and the CSP sends back the HTTP 404 error.

The solution is to add role to given CSP Gateway user with minimum READ access to corresponding database.

Tomas Vaverka · Mar 7, 2018 go to post

Yes, it is true. InterSystems IRIS is a new product and therefore $ZVERSION string is using IRIS word instead of Caché.

Tomas Vaverka · Feb 19, 2018 go to post

Robert Cemper is right, the call to %DrawItem (and subsequently to OnDrawItem) was removed from the code - the most probably by mistake. It was done by change FKH002 - multiple column handling for dataListBox, which was released with version 2012.2.0, therefore last version where it was working was 2011.1.5.

I have entered development request to fix it.

Tomas Vaverka · Jan 23, 2018 go to post

To access Caché Session (Terminal) without password, you should make two steps:

1. Check if the UnknownUser has got appropriate roles (e.g. %All) in System Administration | Security | Users. As a minimum it should have role with %Development resource and resource for given database (e.g. %DB_USER for access  to USER namespace).

2. Un-check Password and allow Unauthenticated access for service %Service_Terminal in System Administration | Security | Services. This is for linux/Unix systems. For Windows you should enable Unauthenticated access for %Service_Console and %Service_Telnet.

Tomas Vaverka · Jan 16, 2018 go to post

This is not related to global block size but to maximum string length. You could enable Long Strings in Management Portal > System Administration ? Configuration > System Configuration > Memory and Startup. The traditional maximum string length is 32,767 characters. For Long Strings the maximum string length is 3,641,144 characters.

Tomas Vaverka · Nov 21, 2017 go to post

You are right that if you access frameset page from another CSP page, all frames should use the same session.

5916 Illegal CSP Request error happens if you access encrypted or private CSP page with incorrect session token. I guess if it can be because of some cached pages in the browser. Do you use cookies to identify the session? And what happens if you make a forced refresh of the frameset page (CTRL-F5), does it  load correctly then?

Tomas Vaverka · Jun 13, 2017 go to post

Populate method for Sample.Employee:Company doesn't create a new Company, it just creates a relationships/reference to existing Sample.Company object.

Thus you need to start to populate first Sample.Company and then Sample.Employee.

Tomas Vaverka · Jun 1, 2017 go to post

MAC routines and classes can contain macros - $$$, embedded SQL - &sql() and &html<> and &js<> scripts. It is then compiled into the INT routine, where above constructs are generated into the final code (which is then compiled into pcode - OBJ). 

Tomas Vaverka · May 17, 2017 go to post

Have you tried to compile %SOAP.WebClient class in Studio? This is how this message can happen, because you don't have write access for CACHELIB database by default. 
 

Tomas Vaverka · Apr 18, 2017 go to post

I think you should also consider other factor - performance. If we implemented all kinds of these checks/warnings, it would slow down the compiler, which is not the way we would like to go.

Tomas Vaverka · Mar 29, 2017 go to post

What I understand is that you have webservice in Caché and want to create a SOAP Client in PHP, correct? I am not expert on PHP (you should better contact PHP community) so I cannot comment on your PHP code.

Anyway - what problems have you experienced? Is there any error running given code? 

Tomas Vaverka · Mar 2, 2017 go to post

Yes, this is the syntax error in the code.

Anyway, question is still what is a purpose of such page?  If you require such functionality, wouldn't be better to use standard CSP page?

Tomas Vaverka · Feb 14, 2017 go to post

Please, are you able to log into Caché Terminal?

The best start to debug such kind of problems is to enable Security Audit (if not already enabled) and Login, LoginFailure and Protect system events using ^SECURITY routine (option 6 - Auditing setup) in %SYS namespace:

USER>ZN "%SYS"
%SYS>Do ^SECURITY

Then reproduce the error and view the Audit, check for the latest records - you should see LoginFailure or Protect events there. Check details of given record, it should tell you more about the problem.

Tomas Vaverka · Feb 9, 2017 go to post

The best start to debug such kind of problems is to enable Security Audit (if not already enabled) and Login, LoginFailure and Protect system events using ^SECURITY routine (option 6 - Auditing setup).

Then reproduce the error and view the Audit, check for the latest records - you should see LoginFailure or Protect events there. Check details of given record, it tells you more about the problem.

In your case it was LoginFailure event with error message:  User UnknownUser account is disabled.

Tomas Vaverka · Nov 24, 2016 go to post

The files looks same if you open it e.g. in Windows Notepad. This is because Notepad recognize the file as UTF-8 even if the BOM is missing but file contains some Unicode characters (>255). If you write pure ASCII ("Hello"), it will be open as ANSI file.

But if you open it in any hexadecimal editor you would see the second file is missing BOM.

EDIT: I found it sets the BOM property only if you set it AFTER setting of translation table:

 Set stream=##class(%Stream.FileCharacter).%New()
 Set sc=stream.LinkToFile("c:\temp\UTF8ExampleWithBom.txt")
 Set stream.TranslateTable="UTF8"
 Set stream.BOM=$C(239,187,191)
 Do stream.Write("Hello")
 w stream.%Save()

This is because setting of TranslateTable reset BOM to empty string again.

Tomas Vaverka · Nov 24, 2016 go to post

Setting of TranslateTable to UTF8 just makes a translation of characters to utf-8, it doesn't set BOM. So you need to set both.

Tomas Vaverka · Nov 10, 2016 go to post

AFAIK there is not any default timeout on Caché WebSocket implementation in the Caché server or CSP gateway. It  just open a persistent connection between CSP Gateway and Caché server (if SharedConnection=0) to allow to exchange messages.

If the connection is closed for some reason, I would start to look at some intermediates - like firewall, proxy or any other tool which could close the connection. 

Or maybe your websocket implementation does it?

Tomas Vaverka · Nov 10, 2016 go to post

Caché ODBC driver should recognize the client charset (if correctly sent by client) and use corresponding translation table.

To investigate your issue it would need more details, e.g. produce the ODBC log to see what data is sent by client and server. I would recommend to log it to WRC.