0

我们正在使用原子事务在 Weblogic 12c 上运行 Web 服务。当抛出异常时,错误消息不会通过 SOAP 故障传播到客户端。

@WebService(
        serviceName = "UpdateService",
        portName = "UpdatePort",
        targetNamespace = "http://www.test.com/ws/update",
        wsdlLocation = "WEB-INF/wsdl/Update.wsdl",
        endpointInterface = "com.test.update.UpdatePortType")
@BindingType("http://schemas.xmlsoap.org/wsdl/soap/http")
public class UpdatePortImpl extends AbstractPort implements UpdatePortType {
...

    @Transactional(value = Transactional.TransactionFlowType.MANDATORY, version = Transactional.Version.WSAT11)
    @Override
    public UpdateType execute(UpdateRequestType part) {

...
       throw new WebServiceException("Unable to check if the user is admin!");

...

    }
}

已经尝试抛出 WebServiceException、RuntimeException 和 SOAPFaultException,总是相同的行为,客户端只收到一个 HTTP ERROR 500,但缺少详细原因:

HTTP/1.1 500 Internal Server Error
Date: : Wed, 10 Nov 2021 16:40:35 GMT
Transfer-Encoding: : chunked
X-ORACLE-DMS-ECID: 005o77YbzKL8hoGLyy4EyW0002uI0001eq
X-ORACLE-DMS-RID: 0:1:1
4

0 回答 0