gpt4 book ai didi

java - ServiceClass对象未实现以下形式的所需方法: OMElement add(OMElement e)

转载 作者:行者123 更新时间:2023-12-02 07:37:57 24 4
gpt4 key购买 nike

我无法弄清楚错误发生在哪里。我检查了 Axis2.xml 并且已经安装了最新的 Axis2 API。我目前使用 Apache Tomcat 8 和 JDK 1.8 进行开发。

Exception in thread "main" org.apache.axis2.AxisFault: The ServiceClass object does not implement the required method in the following form: OMElement add(OMElement e)
at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:508)
at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:368)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:414)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:225)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:150)
at com.test.axis2.AddOperatorStub.add(AddOperatorStub.java:181)
at com.test.axis2.client.AddClientApp.main(AddClientApp.java:29)

最佳答案

我也遇到了同样的问题

我通过更新 WSDL 版本解决了这个问题,如下

http://www.w3.org/ 2004/08/wsdl/in-only --> http://www.w3.org/ ns/wsdl/in-only

&

http://www.w3.org/ 2004/08/wsdl/in-out --> http://www.w3.org/ ns/wsdl/in-out

示例 services.xml

早些时候

<service name="Axis2HelloWorld" >
<Description>
Please Type your service description here
</Description>
<messageReceivers>
<messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only" class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver" />
<messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out" class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
</messageReceivers>
<parameter name="ServiceClass" locked="false">com.ciber.webservices.Axis2HelloWorld</parameter>
</service>

<service name="Axis2HelloWorld" >
<Description>
Please Type your service description here
</Description>
<messageReceivers>
<messageReceiver mep="http://www.w3.org/ns/wsdl/in-only" class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver" />
<messageReceiver mep="http://www.w3.org/ns/wsdl/in-out" class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
</messageReceivers>
<parameter name="ServiceClass" locked="false">com.ciber.webservices.Axis2HelloWorld</parameter>
</service>

关于java - ServiceClass对象未实现以下形式的所需方法: OMElement add(OMElement e),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36319901/

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