diff --git a/src/main/java/com/gmgauthier/soapmock/config/ApiConfig.java b/src/main/java/com/gmgauthier/soapmock/config/ApiConfig.java index f35a02b..6585d98 100644 --- a/src/main/java/com/gmgauthier/soapmock/config/ApiConfig.java +++ b/src/main/java/com/gmgauthier/soapmock/config/ApiConfig.java @@ -10,6 +10,6 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; public class ApiConfig implements WebMvcConfigurer { @Override public void configureContentNegotiation(final ContentNegotiationConfigurer configurer) { - configurer.defaultContentType(MediaType.valueOf(MediaType.APPLICATION_XML_VALUE)); + configurer.defaultContentType(MediaType.valueOf(MediaType.TEXT_XML_VALUE)); } } \ No newline at end of file diff --git a/src/main/java/com/gmgauthier/soapmock/controllers/MockController.java b/src/main/java/com/gmgauthier/soapmock/controllers/MockController.java index a8ea20d..54f2f64 100644 --- a/src/main/java/com/gmgauthier/soapmock/controllers/MockController.java +++ b/src/main/java/com/gmgauthier/soapmock/controllers/MockController.java @@ -13,16 +13,13 @@ import java.util.Objects; @RestController @RequestMapping( - consumes = MediaType.APPLICATION_XML_VALUE, - produces = MediaType.APPLICATION_XML_VALUE) + consumes = MediaType.TEXT_XML_VALUE, + produces = MediaType.TEXT_XML_VALUE) public class MockController { @PostMapping(path ="/call1") public String postCall1(@RequestBody String xmlRequestBody){ - String responseBody = getStaticResponse("soap-example.xml"); - System.out.println(xmlRequestBody); - System.out.println(responseBody); - return responseBody; + return getStaticResponse("soap-example.xml"); } private String getStaticResponse(String fileName){ diff --git a/src/main/resources/static/requests/soap-example.xml b/src/main/resources/static/requests/soap-example.xml index 08e7a14..26876eb 100644 --- a/src/main/resources/static/requests/soap-example.xml +++ b/src/main/resources/static/requests/soap-example.xml @@ -1,4 +1,4 @@ - + diff --git a/src/main/resources/static/responses/soap-example.xml b/src/main/resources/static/responses/soap-example.xml index 4e7637e..297ae6e 100644 --- a/src/main/resources/static/responses/soap-example.xml +++ b/src/main/resources/static/responses/soap-example.xml @@ -1,4 +1,4 @@ - +