简体   繁体   English

JAX-RPC(Soap)Web服务上的Weblogic / JRockit异常处理

[英]Weblogic/JRockit Exception handling on JAX-RPC (Soap) webservices

I am maintaining old soap webservices running on JAX-RPC (Weblogic implementation). 我正在维护在JAX-RPC(Weblogic实现)上运行的旧肥皂Web服务。 But I am experiencing an NPE without any complete stack trace : 但是我遇到了没有任何完整堆栈跟踪的NPE:

<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Header/><env:Body><env:Fault><faultcode>env:Server</faultcode><faultstring>Failed to invoke end component com.old.service.MyService (POJO), operation=listUsers
 -&gt; Failed to invoke method
</faultstring><detail><java:string xmlns:java="java.io">java.lang.NullPointerException
</java:string></detail></env:Fault></env:Body></env:Envelope> 

Is there is a way to find the full stack trace ? 有没有办法找到完整的堆栈跟踪? Is there is a way to programmatically handling webservices exception like @HandlerChain annotation in Jax-WS (for logging purpose) ? 有没有一种方法可以以编程方式处理Jax-WS中的@HandlerChain批注之类的Web服务异常(用于日志记录)?

Solution : 解决方案:

I finally found a solution here : https://docs.oracle.com/middleware/1212/wls/WSRPC/jax-rpc-handlers.htm#WSRPC414 by using @HandlerChain(file = "jaxrpc-soap-handler-chain.xml", name="JaxRpcSOAPHandlerChain") with specific handler config file (with BEA namespaces instead of JEE namespaces) that references a class that implements javax.xml.rpc.handler.Handler 我终于在这里找到一个解决方案: https : @HandlerChain(file = "jaxrpc-soap-handler-chain.xml", name="JaxRpcSOAPHandlerChain")通过使用@HandlerChain(file = "jaxrpc-soap-handler-chain.xml", name="JaxRpcSOAPHandlerChain")和特定的处理程序配置文件(使用BEA命名空间而不是JEE命名空间),该文件引用实现javax.xml.rpc.handler.Handler的类

jaxrpc-soap-handler-chain.xml : jaxrpc-soap-handler-chain.xml

<?xml version="1.0" encoding="UTF-8" ?>
<jwshc:handler-config xmlns:jwshc="http://www.bea.com/xml/ns/jws"
    xmlns:soap1="http://HandlerInfo.org/Server1" xmlns:soap2="http://HandlerInfo.org/Server2"
    xmlns="http://java.sun.com/xml/ns/j2ee">
    <jwshc:handler-chain>
        <jwshc:handler-chain-name>JaxRpcSOAPHandlerChain</jwshc:handler-chain-name>
        <jwshc:handler>
            <handler-name>JaxRpcSOAPLoggerHandler</handler-name>
            <handler-class>com.old.service.ws.handler.JaxRpcSOAPLoggerHandler</handler-class>
        </jwshc:handler>
    </jwshc:handler-chain>
</jwshc:handler-config>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM