Example of Apache Axis WSDL2Java generated bean class
/**
* Order.java
*
* This file was auto-generated from WSDL
* by the Apache Axis 1.3 Oct 05, 2005 (05:23:37 EDT) WSDL2Java emitter.
*/
package com.acme.service.soap;
public class Order implements java.io.Serializable
{
private java.lang.String date;
private java.lang.String dateOfOrder;
private int order_id;
private com.acme.service.soap.OrderLine[] orders;
private long total;
public Order ()
{
}
public Order (
java.lang.String date,
java.lang.String dateOfOrder,
int order_id,
com.acme.service.soap.OrderLine[] orders,
long total)
{
this.date = date;
this.dateOfOrder = dateOfOrder;
this.order_id = order_id;
this.orders = orders;
this.total = total;
}
/**
* Gets the date value for this Order.
*
* @return date
*/
public java.lang.String getDate()
{
return date;
}
/**
* Sets the date value for this Order.
*
* @param date
*/
public void setDate(java.lang.String date)
{
this.date = date;
}
/**
* Gets the dateOfOrder value for this Order.
*
* @return dateOfOrder
*/
public java.lang.String getDateOfOrder()
{
return dateOfOrder;
}
/**
* Sets the dateOfOrder value for this Order.
*
* @param dateOfOrder
*/
public void setDateOfOrder(java.lang.String dateOfOrder)
{
this.dateOfOrder = dateOfOrder;
}
/**
* Gets the order_id value for this Order.
*
* @return order_id
*/
public int getOrder_id()
{
return order_id;
}
/**
* Sets the order_id value for this Order.
*
* @param order_id
*/
public void setOrder_id(int order_id)
{
this.order_id = order_id;
}
/**
* Gets the orders value for this Order.
*
* @return orders
*/
public com.acme.service.soap.OrderLine[] getOrders()
{
return orders;
}
/**
* Sets the orders value for this Order.
*
* @param orders
*/
public void setOrders(com.acme.service.soap.OrderLine[] orders)
{
this.orders = orders;
}
/**
* Gets the total value for this Order.
*
* @return total
*/
public long getTotal()
{
return total;
}
/**
* Sets the total value for this Order.
*
* @param total
*/
public void setTotal(long total)
{
this.total = total;
}
private java.lang.Object __equalsCalc = null;
public synchronized boolean equals(java.lang.Object obj)
{
if (!(obj instanceof Order)) return false;
Order other = (Order) obj;
if (obj == null) return false;
if (this == obj) return true;
if (__equalsCalc != null) {
return (__equalsCalc == obj);
}
__equalsCalc = obj;
boolean _equals;
equals = true &&
((this.date==null && other.getDate()==null) ||
(this.date!=null &&
this.date.equals(other.getDate()))) &&
((this.dateOfOrder==null && other.getDateOfOrder()==null) ||
(this.dateOfOrder!=null &&
this.dateOfOrder.equals(other.getDateOfOrder()))) &&
this.order_id == other.getOrder_id() &&
((this.orders==null && other.getOrders()==null) ||
(this.orders!=null &&
java.util.Arrays.equals(this.orders, other.getOrders()))) &&
this.total == other.getTotal();
__equalsCalc = null;
return _equals;
}
private boolean __hashCodeCalc = false;
public synchronized int hashCode()
{
if (__hashCodeCalc)
{
return 0;
}
__hashCodeCalc = true;
int _hashCode = 1;
if (getDate() != null)
{
_hashCode += getDate().hashCode();
}
if (getDateOfOrder() != null)
{
_hashCode += getDateOfOrder().hashCode();
}
_hashCode += getOrder_id();
if (getOrders() != null)
{
for (int i=0; i<java.lang.reflect.Array.getLength(getOrders()); i++)
{
java.lang.Object obj = java.lang.reflect.Array.get(getOrders(), i);
if (obj != null &&!obj.getClass().isArray())
{
_hashCode += obj.hashCode();
}
}
}
_hashCode += new Long(getTotal()).hashCode();
__hashCodeCalc = false;
return _hashCode;
}
// Type metadata
private static org.apache.axis.description.TypeDesc typeDesc =
new org.apache.axis.description.TypeDesc(Order.class, true);
static
{
typeDesc.setXmlType(new javax.xml.namespace.QName("http://soap.service.acme.com", "Order"));
org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("date");
elemField.setXmlName(new javax.xml.namespace.QName("", "date"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
elemField.setNillable(true);
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("dateOfOrder");
elemField.setXmlName(new javax.xml.namespace.QName("", "dateOfOrder"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
elemField.setNillable(true);
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("order_id");
elemField.setXmlName(new javax.xml.namespace.QName("", "order_id"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"));
elemField.setNillable(false);
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("orders");
elemField.setXmlName(new javax.xml.namespace.QName("", "orders"));
elemField.setXmlType(new javax.xml.namespace.QName("http://soap.service.acme.com", "OrderLine"));
elemField.setNillable(true);
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("total");
elemField.setXmlName(new javax.xml.namespace.QName("", "total"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "long"));
elemField.setNillable(false);
typeDesc.addFieldDesc(elemField);
}
/**
* 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);
}
}