You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Rob Jellinghaus <ro...@unrealities.com> on 2001/07/11 21:48:18 UTC

RE: cvs commit: xml-axis/java/test/functional TestProxySample.java FunctionalTests.java TestStockSample.java

At 11:09 AM 7/11/2001 -0400, Glen Daniels wrote:
>
>>   - Added AxisEngine.getClientEngine() to support having
>>   a single server-side AxisClient which is used by all server-
>>   side ServiceClients.
>
>Rob:
>
>Why put this in AxisEngine instead of AxisServer?  Does it make any sense to
>call this for a client?

The reason is that the MessageContext has an AxisEngine member, not an
AxisServer member.

Say I'm a service (ProxyService, for instance) and I want to make a
ServiceClient to make an outcall.  I can either do:

ServiceClient client = new ServiceClient(url,
msgContext.getAxisEngine().getClientEngine());

or

ServiceClient client = new ServiceClient(url,
((AxisServer)msgContext.getAxisEngine()).getClientEngine());

The former just seemed a bit cleaner to me, is all :-)

If you call getClientEngine() on a client, it just returns this, so it
still works fine.

If you want to change it, feel free.
Cheers!
Rob