title: How to get an Http response code in a soap client?
body: <p>There is a soap web service and a client. Uses the Apache CXF / Spring bundle.<br>
  Client:</p>
  
  <pre><code>public class MyWebServiceClientFactoryCXF {
      public MyWebServiceAPI getMyWebServiceClient(String URI, String username, String password) throws MalformedURLException {
          JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
          factory.setServiceClass(MyWebServiceAPI.class);
          factory.setAddress(URI);
          factory.setUsername(username);
          factory.setPassword(password);
          factory.setDataBinding(new AegisDatabinding());
          return (MyWebServiceAPI) factory.create();
      }
  }
  </code></pre>
  
  <p>Spring context:</p>
  
  <pre><code>&lt;bean id="myWebServiceClientFactory" class="mypakg.MyWebServiceClientFactoryCXF"/&gt;
  &lt;bean id="myWebServiceClient" factory-bean="myWebServiceClientFactory" factory-method="getMyWebServiceClient"&gt;
          &lt;constructor-arg index="0" type="java.lang.String" value="${ws.url}"/&gt;
          &lt;constructor-arg index="1" type="java.lang.String" value="${ws.login}"/&gt;
          &lt;constructor-arg index="2" type="java.lang.String" value="${ws.pwd}"/&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>Uses:</p>
  
  <pre><code>public class App {
      @Autowired
      private MyWebServiceAPI wsClient;
  
      public void someMethod() {
          wsClient.getSomeInfo();
          // Need to know http response code from `wsClient.getSomeInfo()`
      }
  }
  </code></pre>
  
  <p>How can I get the response code from the soap web service?
  I can specify an interceptor for <code>JaxWsProxyFactoryBean</code>, but how can I pass the value from interceptor to the <code>App.someMethod()</code> method?</p>