Question
· May 18, 2017

ERROR #5002: Cache error in Ensemble Soap Service

I am getting an ERROR #5002 in a soap service defined in ensemble. Odd thing is that I allready have a functioning business service running as a soap service, but we needed another, but that one returns an error:

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:s="http://www.w3.org/2001/XMLSchema">
   <SOAP-ENV:Body>
      <SOAP-ENV:Fault>
         <faultcode>SOAP-ENV:Server</faultcode>
         <faultstring>Server Application Error</faultstring>
         <detail>
            <error xmlns="http://tempuri.org">
               <text>ERROR #5002: Cache error: &lt;UNDEFINED>zTestOperation+1^Test.WebService.1 *sc</text>
            </error>
         </detail>
      </SOAP-ENV:Fault>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

This is the class I defined and added to my ensemble production:

Class Test.WebService Extends EnsLib.SOAP.Service
{

Parameter ADAPTER;

Parameter SERVICENAME = "TestWebService";

Parameter LOCATION = "http://tst-intersystems.mydomain.com:57772/webservices";

Parameter NAMESPACE = "http://tempuri.org";

Method TestOperation(data As %String) [ WebMethod ]
{
    if $$$ISERR(sc) do ..ReturnMethodStatusFault(sc)
}

}

Where should I look to resolve this?

I am running ensemble 2016.2

Discussion (3)1
Log in or sign up to continue

Looks like you've copied some example from the documentation. But removed some by your opinion not needed lines.

Original code looked like:

    //create Ensemble request message with given ID
    set request=##class(ESOAP.CustomerRequest).%New()
    set request.CustomerID=ID

    //send Ensemble request message 
    set sc= ..SendRequestSync("GetCustomerInfoBO",request,.response)
    if $$$ISERR(sc) do ..ReturnMethodStatusFault(sc)

You left only the last line. Where checked result from the previous one, in variable sc, as this variable is not defined in your code you got this error in SOAP

<UNDEFINED>zTestOperation+1^Test.WebService.1 *sc