12.07.2015 Views

Using SOAP and Web Services with Ensemble - InterSystems ...

Using SOAP and Web Services with Ensemble - InterSystems ...

Using SOAP and Web Services with Ensemble - InterSystems ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Creating an <strong>Ensemble</strong> <strong>Web</strong> Client• Create a proxy method object by calling the <strong>Web</strong>Method method of the adapter. Set propertiesof this object as appropriate (one property per named argument). In this case, <strong>Web</strong>Method returnsan object <strong>with</strong> one property: StockName. After setting properties as needed, call the Invokemethod of that object. For example:Method GetQuote3(pRequest As GetStock.BusOp.GetQuoteRequest,Output pResponse As GetStock.BusOp.GetQuoteResponse) As %Status{set ..Adapter.<strong>Web</strong>ServiceClientClass = "GetStock.StockServiceSoap"set proxymethod=..Adapter.<strong>Web</strong>Method("GetQuote")set proxymethod.StockName=pRequest.StockNameset status=..Adapter.Invoke(proxymethod)if $$$ISERR(status) quit statusset pResponse=##class(GetStock.BusOp.GetQuoteResponse).%New()set pResponse.GetQuoteResult=proxymethod.%Resultquit $$$OK}In this case, you can provide any number of arguments.3.6.4 Reference InformationThis section provides reference information for the adapter property <strong>and</strong> methods mentioned in theprevious section.%ClientInvokeMethod%<strong>SOAP</strong>.<strong>Web</strong>ClientThe associated instance of the proxy client (an instance of %<strong>SOAP</strong>.<strong>Web</strong>Client). This propertyis set when you set the <strong>Web</strong>ServiceClientClass property of the adapter.Method InvokeMethod(pMethodName As %String,Output pResult As %RegisteredObject,ByRef pArg1,ByRef pArg2,ByRef pArg3,ByRef pArg4,ByRef pArg5,ByRef pArg6,ByRef pArg7,ByRef pArg8,ByRef pArg9,ByRef pArg10,ByRef pArg11,ByRef pArg12) As %Status40 <strong>Using</strong> <strong>SOAP</strong> <strong>and</strong> <strong>Web</strong> <strong>Services</strong> <strong>with</strong> <strong>Ensemble</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!