wood burning stoves 2.0*
The moose likes Web Services and the fly likes Changing USERNAME_PROPERTY/PASSWORD_PROPERTY values in service proxy object at runtime? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Changing USERNAME_PROPERTY/PASSWORD_PROPERTY values in service proxy object at runtime?" Watch "Changing USERNAME_PROPERTY/PASSWORD_PROPERTY values in service proxy object at runtime?" New topic
Author

Changing USERNAME_PROPERTY/PASSWORD_PROPERTY values in service proxy object at runtime?

Rana Dey
Greenhorn

Joined: Jul 05, 2012
Posts: 10
We have written a server application wrapper which internally uses the SOAP webservices. This server application runs on TOMCAT and should handle multiple clients.

In the current implementation, we used to create a proxy object (for SOAP service) for each client requesting to our server. The proxy object contains the bindingprovider information attached. This proxy object is created at the first call while requesting for startsession.

We used to save this proxy object along with the sessionID in the HashMap for any further request to the server application. So when next time a request comes, we used to fetch the respective service object from HashMap and this object was used to call the new SOAP API.

Now we are facing memory issue (outofMemory) because we save complete objects for each client. So at some point of time the Java memory gets full, if there are many clients working concurrently.

To avoid the same, we are wondering if we can create just one SOAP proxy object for all the clients and at runtime we just keep on changing the bindingprovider credentials value for the proxy object i.e. USERNAME_PROPERTY/PASSWORD_PROPERTY at runtime.

As this credentials needs to be present with proxy object for making every soap api request. Please suggest if we can go for this kind of approach.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Changing USERNAME_PROPERTY/PASSWORD_PROPERTY values in service proxy object at runtime?
 
Similar Threads
Sample Questions for 288 - Need answers
Need help connecting to WSDL for first time
what is the Client for EJB and Servlet?
web of knowledge
JAX-WS dynamic proxies and increased platform independence