DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14371>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14371

Some method presented in Axis API do not work





------- Additional Comments From [EMAIL PROTECTED]  2002-11-07 22:20 -------

This client class do not compile...


import javax.xml.rpc.ParameterMode;
                                           
public class SnlTestDataClientDocumentStyle {
    
    public static void main(String [] args) throws Exception {
        Service service = new Service();
        Call call = (Call) service.createCall();
        call.setEncodingStyle(org.apache.axis.Constants.URI_SOAP11_ENC);
        
        QName qName = new QName
("http://www.snl.com/webservices/test";, "SomeData");
        call.registerTypeMapping(SomeData.class, qName, 
BeanSerializerFactory.class, BeanDeserializerFactory.class, false);
            
        call.setTargetEndpointAddress( new java.net.URL
("http://snlwebtool/webservicestest/test.asmx";) );
        call.setEncodingStyle(null);
        call.addParameter(new QName
("http://www.snl.com/webservices/test";, "Parm"), new QName
("http://www.w3.org/2001/XMLSchema";, "int"), int.class, 
javax.xml.rpc.ParameterMode.IN);
        call.setReturnType(new QName
("http://www.snl.com/webservices/test";, "SomeData"), SomeData.class);
        call.setUseSOAPAction(true);
        call.setSOAPActionURI("http://www.snl.com/webservices/test/GetData";);
        call.setEncodingStyle(null);
        call.setScopedProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, 
Boolean.FALSE);
        call.setScopedProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, 
Boolean.FALSE);
        call.setOperationStyle("wrapped");
        call.setOperationName(new QName
("http://www.snl.com/webservices/test";, "GetData"));
        call.setReturnQName(new QName
("http://www.snl.com/webservices/test";, "GetDataResult"));

        java.lang.Object resp = call.invoke(new java.lang.Object[] {new 
java.lang.Integer(9999)});
        SomeData testData;
        if (resp instanceof java.rmi.RemoteException) {
            throw (java.rmi.RemoteException)resp;
        }
        else {
            try {
               testData = (SomeData) resp;
            } catch (java.lang.Exception _exception) {
               testData = (SomeData) org.apache.axis.utils.JavaUtils.convert
(resp, SomeData.class);
            }
        }            
if(testData != null) System.out.println("User Name:" + testData.getFirstName() 
+ " Age:" + testData.getAge());

    }
}

This auto generated Data class does not complile as well...

/**
 * SomeData.java
 *
 * This file was auto-generated from WSDL
 * by the Apache Axis WSDL2Java emitter.
 */

package com.snl.www;

public class SomeData  implements java.io.Serializable {
    private java.lang.String firstName;
    private java.lang.String lastName;
    private int age;
    private java.util.Calendar birthday;

    public SomeData() {
    }

    public java.lang.String getFirstName() {
        return firstName;
    }

    public void setFirstName(java.lang.String firstName) {
        this.firstName = firstName;
    }

    public java.lang.String getLastName() {
        return lastName;
    }

    public void setLastName(java.lang.String lastName) {
        this.lastName = lastName;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public java.util.Calendar getBirthday() {
        return birthday;
    }

    public void setBirthday(java.util.Calendar birthday) {
        this.birthday = birthday;
    }

    private java.lang.Object __equalsCalc = null;
    public synchronized boolean equals(java.lang.Object obj) {
        if (!(obj instanceof SomeData)) return false;
        SomeData other = (SomeData) obj;
        if (obj == null) return false;
        if (this == obj) return true;
        if (__equalsCalc != null) {
            return (__equalsCalc == obj);
        }
        __equalsCalc = obj;
        boolean _equals;
        _equals = true && 
            ((firstName==null && other.getFirstName()==null) || 
             (firstName!=null &&
              firstName.equals(other.getFirstName()))) &&
            ((lastName==null && other.getLastName()==null) || 
             (lastName!=null &&
              lastName.equals(other.getLastName()))) &&
            age == other.getAge() &&
            ((birthday==null && other.getBirthday()==null) || 
             (birthday!=null &&
              birthday.equals(other.getBirthday())));
        __equalsCalc = null;
        return _equals;
    }

    private boolean __hashCodeCalc = false;
    public synchronized int hashCode() {
        if (__hashCodeCalc) {
            return 0;
        }
        __hashCodeCalc = true;
        int _hashCode = 1;
        if (getFirstName() != null) {
            _hashCode += getFirstName().hashCode();
        }
        if (getLastName() != null) {
            _hashCode += getLastName().hashCode();
        }
        _hashCode += getAge();
        if (getBirthday() != null) {
            _hashCode += getBirthday().hashCode();
        }
        __hashCodeCalc = false;
        return _hashCode;
    }

    // Type metadata
    private static org.apache.axis.description.TypeDesc typeDesc =
        new org.apache.axis.description.TypeDesc(SomeData.class);

    static {
        org.apache.axis.description.FieldDesc field = new 
org.apache.axis.description.ElementDesc();
        field.setFieldName("firstName");
        field.setXmlName(new javax.xml.namespace.QName
("http://www.snl.com/webservices/test";, "FirstName"));
        field.setXmlType(new javax.xml.namespace.QName
("http://www.w3.org/2001/XMLSchema";, "string"));
        field.setMinOccursIs0(true);
        typeDesc.addFieldDesc(field);
        field = new org.apache.axis.description.ElementDesc();
        field.setFieldName("lastName");
        field.setXmlName(new javax.xml.namespace.QName
("http://www.snl.com/webservices/test";, "LastName"));
        field.setXmlType(new javax.xml.namespace.QName
("http://www.w3.org/2001/XMLSchema";, "string"));
        field.setMinOccursIs0(true);
        typeDesc.addFieldDesc(field);
        field = new org.apache.axis.description.ElementDesc();
        field.setFieldName("age");
        field.setXmlName(new javax.xml.namespace.QName
("http://www.snl.com/webservices/test";, "Age"));
        field.setXmlType(new javax.xml.namespace.QName
("http://www.w3.org/2001/XMLSchema";, "int"));
        typeDesc.addFieldDesc(field);
        field = new org.apache.axis.description.ElementDesc();
        field.setFieldName("birthday");
        field.setXmlName(new javax.xml.namespace.QName
("http://www.snl.com/webservices/test";, "Birthday"));
        field.setXmlType(new javax.xml.namespace.QName
("http://www.w3.org/2001/XMLSchema";, "dateTime"));
        typeDesc.addFieldDesc(field);
    };

    /**
     * Return type metadata object
     */
    public static org.apache.axis.description.TypeDesc getTypeDesc() {
        return typeDesc;
    }

    /**
     * Get Custom Serializer
     */
    public static org.apache.axis.encoding.Serializer getSerializer(
           java.lang.String mechType, 
           java.lang.Class _javaType,  
           javax.xml.namespace.QName _xmlType) {
        return 
          new  org.apache.axis.encoding.ser.BeanSerializer(
            _javaType, _xmlType, typeDesc);
    }

    /**
     * Get Custom Deserializer
     */
    public static org.apache.axis.encoding.Deserializer getDeserializer(
           java.lang.String mechType, 
           java.lang.Class _javaType,  
           javax.xml.namespace.QName _xmlType) {
        return 
          new  org.apache.axis.encoding.ser.BeanDeserializer(
            _javaType, _xmlType, typeDesc);
    }

}

Reply via email to