当前位置: 首页 > 知识库问答 >
问题:

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

皇甫琛
2023-03-14
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)

共有1个答案

松灿
2023-03-14

我也有同样的问题

我通过如下更新WSDL版本解决了它

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

<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>
 类似资料:
  • 将axis2从1.6.2升级到1.7.0后,出现以下异常: “ServiceClass对象不以以下形式实现所需的方法:OMElement” 不同的是命名空间以前是“Axis2ns2”,现在是“nsomzdg”。不知道这是从哪里来的..而且,我并不是通过调用ws restful来获取所有参数,而是只获取第一个参数...

  • 我正在学习WebServices(Axis2) 我使用的是Jboss EAP7.0、eclipse_mars和JDK8以及最新的Axis2(Axis2-1.7.4)。 在运行客户端代码时, 尝试将http://www.w3.org/2004/08/wsdl/in-only更新为http://www.w3.org/ns/wsdl/in-only,并将http://www.w3.org/2004/08

  • 问题内容: 我可以在HTML表单中使用PUT方法将数据从表单发送到服务器吗? 问题答案: XHTML 1.x表单仅支持GET和POST。GET和POST是“ method”属性的唯一允许值。

  • 本文向大家介绍Spring Mvc下实现以文件流方式下载文件的方法示例,包括了Spring Mvc下实现以文件流方式下载文件的方法示例的使用技巧和注意事项,需要的朋友参考一下 项目中需要对一个点击事件进行下载操作,同时通过点击事件,已经可以从jsp页面获取到需要访问的URL和下载的文件名(数据库获取,jsp页面显示)。点击事件JS如下: 该ajax调用后台(checkDownload)方法,首先判

  • 我正在使用AspectJ在类级别和方法级别实现注释驱动程序方面,以用于使用基于Spring代理的AOP的Spring应用程序。 当AnnotationTimeoutAspect暴露于Spring Application并使用时 对于Grails应用程序,设置为Config.groovy或者对于Spring应用程序

  • 本文向大家介绍Python Sqlite3以字典形式返回查询结果的实现方法,包括了Python Sqlite3以字典形式返回查询结果的实现方法的使用技巧和注意事项,需要的朋友参考一下 sqlite3本身并没有像pymysql一样原生提供字典形式的游标。 但官方文档里已经有预留了相应的实现方案。 使用这个函数代替conn.raw_factory属性即可。 官方文档链接 以上就是小编为大家带来的Pyt