Hello Ruslan, 

You are correct, DisplayToLogical() is not called automatically when saving an object. When you are manipulating an object using ObjectScript, the assumption is that the value you are dealing with is already a logical value. If you need to convert from a display value, you can do so explicitly. For instance, if you have a the following class:

Class Test.MyClass Extends %Persistent
Property MyDate As %Date;

You can convert from display to internal using either of the following:

set myobj = ##class(Test.MyClass).%New()
set myobj.MyDate = ##class(%Date).DisplayToLogical(value)
set myobj.MyDate = ##class(Test.MyClass).MyDateDisplayToLogical(value)

Hello David,

Can you double check that you have the port forwarding set up correctly when you start the container? This is the error you will get if you try to connect via JDBC to a port that was forwarded to something other than the instance's SuperServer port. The SuperServer port is 1972. For instance, if you start the container with:

docker run -p 51776:1972 -p 52776:52773 containers.intersystems.com/intersystems/iris-community:2020.

You should be able to connect using the connection string: "jdbc:IRIS://localhost:51776/USER/". In general, you should be able to connect via JDBC to the community edition containers.


In order to use the Web Gateway to dispatch requests to an HTTP Service (such as EnsLib.HL7.Service.HTTPService), we need to have a way for the CSP system to know which Service to dispatch the request to. This works by default if the name of the Service is the same as the class name; in this case CSP can just use the class name in the URL to find the configuration item. It sounds like you already have this working. 

If you have multiple Services in the same production using the same class we need a mechanism to distinguish between them. This can be accomplished using the CfgItem URL parameter. Let's say you have two Services using the "EnsLib.HL7.Service.HTTPService" class, named "HL7ServiceA" and "HL7ServiceB". You can distinguish between them by making requests to the following URLs:



Also note that, in order for any of this to work, the "Enable Standard Requests" setting needs to be enabled for the adapter for each of the Services:


I hope this helps.


Sean Klingensmith

Hi Peter, 

Correlate() simply associates the given XML element with the given ObjectScript class. %XML.Reader allows you to specify multiple element/class associations by calling Correlate() multiple times. Subsequent calls to Next() will return the objects associated with the elements you've correlated, in the order in which they are found in the file. Here is a very basic example using two classes

Here are the classes:

Class Test.A Extends (%RegisteredObject, %XML.Adaptor)
Property AProp1 As %String(MAXLEN = 64, XMLPROJECTION = "attribute"); 
Property AProp2 As %String(MAXLEN = 64, XMLPROJECTION = "attribute");
Class Test.B Extends (%RegisteredObject, %XML.Adaptor)
Property BProp1 As %String(MAXLEN = 64, XMLPROJECTION = "attribute"); 
Property BProp2 As %String(MAXLEN = 64, XMLPROJECTION = "attribute"); 

And our XML file:

<?xml version="1.0" encoding="UTF-8"?>
    <A AProp1="abc" AProp2="def"></A>
    <B BProp1="123" BProp2="456"></B>

Now we can read both objects in one pass with the following method:

ClassMethod ReadXML()
    set reader = ##class(%XML.Reader).%New()
    do reader.OpenFile("/tmp/test.xml")
    do reader.Correlate("A", "Test.A")
    do reader.Correlate("B", "Test.B")
    do reader.Next(.obj, .sc)
    if $$$ISOK(sc) && $isobject(obj) {
        zwrite obj
    do reader.Next(.obj, .sc)
    if $$$ISOK(sc) && $isobject(obj) {
        zwrite obj

In a more complex example, you would probably want to call Next() in a loop, and actually pay attention to the error code, but this should demonstrate the point. 

I hope this helps.