Creating SOAP Services and Web Clients with Ensemble
Older Ensemble Web Service Variation
|
|
Method OnProcessInput(pInput As %RegisteredObject, ByRef pOutput As %RegisteredObject, ByRef pHint As %String) As %Status
Method OnProcessInput(pInput As %RegisteredObject, ByRef pOutput As %RegisteredObject) As %Status { set sc= ..SendRequestSync("Lookup",pInput,.pOutput) Quit sc }
Method GetCustomerInfo(ID As %Numeric) As ESOAP.SOAPResponse [ WebMethod ] { //create Ensemble request message with given ID set request=##class(ESOAP.CustomerRequest).%New() set request.CustomerID=ID //send Ensemble request message //ProcessInput() calls OnProcessInput(), which actually //sends the message set sc=..ProcessInput(request,.response,"GetCustomerInfo") ... quit soapresponse }
Method OnProcessInputAlt(pInput As %RegisteredObject, ByRef pOutput As %RegisteredObject, pHint As %String) As %Status { if pHint="GetCustomerInfo"{ set sc= ..SendRequestSync("GetCustomerInfoBO",pInput,.pOutput) } elseif pHint="GetStoreInfo" { set sc= ..SendRequestSync("GetStoreInfoBO",pInput,.pOutput) } Quit sc }
Copyright © 1997-2019 InterSystems Corporation, Cambridge, MA
|
Content for this page loaded from ESOAP.xml on 2019-02-21 02:24:27
|