Published on InterSystems Developer Community (https://community.intersystems.com)

Home > SOAP business service is not functioning correctly with session enabled and customized business dispatch name

Question
Robert Wang · Jan 10, 2023

SOAP business service is not functioning correctly with session enabled and customized business dispatch name

Currently we have an SOAP bussiness service "Calculator" in production and this "Calculator" service has following settings:

  • Service class: CustomPackage.Calculator (Extends EnsLib.SOAP.Service)
  • Service name: "Calculator"
  • Basic settings -- Port 8088
Class DemoPackage.Caculator.CalculatorService Extends EnsLib.SOAP.Service
{

Parameter ADAPTER = "EnsLib.SOAP.InboundAdapter";

Parameter SERVICENAME = "CalculatorService";

Parameter NAMESPACE = "http://test.me/calculator";

Parameter SOAPSESSION = 1;

Method Init() [ WebMethod ]
{
    IF '$G(%session) 
    {
        $$$TRACE("%session is undefined")
    }
    ELSE
    {
        $$$TRACE("NewSession: "_$CASE($ISOBJECT(%session), 1:"True", 0:"False"))
        Set %session.Data("value") = 0
    }
}
}

Currently, when we call Init method as shown above on http://localhost:8088/Calculator, we got "%session is undefined" logged.

#Business Service #SOAP #InterSystems IRIS
Product version: IRIS 2022.2
$ZV: IRIS for Windows (x86-64) 2022.2 (Build 368U) Fri Oct 21 2022 16:44:33 EDT

Source URL:https://community.intersystems.com/post/soap-business-service-not-functioning-correctly-session-enabled-and-customized-business