Tag: jax ws

JAX-WS – 映射故障的例外

我正在使用JAX WS来公开WebService。 此服务的某些操作可能会生成exception。 不是内部服务器exception,而是依赖于操作调用的输入参数的exception。 如果我指定我的操作抛出自定义exception,如下所示: @WebService @SOAPBinding(style = Style.RPC, use = Use.LITERAL) public class MyServiceEndpointImpl implements MyServiceEndpoint { @WebMethod public void throwsException throws InvalidInputException; } 运行应用程序时,我最终得到以下堆栈跟踪: com.sun.xml.ws.model.RuntimeModelerException: runtime modeler error: Wrapper class com.mypackage.ws.services.jaxws.InvalidInputExceptionBean is not found. Have you run APT to generate them? at com.sun.xml.ws.model.RuntimeModeler.getClass(RuntimeModeler.java:285) at com.sun.xml.ws.model.RuntimeModeler.processExceptions(RuntimeModeler.java:1006) at com.sun.xml.ws.model.RuntimeModeler.processRpcMethod(RuntimeModeler.java:969) at com.sun.xml.ws.model.RuntimeModeler.processMethod(RuntimeModeler.java:546) at com.sun.xml.ws.model.RuntimeModeler.processClass(RuntimeModeler.java:370) at com.sun.xml.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:256) […]