gpt4 book ai didi

java - 当 javax.xml.ws.soap.SOAPFaultException 发生时?

转载 作者:行者123 更新时间:2023-12-01 09:30:38 26 4
gpt4 key购买 nike

调用端口名称 getDUNSProfile() 的代码如下所示:

public class LookupRequestProcessor 
{
protected GetCleanseMatchResponse sendRequest(Request request) throws Exception_Exception, GetDUNSProfileFault, PayloadException
{
return DNBPortUtil.getDunsService().getDUNSProfile();
}
}

我收到如下异常(已使用完整堆栈跟踪更新)

    java.lang.Error: javax.xml.ws.soap.SOAPFaultException: Error in operation: 
at imx.svb.module.getdunsprofile.LookupRequestProcessor.doWork(LookupRequestProcessor.java:478)
at imx.svb.TemplateDatablockProcessor.run(TemplateDatablockProcessor.java:63)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: javax.xml.ws.soap.SOAPFaultException: Error in operation:
at com.sun.xml.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:197)
at com.sun.xml.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:130)
at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:125)
at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:95)
at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:136)
at com.sun.proxy.$Proxy97.getDUNSProfile(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at weblogic.wsee.jaxws.spi.ClientInstanceInvocationHandler.invoke(ClientInstanceInvocationHandler.java:84)
at com.sun.proxy.$Proxy98.getDUNSProfile(Unknown Source)
at imx.svb.module.getdunsprofile.LookupRequestProcessor.sendRequest(LookupRequestProcessor.java:258)
at imx.svb.module.getdunsprofile.LookupRequestProcessor.doWork(LookupRequestProcessor.java:472)

这是否意味着我成功调用该端口?还是还没达到?
消息操作错误是WS服务器返回的异常吗?

最佳答案

您很可能已到达港口。引用the documentation of the Faultthis thread on code ranch似乎表明服务提供商抛出了错误。您可以在代码中添加一个 block 来捕获异常并在调用时抛出 SOAPFault。如果错误处理得当,理想情况下应该为您提供异常发生的原因/代码。

关于java - 当 javax.xml.ws.soap.SOAPFaultException 发生时?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39442974/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com