Title: Accessing a service via SOAP as well as Java

I have exposed a service via SOAP. However, I also need to access this service internally from my application. Do you think it is okay to access the service directly by calling its SOAP implementation (bypassing the Axis servlet completely)? Is there preferred way to do this? Here's what I am thinking:

Accessing the service via SOAP
  UserProviderService userProviderService = new UserProviderServiceLocator();
  UserProvider userProvider = userProviderService.getuserservice(url);
  ..now start using userProvider..

Accessing the service directly using its SOAP implementation
  UserProvider userProvider = new UserserviceSoapBindingImpl()
  ..now start using userProvider..

Thanks.
Naresh


Reply via email to