title: How to get IP address of incoming request SOAP
body: <p>I have the following classes, how I can get the IP address of the incoming request  source? I have checked several solutions on the internet but could not find some suitable one, if you need more information about the project structure I can add, thanks</p>
  
  <pre><code>@EnableWs
  @Configuration
  public class WebServiceConfig extends WsConfigurerAdapter {
  
      @Bean
      public ServletRegistrationBean messageDispatcherServlet(ApplicationContext applicationContext) {
          MessageDispatcherServlet servlet = new MessageDispatcherServlet();
          servlet.setApplicationContext(applicationContext);
          servlet.setTransformWsdlLocations(true);
          return new ServletRegistrationBean(servlet, "/ws/*");
      }
  
      @Bean(name = "doSomething")
      public DefaultWsdl11Definition defaultValidateWsdl11Definition(XsdSchema validateSchema) {
          DefaultWsdl11Definition wsdl11Definition = new DefaultWsdl11Definition();
          wsdl11Definition.setPortTypeName("ValidatePort");
          wsdl11Definition.setLocationUri("/ws");
          wsdl11Definition.setTargetNamespace("http://www.org.com/validate");
          wsdl11Definition.setSchema(validateSchema);
          return wsdl11Definition;
      }
  
      @Bean(name = "doSecond")
      public DefaultWsdl11Definition defaultActionWsdl11Definition(XsdSchema actionSchema) {
          DefaultWsdl11Definition wsdl11Definition = new DefaultWsdl11Definition();
          wsdl11Definition.setPortTypeName("ActionPort");
          wsdl11Definition.setLocationUri("/ws");
          wsdl11Definition.setTargetNamespace("http://www.org.com/action");
          wsdl11Definition.setSchema(actionSchema);
          return wsdl11Definition;
      }
  
      @Bean
      public XsdSchema validateSchema() {
          return new SimpleXsdSchema(new ClassPathResource("doSomething.xsd"));
      }
  
      @Bean
      public XsdSchema actionSchema() {
          return new SimpleXsdSchema(new ClassPathResource("doSecond.xsd"));
      }
  
  }
  &lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" 
      xmlns:tns="http://www.org.com/doSomething" 
      targetNamespace="http://www.org.com/doSomething" elementFormDefault="qualified"&gt;
  
      &lt;xs:element name="getActionRequest"&gt;
          &lt;xs:complexType&gt;
              &lt;xs:sequence&gt;
                  &lt;xs:element name="Username" type="xs:string"/&gt;
                  &lt;xs:element name="Password" type="xs:string"/&gt;
              &lt;/xs:sequence&gt;
          &lt;/xs:complexType&gt;
      &lt;/xs:element&gt;
  
      &lt;xs:element name="getDoSomethingResponse"&gt;
          &lt;xs:complexType&gt;
              &lt;xs:sequence&gt;
                  &lt;xs:element name="Code" type="xs:string"/&gt;
              &lt;/xs:sequence&gt;
          &lt;/xs:complexType&gt;
      &lt;/xs:element&gt;
  
  &lt;/xs:schema&gt;
  </code></pre>