title: No unique bean of type [org.springframework.ws.client.core.WebServiceTemplate] is defined
body: <p>I am trying to make two testcases using class <code>org.springframework.ws.client.core.WebServiceTemplate</code>. Both testcases are in different classes so I made two different beans for them. </p>
  
  <p>On running the junit tests I got a error like that</p>
  
  <blockquote>
    <p>Error creating bean with name 'testcases.TestAdminMethodsWebService':
    Unsatisfied dependency expressed through bean property 'admin': : No
    unique bean of type
    [org.springframework.ws.client.core.WebServiceTemplate] is defined:
    expected single matching bean but found 7: [admin, rules]; nested
    exception is
    org.springframework.beans.factory.NoSuchBeanDefinitionException: No
    unique bean of type
    [org.springframework.ws.client.core.WebServiceTemplate] is defined:
    expected single matching bean but found 2: [admin, rules]</p>
  </blockquote>
  
  <p>My bean is like this: </p>
  
  <pre><code>&lt;oxm:jaxb2-marshaller id="marshaller_admin" contextPath="a.com.b" /&gt;
  &lt;bean id="admin" class="org.springframework.ws.client.core.WebServiceTemplate"&gt;
      &lt;property name="marshaller" ref="marshaller_admin" /&gt;
      &lt;property name="unmarshaller" ref="marshaller_admin" /&gt;
      &lt;property name="defaultUri"
          value="http://dev05:8080/.." /&gt;
  &lt;/bean&gt;
  &lt;oxm:jaxb2-marshaller id="marshaller_rules" contextPath="r.com.b" /&gt;
  &lt;bean id="rules" class="org.springframework.ws.client.core.WebServiceTemplate"&gt;
      &lt;property name="marshaller" ref="marshaller_rules" /&gt;
      &lt;property name="unmarshaller" ref="marshaller_rules" /&gt;
      &lt;property name="defaultUri"
          value="http://dev05:8080/.." /&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>please tell me how to overcome with this problem or why this error occurs any help will be appreciated thank you.</p>