File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 OCA Java SE 8 Programmer I Study Guide 1Z0-808 this week in the OCAJP forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Multiple Web Service Clients in Spring" Watch "Multiple Web Service Clients in Spring" New topic

Multiple Web Service Clients in Spring

Yashwant Palkar

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.

Bill Gorder

Joined: Mar 07, 2010
Posts: 1680

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:
subject: Multiple Web Service Clients in Spring