How to enable a new web service?

I'm following the tutorial here.  When I try to call the default Test() method I get the following error:

An error occurred with the CSP application and has been logged to system error log (^ERRORS)

I found this document which says I need to make the "Web Application" accessible by running a couple commands.  I'm not even sure I created a Web Application.  Regardless, I tried a few variants but still get the same error.

Here is the URL for the Service Catalog: /csp/healthshare/mhclib/Custom.MHC.Scott.ServiceTest.cls

I tried different things including these two:

set ^SYS("Security","CSP","AllowClass","/csp/healthshare/mhclib/Custom.MHC.Scott.ServiceTest/","%SOAP.WebServiceInfo")=1
set ^SYS("Security","CSP","AllowClass","/csp/healthshare/mhclib/Custom.MHC.Scott.ServiceTest/","%SOAP.WebServiceInvoke")=1


No dice.  What am I missing? It's literally the default code from the Web Service wizard.

  • 0
  • 0
  • 1319
  • 3
  • 2


"An error occurred with the CSP application and has been logged to system error log (^ERRORS)"

means that you can check error in Management Portal -> System Operation -> System Logs -> Application Error Log -> [Namespace]

Or for debugging purposes set error page for web application to %CSP.Error.cls

and see errors on the page itself

Illegal CSP Request : CSP Error

21 instances of that, which sounds about right with me poking around trying to fix it.

Not sure that's more helpful :\


Yes, Illegal CSP Request usually means that access to this particular class is prohibited.

If your web application named '/csp/healthshare/mhclib/' then you need to enable classes as follows:

set ^SYS("Security","CSP","AllowClass","/csp/healthshare/mhclib/","%SOAP.WebServiceInfo")=1
set ^SYS("Security","CSP","AllowClass","/csp/healthshare/mhclib/","%SOAP.WebServiceInvoke")=1

Notice that calling SOAP Service via test webpage (%SOAP.WebServiceInvoke.cls) is independent from calling web service via SOAP protocol. For that you should check option "Inbound Web Services" in Web application settings.

%SOAP.WebServiceInfo and %SOAP.WebServiceInvoke are just pages to test web services via Browser.

SOAP protocol itself does not use these pages.

If you check the latest Caché documentation here you can get a better understanding of the options for enabling application access to %CSP Pages - including SOAP Web Services. Also part of the Caché 2013.1 Release Notes if I am not mistaken...


The message you are getting isn't the one that we normally see when the AllowClass nodes of the ^SYS global are not set. I think your best bet would to check the application error log for that namespace or run ^%ERN from terminal. Hopefully the logged error will point you in the right direction.