Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test SOAP 1.2 with custom content type #1670

Merged
merged 1 commit into from
Dec 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,14 @@ quarkus.cxf.client.soap12.logging.enabled = true

quarkus.cxf.client.contentType.client-endpoint-url = http://localhost:${quarkus.http.test-port}/soap/soap12
quarkus.cxf.client.contentType.service-interface = io.quarkiverse.cxf.it.HelloService
#quarkus.cxf.client.contentType.soap-binding = http://www.w3.org/2003/05/soap/bindings/HTTP/
quarkus.cxf.client.contentType.content-type = application/soap+xml; action="contentTypeAction"
quarkus.cxf.client.contentType.content-type = application/soap+xml; action="helloAction"; foo=bar
quarkus.cxf.client.contentType.logging.enabled = true

quarkus.cxf.client.contentTypeSoap12.client-endpoint-url = http://localhost:${quarkus.http.test-port}/soap/soap12
quarkus.cxf.client.contentTypeSoap12.soap-binding = http://www.w3.org/2003/05/soap/bindings/HTTP/
quarkus.cxf.client.contentTypeSoap12.content-type = application/soap+xml; action="helloAction"; foo=bar
quarkus.cxf.client.contentTypeSoap12.logging.enabled = true

quarkus.cxf.endpoint."/soap12".implementor = io.quarkiverse.cxf.it.soap12.Soap12HelloServiceImpl
quarkus.cxf.endpoint."/soap12".soap-binding = http://www.w3.org/2003/05/soap/bindings/HTTP/
quarkus.cxf.endpoint."/soap12".logging.enabled = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ public class Soap12Rest {
@CXFClient("contentType")
HelloService contentType;

@CXFClient("contentTypeSoap12")
HelloService contentTypeSoap12;

HelloService getClient(String clientName) {
switch (clientName) {
case "soap12": {
Expand All @@ -26,6 +29,9 @@ HelloService getClient(String clientName) {
case "contentType": {
return contentType;
}
case "contentTypeSoap12": {
return contentTypeSoap12;
}
default:
throw new IllegalArgumentException("Unexpected client name: " + clientName);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,14 @@ quarkus.cxf.client.soap12.logging.enabled = true

quarkus.cxf.client.contentType.client-endpoint-url = http://localhost:${quarkus.http.test-port}/soap/soap12
quarkus.cxf.client.contentType.service-interface = io.quarkiverse.cxf.it.HelloService
#quarkus.cxf.client.contentType.soap-binding = http://www.w3.org/2003/05/soap/bindings/HTTP/
quarkus.cxf.client.contentType.content-type = application/soap+xml; action="contentTypeAction"
quarkus.cxf.client.contentType.content-type = application/soap+xml; action="helloAction"; foo=bar
quarkus.cxf.client.contentType.logging.enabled = true

quarkus.cxf.client.contentTypeSoap12.client-endpoint-url = http://localhost:${quarkus.http.test-port}/soap/soap12
quarkus.cxf.client.contentTypeSoap12.soap-binding = http://www.w3.org/2003/05/soap/bindings/HTTP/
quarkus.cxf.client.contentTypeSoap12.content-type = application/soap+xml; action="helloAction"; foo=bar
quarkus.cxf.client.contentTypeSoap12.logging.enabled = true

quarkus.cxf.endpoint."/soap12".implementor = io.quarkiverse.cxf.it.soap12.Soap12HelloServiceImpl
quarkus.cxf.endpoint."/soap12".soap-binding = http://www.w3.org/2003/05/soap/bindings/HTTP/
quarkus.cxf.endpoint."/soap12".logging.enabled = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,18 @@ void contentType() {
.then()
.statusCode(200)
.body(Matchers
.is("Hello Joe, Content-Type: application/soap+xml; action=\"contentTypeAction\"; charset=UTF-8"));
.is("Hello Joe, Content-Type: application/soap+xml; action=\"helloAction\"; foo=bar; charset=UTF-8"));
}

@Test
void contentTypeSoap12() {
RestAssured.given()
.body("Joe")
.post("/Soap12Rest/sync/contentTypeSoap12")
.then()
.statusCode(200)
.body(Matchers
.is("Hello Joe, Content-Type: application/soap+xml; action=\"helloAction\"; foo=bar; charset=UTF-8"));
}

}
Loading