Question
· Jun 5, 2017

Error in the SOAP Wizard

Hi,

In SOAP Wizard, whatever WSDL I pass, I m getting the following error in the SOAP Response. Even If I create my own SOAP Web-Service and pass its WSDL, I am getting the same.But directly If I invoke the Webmethods in the SOAP Web-Service which is being created , I am getting the proper SOAP Response.

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
 <SOAP-ENV:Body>
  <SOAP-ENV:Fault>
   <faultcode>SOAP-ENV:Server</faultcode>
   <faultstring>Server Application Error</faultstring>
   <detail>
    <error xmlns="http://intersystems.com/wsp/calculator">
     <text>ERROR #5002: Cache error: <COMMAND>zInvokeService+3^safeena786.Service.calculatorSoap.Add.1 *Function must return a value at zAdd+2^safeena786.Service.calculatorSoap.1</text>
    </error>
   </detail>
  </SOAP-ENV:Fault>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

 

I want to know how it can be resolved and get the proper SOAP Response of the Webmethod..

 

Thanks,

Safeena.M

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

So the problem here was likely that you either didn't have the method as an Expression or you weren't QUITting a value.  If you have a method that you intend to use as a Webmethod (SOAP method) then you must return a value.  Your options are:

Method AddInteger(Arg1 As %Integer, Arg2 As %Integer) As %Integer [ WebMethod, Codemode=Expression ]
{
Arg1 + Arg2
}

or

Method AddInteger(Arg1 As %Integer, Arg2 As %Integer) As %Integer [ WebMethod ]
{
      QUIT Arg1 + Arg2
}

I'd guess you weren't quitting out the value.