Peter Palaga
*) Oversimplyfied
@GET
@Path("/orders")
List<Order> getOrders() {
...
}
github.com/quarkusio/quarkus/issues/4005
1) till it was implemented around 2020
SOAP | REST |
---|---|
HTTP, SMTP, JMS, … | HTTP only |
Single URL per service | Resources identified by URLs |
POST only operation encoded in the message |
HTTP methods have special meaning |
XML only | Typically JSON XML, YAML and others possible |
WSDL: strict contract | OpenAPI |
Still crucial in
finance, travel, healthcare, government services, etc.
The community had to self-organize:
^ Not enough to support it as a RH product
Test coverage, documentation, productization
@WebService(serviceName = "HelloService")
public class HelloServiceImpl implements HelloService {
@WebMethod
public String hello(String greeting, String person) {
return greeting + " " + person + "!";
}
}
quarkus.cxf.client.myCalculator.wsdl = http://localhost:8082/calculator-ws/CalculatorService?wsdl
quarkus.cxf.client.myCalculator.client-endpoint-url = http://localhost:8082/calculator-ws/CalculatorService
quarkus.cxf.client.myCalculator.service-interface = com.acme.calculator.CalculatorService
@ApplicationScoped
public class MyBean {
@CXFClient("myCalculator")
CalculatorService calculator;
...
int result = calculator.add(2, 3);
}