io.quarkiverse.cxf.client.it.CxfClientRestResource Maven / Gradle / Ivy
package io.quarkiverse.cxf.client.it;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.QueryParam;
import jakarta.ws.rs.core.MediaType;
import org.jboss.eap.quickstarts.wscalculator.calculator.CalculatorService;
import io.quarkiverse.cxf.annotation.CXFClient;
@Path("/cxf/calculator-client")
public class CxfClientRestResource {
@CXFClient("myCalculator") // <1>
CalculatorService myCalculator;
@GET
@Path("/add")
@Produces(MediaType.TEXT_PLAIN)
public int add(@QueryParam("a") int a, @QueryParam("b") int b) {
return myCalculator.add(a, b); // <2>
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy