Hi Srinivas,
The Service method i.e. in my case AccountBalanceService.initFactory is taking 380 milliseconds while the stub method is taking i.e. in my case availableBalanceServiceStub.availableBalance is taking 2 seconds
I presume you are comparing Dynamic Proxy and Generated Stub web service invocation mechanisms here. If so, I'd be surprised to see the results. I'd have thought Generated Proxy code takes less time compared to Dynamic Proxy, owing to extra time in generating proxies dynamically using reflection API in Dynamic Proxy. Are these results consistent? If so, did you manage to monitor line to line performance stats and notice where exactly it's taking more time in case of stubs?
For me, it's seems that it might be the networking issues, marshalling and unmarshalling of the soap files and the JVM settings on the machines.
As long as you are using same JVM to compare, I don't think the above would cause performance deviation as they'd pretty much same in both.
Cheers,
Naren
(OCEEJBD6, SCWCD5, SCDJWS, SCJP1.4 and Oracle SQL 1Z0-051)