File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Spring and the fly likes Multiple Web Service Clients in Spring Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Multiple Web Service Clients in Spring" Watch "Multiple Web Service Clients in Spring" New topic
Author

Multiple Web Service Clients in Spring

Yashwant Palkar
Greenhorn

Joined: Dec 01, 2010
Posts: 20
Currently we are using spring web service client configured in spring configuration.xml.
I have to add another web service client and it needs to be configured in same configuration file.
Both webservices have different credentials for them.
i have configured 2 different webservicetemplate for them and 2 different messageSenders.




In this credentials of second web service teamplate are overridden by credential of first web service template. Whereas I have created all proprties different from first one.
is there any other way to set credentials of second web service client.

Thanks
Bill Gorder
Bartender

Joined: Mar 07, 2010
Posts: 1648
    
    7

try pulling this bean out and giving it an id. Then for the property use the ref tag to refer to it.



I believe that Spring names those beans automatically using the class name and if there is more than one bean of the same class it appends a number to them. But its worth a try just to make sure that is not causing your problem.


[How To Ask Questions][Read before you PM me]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Multiple Web Service Clients in Spring
 
Similar Threads
Persistent Connection : Sping-ws Client
Spring-ws client with Jax-ws web service
Spring-WS /JAX-RPC doubt
How to read Atom feed using Spring RestTemplate
Problem with classloader with jaxb, spring, websphere