title: Set user agent in WebServiceGatewaySupport
body: <p>How to set user agent in Spring's <code>WebServiceGatewaySupport</code>? Here is what I have already tried but failed:</p>
  
  <pre><code>@Bean
      public DiscreteGateway discreteGateway() throws SOAPException {
          Jaxb2Marshaller jaxb2Marshaller = new Jaxb2Marshaller();
          jaxb2Marshaller.setContextPath(CONTEXT_PATH);
          Map&lt;String, String&gt; propertyMap = new HashMap&lt;&gt;();
          propertyMap.put("User-Agent", "Tough-User");
          SaajSoapMessageFactory messageFactory = new SaajSoapMessageFactory(MessageFactory.newInstance(SOAPConstants.SOAP_1_2_PROTOCOL));
          messageFactory.setMessageProperties(propertyMap);
          DiscreteGateway discreteGateway = new DiscreteGateway();
          discreteGateway.setMarshaller(jaxb2Marshaller);
          discreteGateway.setUnmarshaller(jaxb2Marshaller);
          discreteGateway.setMessageFactory(messageFactory);
          discreteGateway.setDefaultUri(Discrete_URI);
          return discreteGateway;
      }
  </code></pre>
  
  <p>note that <code>DiscreteGateway</code> extends <code>WebServiceGatewaySupport</code>...</p>