首页 > 解决方案 > java.lang.Exception:OperationDesc 未同步到 SoapSkeleton 的方法

问题描述

我正在尝试一种不接受任何参数的方法,但我遇到了 Skeleton 类的问题。

    static {
        org.apache.axis.description.OperationDesc _oper;
        org.apache.axis.description.FaultDesc _fault;
        org.apache.axis.description.ParameterDesc [] _params;

        _params = new org.apache.axis.description.ParameterDesc [] {
            new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("http://www.utl.com/test", "PingRequest"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), java.lang.String.class, false, false),
        };
        _oper = new org.apache.axis.description.OperationDesc("ping", _params, new javax.xml.namespace.QName("http://www.url.com/test", "PingResponse"));
        _oper.setReturnType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        _oper.setElementQName(new javax.xml.namespace.QName("", "Ping"));
        _oper.setSoapAction("http://www.url.com/test/Ping");
        _myOperationsList.add(_oper);
        if (_myOperations.get("ping") == null) {
            _myOperations.put("ping", new java.util.ArrayList());
        }
        ((java.util.List)_myOperations.get("ping")).add(_oper);

当我运行这个程序时,我得到这个错误:

java.lang.Exception: The OperationDesc for ping was not synchronized to a method of com.test.www.url.SellerServicesSoapSkeleton.

我想这是有道理的,因为它描述了尽管没有参数但接受参数。我只是不知道如何改变它,所以它不接受任何东西。

当我在接受参数的方法上运行相同的代码时,一切都很好。

标签: javasoapskeleton-code

解决方案


推荐阅读