title: Facing SoapFaultClientException while consuming SOAP Web Service in Spring Boot
body: <p>On changing package-info.java file generated by this plugin in spring boot </p>
  
  <pre><code>&lt;plugin&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt;
          &lt;/plugin&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.jvnet.jaxb2.maven2&lt;/groupId&gt;
              &lt;artifactId&gt;maven-jaxb2-plugin&lt;/artifactId&gt;
              &lt;version&gt;0.13.2&lt;/version&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;generate&lt;/goal&gt;
                      &lt;/goals&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
              &lt;configuration&gt;
                  &lt;generatePackage&gt;com.example.demo.schemas.eligibility.test&lt;/generatePackage&gt;
                  &lt;generateDirectory&gt;${project.basedir}/src/main/java&lt;/generateDirectory&gt;
                  &lt;schemaDirectory&gt;${project.basedir}/src/main/resources/wsdl&lt;/schemaDirectory&gt;
                  &lt;schemaIncludes&gt;
                      &lt;include&gt;*.wsdl&lt;/include&gt;
                  &lt;/schemaIncludes&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
  </code></pre>
  
  <p>I'm receiving this Exception that giving sense that we can't change package-info.java file for SOAP Xml classes. </p>
  
  <pre><code>org.springframework.ws.soap.client.SoapFaultClientException: BIP3113E: Exception detected in message flow gen.CRMEligibilityGS.SOAP Input (broker PTCLDEVBK01) 
      at org.springframework.ws.soap.client.core.SoapFaultMessageResolver.resolveFault(SoapFaultMessageResolver.java:38) ~[spring-ws-core-3.0.7.RELEASE.jar:na]
      at org.springframework.ws.client.core.WebServiceTemplate.handleFault(WebServiceTemplate.java:830) ~[spring-ws-core-3.0.7.RELEASE.jar:na]
      at org.springframework.ws.client.core.WebServiceTemplate.doSendAndReceive(WebServiceTemplate.java:624) ~[spring-ws-core-3.0.7.RELEASE.jar:na]
      at org.springframework.ws.client.core.WebServiceTemplate.sendAndReceive(WebServiceTemplate.java:555) ~[spring-ws-core-3.0.7.RELEASE.jar:na]
      at org.springframework.ws.client.core.WebServiceTemplate.marshalSendAndReceive(WebServiceTemplate.java:390) ~[spring-ws-core-3.0.7.RELEASE.jar:na]
      at org.springframework.ws.client.core.WebServiceTemplate.marshalSendAndReceive(WebServiceTemplate.java:378) ~[spring-ws-core-3.0.7.RELEASE.jar:na]
      at com.example.demo.config.SOAPConnector.callWebService(SOAPConnector.java:8) ~[classes/:na]
      at com.example.demo.client.SoapClient.getCustmoerEligibilityResponse(SoapClient.java:25) ~[classes/:na]
      at com.example.demo.EligibilityRestController.getCountryDetails(EligibilityRestController.java:31) ~[classes/:na]
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_181]
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_181]
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_181]
      at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_181]
  </code></pre>
  
  <p>So can we make change in package-info.java file generated by plugin jaxb2 while generating java classes from wsdl file?
  Or this exception is telling something else? </p>
  
  <p>this is my package-info.java file </p>
  
  <pre><code>@javax.xml.bind.annotation.XmlSchema(namespace = "http://CRMEligibilityGS")
  package com.example.demo.schemas.eligibility.test;
  </code></pre>
  
  <p>Using Java 8 with Spring Boot 2.1.4.RELEASE</p>
  
  <p>Client Class Code</p>
  
  <pre><code> public CRMEligibilityGSResponse getCustmoerEligibilityResponse(CRMEligibilityGS eligibilityRequest) {
          webServiceTemplate = new WebServiceTemplate(jaxMarshaller);
          CRMEligibilityGSResponse response = (CRMEligibilityGSResponse) webServiceTemplate.marshalSendAndReceive("http://abcxyz?wsdl", eligibilityRequest);    // url is sample actual one is different that also ends with ?wsdl and url is private
          System.out.println("Response is :"+ response);
          return response;
      }
  </code></pre>