diff --git a/saml/saml-protocol/src/main/java/org/keycloak/protocol/saml/SamlService.java b/saml/saml-protocol/src/main/java/org/keycloak/protocol/saml/SamlService.java index df3bb4e0ac..b598576531 100755 --- a/saml/saml-protocol/src/main/java/org/keycloak/protocol/saml/SamlService.java +++ b/saml/saml-protocol/src/main/java/org/keycloak/protocol/saml/SamlService.java @@ -554,7 +554,7 @@ public class SamlService extends AuthorizationEndpointBase { } @POST - @Consumes("application/soap+xml") + @Consumes({"application/soap+xml",MediaType.TEXT_XML}) public Response soapBinding(InputStream inputStream) { SamlEcpProfileService bindingService = new SamlEcpProfileService(realm, event); diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/saml/SamlEcpProfileTest.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/saml/SamlEcpProfileTest.java index c02deeb3b9..8027ae6e16 100755 --- a/testsuite/integration/src/test/java/org/keycloak/testsuite/saml/SamlEcpProfileTest.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/saml/SamlEcpProfileTest.java @@ -108,7 +108,7 @@ public class SamlEcpProfileTest { Response authenticationResponse = ClientBuilder.newClient().target(singleSignOnService).request() .header(HttpHeaders.AUTHORIZATION, authHeader) - .post(Entity.entity(DocumentUtil.asString(authenticationRequest), "application/soap+xml")); + .post(Entity.entity(DocumentUtil.asString(authenticationRequest), "text/xml")); assertEquals(OK.getStatusCode(), authenticationResponse.getStatus());