Question
Jeffrey Semmens · Apr 20, 2016

Ensemble Business Service with direct Web Service implementation

It looks like the normal usage of calling an Ensemble based Web Service via Ensemble is to create an Ensemble Business service that inherits from EnsLib.SOAP.Service which is then used to call a business operation which inherits from EnsLib.SOAP.Operation and the SOAP Outbound Adapter which can be generated via the SOAP wizard.

But, what if you don't want the extra step of calling the web service class via the operation? Has anyone actually constructed the Business Service to directly invoke the web service class? I know you lose the ability to trace any messages in this case but I'm wondering if there is a performance optimization doing this.

If anyone has done this and has a simple sample that would also be appreciated. 

0
0 517
Discussion (1)1
Log in or sign up to continue

Jeff

several points:

1) Extending EnsLib.SOAP.Service is absolutely fine as long as you  make sure it uses CSP and not the HTTP Inbound Adapter. We are trying to remove all references to that adapter from our examples but it is taking a longer than i had hoped.

2) In general,for creating a SOAP service that is not just a pass through (or close to pass through)  i normally prefer to just extend %SOAP.Service and keep the  business service definition separate. It means you have to do a small amount of extra work, but you also get more control. It is a matter of personal preference.

3) For pass through you should probably use the EnsLib.xxxx.GenericService where xxxx is one of REST, HTTP or SOAP. These bundle up additional information such as the http headers so the  outbound request faithfully reproduces the inbound request.

4) And finally if you want to gain efficiency by reducing the overhead of persistent messages within Ensemble you should look at the new features included in 2015.2. For these pass through cases you can now user real inproc calls and suppress all the message storage and journal creation. This makes it more efficient but you lose the message trace.

release notes:

http://docs.intersystems.com/documentation/ensemble/20152/pdfs/EGRN.pdf

detailed documentation:

http://docs.intersystems.com/ens20152/csp/docbook/DocBook.UI.Page.cls?KE...