title: Pact not working for SOAP messages
body: <p>I am working on passing a SOAP envelop for the pact. As per my understanding PACT supports XML so I wanted to give a try with SOAP message.I have  created a sample change student CXF service in Java. Following is my pact test</p>
  
  <p>public PactFragment createFragment(PactDslWithProvider builder) { </p>
  
  <pre><code>        Map&lt;String, String&gt; headersXml = new HashMap&lt;&gt;(); 
          headersXml.put("Content-Type","text/xml;charset=UTF-8" ); 
  
          //headers.put("Content-Type", "application/json"); 
  
          return builder
                  .given("welcomeTest")                   
                  .uponReceiving("a request to get the welcome test of a user")
                  .path("/web/ChangeStudent?wsdl")
                  //.query("wsdl")
                  .method("POST").body("&lt;soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:ser=\"http://service.pactsoap.com/\"&gt;&lt;soapenv:Header/&gt;"+
                  "&lt;soapenv:Body&gt;&lt;ser:changeName&gt;&lt;arg0&gt;&lt;name&gt;Nandess&lt;/name&gt;&lt;/arg0&gt;&lt;/ser:changeName&gt;&lt;/soapenv:Body&gt;&lt;/soapenv:Envelope&gt;")
                  .willRespondWith()
                  .headers(headersXml)
                  .status(200)
                  .body("&lt;soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\"&gt;&lt;soap:Body&gt;&lt;ns2:changeNameResponse xmlns:ns2=\"http://service.pactsoap.com/\"&gt;".toLowerCase()+
                   "&lt;return&gt;&lt;name&gt;HELLO myNamre&lt;/name&gt;&lt;/return&gt;&lt;/ns2:changeNameResponse&gt;&lt;/soap:Body&gt;&lt;/soap:Envelope&gt;".toLowerCase())
                  .toFragment();
  
  
      }
  
   @Test
          @PactVerification(value = "pactEmailsoap" , fragment = "createFragment") 
          public void runTest(){ 
               String result = new EmailService(rule.getConfig().url()).ChangeStudentDetailsNew();        
              assertEquals(result.toLowerCase(),"&lt;soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\"&gt;&lt;soap:Body&gt;&lt;ns2:changeNameResponse xmlns:ns2=\"http://service.pactsoap.com/\"&gt;".toLowerCase()+
                       "&lt;return&gt;&lt;name&gt;HELLO Nandess&lt;/name&gt;&lt;/return&gt;&lt;/ns2:changeNameResponse&gt;&lt;/soap:Body&gt;&lt;/soap:Envelope&gt;".toLowerCase());
                       }
  </code></pre>
  
  <p>Now my Service correctly returns the values in RunTest and Junit is successful.I verified this by removing @PactVerification annotation.But I am getting the response from pact mocking service in application/Json format.Where as I was expecting the response in text/xml format.
  That is the format I am sending to pact.</p>
  
  <p>Any idea why it is returning me the JSON response instead of XML response.
  Below is the exact error log:</p>
  
  <pre><code>[nioEventLoopGroup-3-1] DEBUG au.com.dius.pact.consumer.UnfilteredMockProvider - Generating response:   status: 500 
      headers: [Access-Control-Allow-Origin:*, Content-Type:application/json, X-Pact-Unexpected-Request:1] 
      matchers: [:] 
      body: au.com.dius.pact.model.OptionalBody(PRESENT, { "error": "Unexpected request : \tmethod: POST\n\tpath: \/web\/ChangeStudent\n\tquery: [:]\n\theaders: [SOAPAction:\"\", Connection:Keep-Alive, Content-Length:262, Content-Type:text\/xml;charset=UTF-8, Accept-Encoding:gzip,deflate, User-Agent:Apache-HttpClient\/4.1.1 (java 1.5), Host:localhost:22762]\n\tmatchers: [:]\n\tbody: au.com.dius.pact.model.OptionalBody(PRESENT, &lt;SOAP-ENV:Envelope xmlns:SOAP-ENV=\"http:\/\/schemas.xmlsoap.org\/soap\/envelope\/\" xmlns:ser=\"http:\/\/service.pactsoap.com\/\"&gt;&lt;SOAP-ENV:Header\/&gt;&lt;SOAP-ENV:Body&gt;&lt;ser:changeName&gt;&lt;arg0&gt;&lt;name&gt;myName&lt;\/name&gt;&lt;\/arg0&gt;&lt;\/ser:changeName&gt;&lt;\/SOAP-ENV:Body&gt;&lt;\/SOAP-ENV:Envelope&gt;)" })
  </code></pre>