[英]calling another function from WebService
我有一个关于从另一个包中调用一个包中的java函数的查询。
我在Eclipse中创建了2个项目(例如proj1-简单的java项目,proj2-Web服务项目)。
在proj2内的Web服务中,我从proj1的包funclib中的FooClass {}类中调用了一个函数foo(),但收到错误:“线程“ main” org.apache.axis2.AxisFault中的异常:funclib / FooClass”
我创建了proj1.jar并将其添加到“构建路径”以及“ classpath”中。
如果我将funclib软件包从proj1复制到proj2,那么它可以正常工作。 但是,我想将两个软件包分别保存在2个不同的项目中。 有人知道我该如何解决该错误?
org.apache.axis2.util.Utils.java
...
// If its a REST response the content is not a SOAP envelop and hence we will
// Have use the soap body as the exception
if (messageContext.isDoingREST() && soapBody.getFirstElement() != null) {
return new AxisFault(soapBody.getFirstElement().toString());
}
...
本身被称为:
org.apache.axis2.description.OutInAxisOperation
...
// rampart handlers change the envelope and set the decrypted envelope
// so need to check the new one else resenvelope.hasFault() become false.
resenvelope = responseMessageContext.getEnvelope();
if (resenvelope.hasFault()||responseMessageContext.isProcessingFault()) {
if (options.isExceptionToBeThrownOnSOAPFault()) {
// does the SOAPFault has a detail element for Excpetion
throw Utils.getInboundFaultFromMessageContext(responseMessageContext);
}
}
...
因此,似乎在处理响应时出现问题。 由于可能有上百万个原因,因此我鼓励您在此处放置一个断点并进行调试,以便找出根本原因。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.