title: org.springeframework.ws.soap.client.SoapFaultClientException in jBoss 7.1.1
body: <p>I'm creating a Spring webapplication (actually a portlet for Liferay), where I have to communicate with a webservice. Our webapplication runs on JBoss 7.1.1. I've done this before without much trouble, the only difference was that in that time the application ran on a Tomcat server. </p>
  
  <p>I've tested the webservice with a soap plugin, and I can conclude that the webservice is running ok.</p>
  
  <p>What did I do:</p>
  
  <p>I created pojo files (DTO's?) from the provided .wsdl file, using maven-jaxb2-plugin. Those classes are generated well. Then I've defined my marshalling beans:</p>
  
  <pre><code>@Configuration
  public class WebServiceConfiguration {
  
  
     @Bean
     public Jaxb2Marshaller persoonServiceMarshaller() {
         Jaxb2Marshaller m = new Jaxb2Marshaller();
         m.setMtomEnabled(true);
         m.setContextPath("services");
         return m;
     }
  
     @Bean
     public WebServiceTemplate persoonTemplate(Jaxb2Marshaller persoonServiceMarshaller) {
         WebServiceTemplate w = new WebServiceTemplate();
         w.setMarshaller(persoonServiceMarshaller);
         w.setUnmarshaller(persoonServiceMarshaller);
  
         w.setDefaultUri("my hardcoded webservice location URI...");
         return w;
     }
  </code></pre>
  
  <p>Then I wrote a method to test this thing out:</p>
  
  <pre><code>@Autowired
      WebServiceTemplate persoonTemplate;
  
      public int getPersonCount(String lastName, String firstName, int birthYear,
              int birthMonth, String postalCode) {
          System.out.println("Getting PersonCount");
  
          ZoekPersonen zp = new ObjectFactory().createZoekPersonen();
          PersoonZoekCriteria criteria = new ObjectFactory()
                  .createPersoonZoekCriteria();
          if (lastName != null &amp;&amp; !lastName.equals("")) {
              criteria.setNaam(new ObjectFactory().createPersoonDTONaam(lastName));
          }
          if (firstName != null &amp;&amp; !firstName.equals("")) {
              criteria.setVoornaam(new ObjectFactory()
                      .createPersoonDTONaam(firstName));
          }
          if (birthYear != 0) {
              criteria.setGeboorteJaar(new ObjectFactory()
                      .createPersoonZoekCriteriaGeboorteJaar(birthYear));
  
          }
          if(birthYear != 0) {
              criteria.setGeboorteMaand(new ObjectFactory()
              .createPersoonZoekCriteriaGeboorteMaand(birthMonth));
  
          }
          if(postalCode != null &amp;&amp; !postalCode.equals("")) {
              criteria.setPostCode(new ObjectFactory()
              .createPersoonZoekCriteriaPostCode(postalCode));
          }
  
  
          @SuppressWarnings("unchecked")
          JAXBElement&lt;ZoekPersonenResponse&gt; jaxBResponse = (JAXBElement&lt;ZoekPersonenResponse&gt;) persoonTemplate
                  .marshalSendAndReceive(new ObjectFactory()
                          .createZoekPersonen(zp));
  
          return jaxBResponse.getValue().getReturn().getGevondenPersonen()
                  .getValue().getPersoonDTO().size();
      }
  </code></pre>
  
  <p>When I test this method, this Exception is thrown: </p>
  
  <pre><code>13:12:54,278 INFO  [stdout] (http--0.0.0.0-443-6) 13:12:54,275 ERROR [http--0.0.0.0-443-6][render_portlet_jsp:132] null
  13:12:54,279 INFO  [stdout] (http--0.0.0.0-443-6) org.springframework.ws.soap.client.SoapFaultClientException: Fault occurred while processing.
  13:12:54,281 INFO  [stdout] (http--0.0.0.0-443-6)   at BLL.PersoonBLL.getPersonCount(PersoonBLL.java:53)
  13:12:54,283 INFO  [stdout] (http--0.0.0.0-443-6)   at controllers.MyController.renderView(MyController.java:44)
  13:12:54,284 INFO  [stdout] (http--0.0.0.0-443-6)   at javax.portlet.GenericPortlet.render(GenericPortlet.java:233)
  13:12:54,285 INFO  [stdout] (http--0.0.0.0-443-6)   at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:103)
  13:12:54,286 INFO  [stdout] (http--0.0.0.0-443-6)   at com.liferay.portlet.ScriptDataPortletFilter.doFilter(ScriptDataPortletFilter.java:55)
  13:12:54,290 INFO  [stdout] (http--0.0.0.0-443-6)   at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:100)
  13:12:54,294 INFO  [stdout] (http--0.0.0.0-443-6)   at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:64)
  </code></pre>
  
  <p>I'm clueless, I think It has something to do with JBoss, googled it, but did not find useful information.</p>
  
  <p>FYI: My dependencies and Plugin from my Maven POM:</p>
  
  <pre><code>&lt;plugin&gt;
          &lt;groupId&gt;org.jvnet.jaxb2.maven2&lt;/groupId&gt;
          &lt;artifactId&gt;maven-jaxb2-plugin&lt;/artifactId&gt;
          &lt;configuration&gt;
              &lt;schemaDirectory&gt;src\main\resources&lt;/schemaDirectory&gt;
              &lt;schemaIncludes&gt;
                  &lt;include&gt;PersoonWebService.wsdl&lt;/include&gt;
              &lt;/schemaIncludes&gt;
              &lt;generatePackage&gt;services&lt;/generatePackage&gt;
              &lt;generateDirectory&gt;src\main\java&lt;/generateDirectory&gt;
              &lt;verbose&gt;true&lt;/verbose&gt;
          &lt;/configuration&gt;
          &lt;executions&gt;
              &lt;execution&gt;
                  &lt;phase&gt;generate-resources&lt;/phase&gt;
                  &lt;goals&gt;
                      &lt;goal&gt;generate&lt;/goal&gt;
                  &lt;/goals&gt;
              &lt;/execution&gt;
          &lt;/executions&gt;
  &lt;/plugin&gt;
  
  
  &lt;dependency&gt;
      &lt;groupId&gt;org.springframework.ws&lt;/groupId&gt;
      &lt;artifactId&gt;spring-ws-core&lt;/artifactId&gt;
      &lt;version&gt;${spring-ws.version}&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.springframework&lt;/groupId&gt;
      &lt;artifactId&gt;spring-oxm&lt;/artifactId&gt;
      &lt;version&gt;${spring.suite.version}&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>Spring WS version = 2.1.4-RELEASE
  Spring suite version = 3.2.4-RELEASE</p>
  
  <p>Upgrading spring versions or JBoss version is sadly no option. This has to run in an existing production environment.</p>
  
  <p>Hints and tips are very welcome!</p>