客户端的代码如下:
public class AppFuncWSDAO  implements java.io.Serializable {
    private java.lang.String id;
    private java.lang.String name;
    private java.lang.String url;
    private java.lang.String opertype;
    private java.lang.String module_id;    public AppFuncWSDAO() {
    }    public AppFuncWSDAO(
           java.lang.String id,
           java.lang.String name,
           java.lang.String url,
           java.lang.String opertype,
           java.lang.String module_id) {
           this.id = id;
           this.name = name;
           this.url = url;
           this.opertype = opertype;
           this.module_id = module_id;
    }
    /**
     * Gets the id value for this AppFuncWSDAO.
     * 
     * @return id
     */
    public java.lang.String getId() {
        return id;
    }
    /**
     * Sets the id value for this AppFuncWSDAO.
     * 
     * @param id
     */
    public void setId(java.lang.String id) {
        this.id = id;
    }
    /**
     * Gets the name value for this AppFuncWSDAO.
     * 
     * @return name
     */
    public java.lang.String getName() {
        return name;
    }
    /**
     * Sets the name value for this AppFuncWSDAO.
     * 
     * @param name
     */
    public void setName(java.lang.String name) {
        this.name = name;
    }
    /**
     * Gets the url value for this AppFuncWSDAO.
     * 
     * @return url
     */
    public java.lang.String getUrl() {
        return url;
    }
    /**
     * Sets the url value for this AppFuncWSDAO.
     * 
     * @param url
     */
    public void setUrl(java.lang.String url) {
        this.url = url;
    }
    /**
     * Gets the opertype value for this AppFuncWSDAO.
     * 
     * @return opertype
     */
    public java.lang.String getOpertype() {
        return opertype;
    }
    /**
     * Sets the opertype value for this AppFuncWSDAO.
     * 
     * @param opertype
     */
    public void setOpertype(java.lang.String opertype) {
        this.opertype = opertype;
    }
    /**
     * Gets the module_id value for this AppFuncWSDAO.
     * 
     * @return module_id
     */
    public java.lang.String getModule_id() {
        return module_id;
    }
    /**
     * Sets the module_id value for this AppFuncWSDAO.
     * 
     * @param module_id
     */
    public void setModule_id(java.lang.String module_id) {
        this.module_id = module_id;
    }    private java.lang.Object __equalsCalc = null;
    public synchronized boolean equals(java.lang.Object obj) {
        if (!(obj instanceof AppFuncWSDAO)) return false;
        AppFuncWSDAO other = (AppFuncWSDAO) obj;
        if (obj == null) return false;
        if (this == obj) return true;
        if (__equalsCalc != null) {
            return (__equalsCalc == obj);
        }
        __equalsCalc = obj;
        boolean _equals;
        _equals = true && 
            ((this.id==null && other.getId()==null) || 
             (this.id!=null &&
              this.id.equals(other.getId()))) &&
            ((this.name==null && other.getName()==null) || 
             (this.name!=null &&
              this.name.equals(other.getName()))) &&
            ((this.url==null && other.getUrl()==null) || 
             (this.url!=null &&
              this.url.equals(other.getUrl()))) &&
            ((this.opertype==null && other.getOpertype()==null) || 
             (this.opertype!=null &&
              this.opertype.equals(other.getOpertype()))) &&
            ((this.module_id==null && other.getModule_id()==null) || 
             (this.module_id!=null &&
              this.module_id.equals(other.getModule_id())));
        __equalsCalc = null;
        return _equals;
    }    private boolean __hashCodeCalc = false;
    public synchronized int hashCode() {
        if (__hashCodeCalc) {
            return 0;
        }
        __hashCodeCalc = true;
        int _hashCode = 1;
        if (getId() != null) {
            _hashCode += getId().hashCode();
        }
        if (getName() != null) {
            _hashCode += getName().hashCode();
        }
        if (getUrl() != null) {
            _hashCode += getUrl().hashCode();
        }
        if (getOpertype() != null) {
            _hashCode += getOpertype().hashCode();
        }
        if (getModule_id() != null) {
            _hashCode += getModule_id().hashCode();
        }
        __hashCodeCalc = false;
        return _hashCode;
    }}

解决方案 »

  1.   

    以往用。net开发同样的web服务时,客户端多生成了一个 ArrayOfAppFuncWSDAO,它包装了AppFuncWSDAO ,但是不知道怎么搞的现在把web服务改成java版后就不生成ArrayOfAppFuncWSDAO了觉得很奇怪,AppFuncWSDAO得定义方法和。net里的一模一样
      

  2.   

    这是我的soapstub代码
    package portalauthenticate;public class UserAppPurViewSoapBindingStub extends org.apache.axis.client.Stub implements portalauthenticate.UserAppPurView {
        private java.util.Vector cachedSerClasses = new java.util.Vector();
        private java.util.Vector cachedSerQNames = new java.util.Vector();
        private java.util.Vector cachedSerFactories = new java.util.Vector();
        private java.util.Vector cachedDeserFactories = new java.util.Vector();    static org.apache.axis.description.OperationDesc [] _operations;    static {
            _operations = new org.apache.axis.description.OperationDesc[5];
            _initOperationDesc1();
        }    private static void _initOperationDesc1(){
            org.apache.axis.description.OperationDesc oper;
            org.apache.axis.description.ParameterDesc param;
            oper = new org.apache.axis.description.OperationDesc();
            oper.setName("main");
            param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "arg"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://webservice.bussiness", "ArrayOf_xsd_string"), java.lang.String[].class, false, false);
            oper.addParameter(param);
            oper.setReturnType(org.apache.axis.encoding.XMLType.AXIS_VOID);
            oper.setStyle(org.apache.axis.constants.Style.RPC);
            oper.setUse(org.apache.axis.constants.Use.ENCODED);
            _operations[0] = oper;        oper = new org.apache.axis.description.OperationDesc();
            oper.setName("getUserPassportFromToken");
            param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "strToken"), 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.addParameter(param);
            oper.setReturnType(new javax.xml.namespace.QName("http://webservice.bussiness", "UserAppPassport"));
            oper.setReturnClass(portalauthenticate.UserAppPassport.class);
            oper.setReturnQName(new javax.xml.namespace.QName("", "getUserPassportFromTokenReturn"));
            oper.setStyle(org.apache.axis.constants.Style.RPC);
            oper.setUse(org.apache.axis.constants.Use.ENCODED);
            _operations[1] = oper;        oper = new org.apache.axis.description.OperationDesc();
            oper.setName("getUserPassportFromAppLoginInfo");
            param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "strAppUserLoginId"), 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.addParameter(param);
            param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "strAppUserLoginPassword"), 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.addParameter(param);
            param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "strAppId"), 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.addParameter(param);
            oper.setReturnType(new javax.xml.namespace.QName("http://webservice.bussiness", "UserAppPassport"));
            oper.setReturnClass(portalauthenticate.UserAppPassport.class);
            oper.setReturnQName(new javax.xml.namespace.QName("", "getUserPassportFromAppLoginInfoReturn"));
            oper.setStyle(org.apache.axis.constants.Style.RPC);
            oper.setUse(org.apache.axis.constants.Use.ENCODED);
            _operations[2] = oper;        oper = new org.apache.axis.description.OperationDesc();
            oper.setName("getAppInfo");
            param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "strAppId"), 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.addParameter(param);
            oper.setReturnType(new javax.xml.namespace.QName("http://webservice.bussiness", "AppInfo"));
            oper.setReturnClass(portalauthenticate.AppInfo.class);
            oper.setReturnQName(new javax.xml.namespace.QName("", "getAppInfoReturn"));
            oper.setStyle(org.apache.axis.constants.Style.RPC);
            oper.setUse(org.apache.axis.constants.Use.ENCODED);
            _operations[3] = oper;        oper = new org.apache.axis.description.OperationDesc();
            oper.setName("changePortalUserPWD");
            param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "strUserId"), 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.addParameter(param);
            param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "strOldPWD"), 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.addParameter(param);
            param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "strNewPWD"), 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.addParameter(param);
            oper.setReturnType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "boolean"));
            oper.setReturnClass(boolean.class);
            oper.setReturnQName(new javax.xml.namespace.QName("", "changePortalUserPWDReturn"));
            oper.setStyle(org.apache.axis.constants.Style.RPC);
            oper.setUse(org.apache.axis.constants.Use.ENCODED);
            _operations[4] = oper;    }