title: WebService default uri java.lang.IllegalArgumentException: 'uri' must not be empty
body: <p>I am consuming a Soap WebService using spring WebServiceTemplate &amp; below is the bean creation and my bean class but dont know why i am unable to get the value of Default Uri.
  Can someone please help with this thing.</p>
  
  <p>ServiceContext.java</p>
  
  <pre><code>        @Bean
      public Jaxb2Marshaller marshaller() {
          Jaxb2Marshaller marshaller = new Jaxb2Marshaller();
          marshaller.setContextPath("com.canaldigital.tsi.schema.psd.psd_managecustomer.v2");        
          return marshaller;
      }
  
  
      @Bean
      public SaajSoapMessageFactory messageFactory() {
      SaajSoapMessageFactory factory=new SaajSoapMessageFactory();
  
      factory.setSoapVersion(SoapVersion.SOAP_12);
          return factory;
      }    
  
       @Bean
      public ManageService voucherService(Jaxb2Marshaller marshaller,SaajSoapMessageFactory messageFactory) {
           ManageService service = new ManageService();
  
          service.setDefaultUri("http://localhost:7001/CustomerService?WSDL");
          service.setMarshaller(marshaller);
          service.setUnmarshaller(marshaller);
          service.setMessageFactory(messageFactory);
          return service;
      }
  </code></pre>
  
  <p>ManageService.java </p>
  
  <pre><code>    public class ManageService extends WebServiceGatewaySupport {
  
      try{
  
      System.out.println("Finalyy calllingggg service: "+getWebServiceTemplate());    
      System.out.println("WebService template URI is: ---- "+getWebServiceTemplate().getDefaultUri());
  
  
      JAXBElement&lt;GetCustomerInfoRequestType&gt; mustangRequst=new createGetCustomerInfoRequest(customer);
  
  
       (JAXBElement&lt;GetCustomerInfoResponseType&gt;) getWebServiceTemplate().marshalSendAndReceive(mustangRequst);
  
  
      }catch(Exception e){
  
          e.printStackTrace();
  
           }
  
      }
  </code></pre>