View Javadoc

1   /**
2    * Envelope.java
3    *
4    * This file was auto-generated from WSDL
5    * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
6    */
7   
8   package org.xmlsoap.schemas.soap.envelope;
9   
10  public class Envelope  implements java.io.Serializable, org.apache.axis.encoding.AnyContentType {
11      private org.xmlsoap.schemas.soap.envelope.Header header;
12  
13      private org.xmlsoap.schemas.soap.envelope.Body body;
14  
15      private org.apache.axis.message.MessageElement [] _any;
16  
17      public Envelope() {
18      }
19  
20      public Envelope(
21             org.xmlsoap.schemas.soap.envelope.Header header,
22             org.xmlsoap.schemas.soap.envelope.Body body,
23             org.apache.axis.message.MessageElement [] _any) {
24             this.header = header;
25             this.body = body;
26             this._any = _any;
27      }
28  
29  
30      /**
31       * Gets the header value for this Envelope.
32       * 
33       * @return header
34       */
35      public org.xmlsoap.schemas.soap.envelope.Header getHeader() {
36          return header;
37      }
38  
39  
40      /**
41       * Sets the header value for this Envelope.
42       * 
43       * @param header
44       */
45      public void setHeader(org.xmlsoap.schemas.soap.envelope.Header header) {
46          this.header = header;
47      }
48  
49  
50      /**
51       * Gets the body value for this Envelope.
52       * 
53       * @return body
54       */
55      public org.xmlsoap.schemas.soap.envelope.Body getBody() {
56          return body;
57      }
58  
59  
60      /**
61       * Sets the body value for this Envelope.
62       * 
63       * @param body
64       */
65      public void setBody(org.xmlsoap.schemas.soap.envelope.Body body) {
66          this.body = body;
67      }
68  
69  
70      /**
71       * Gets the _any value for this Envelope.
72       * 
73       * @return _any
74       */
75      public org.apache.axis.message.MessageElement [] get_any() {
76          return _any;
77      }
78  
79  
80      /**
81       * Sets the _any value for this Envelope.
82       * 
83       * @param _any
84       */
85      public void set_any(org.apache.axis.message.MessageElement [] _any) {
86          this._any = _any;
87      }
88  
89      private java.lang.Object __equalsCalc = null;
90      public synchronized boolean equals(java.lang.Object obj) {
91          if (!(obj instanceof Envelope)) return false;
92          Envelope other = (Envelope) obj;
93          if (obj == null) return false;
94          if (this == obj) return true;
95          if (__equalsCalc != null) {
96              return (__equalsCalc == obj);
97          }
98          __equalsCalc = obj;
99          boolean _equals;
100         _equals = true && 
101             ((this.header==null && other.getHeader()==null) || 
102              (this.header!=null &&
103               this.header.equals(other.getHeader()))) &&
104             ((this.body==null && other.getBody()==null) || 
105              (this.body!=null &&
106               this.body.equals(other.getBody()))) &&
107             ((this._any==null && other.get_any()==null) || 
108              (this._any!=null &&
109               java.util.Arrays.equals(this._any, other.get_any())));
110         __equalsCalc = null;
111         return _equals;
112     }
113 
114     private boolean __hashCodeCalc = false;
115     public synchronized int hashCode() {
116         if (__hashCodeCalc) {
117             return 0;
118         }
119         __hashCodeCalc = true;
120         int _hashCode = 1;
121         if (getHeader() != null) {
122             _hashCode += getHeader().hashCode();
123         }
124         if (getBody() != null) {
125             _hashCode += getBody().hashCode();
126         }
127         if (get_any() != null) {
128             for (int i=0;
129                  i<java.lang.reflect.Array.getLength(get_any());
130                  i++) {
131                 java.lang.Object obj = java.lang.reflect.Array.get(get_any(), i);
132                 if (obj != null &&
133                     !obj.getClass().isArray()) {
134                     _hashCode += obj.hashCode();
135                 }
136             }
137         }
138         __hashCodeCalc = false;
139         return _hashCode;
140     }
141 
142     // Type metadata
143     private static org.apache.axis.description.TypeDesc typeDesc =
144         new org.apache.axis.description.TypeDesc(Envelope.class, true);
145 
146     static {
147         typeDesc.setXmlType(new javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/envelope/", "Envelope"));
148         org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
149         elemField.setFieldName("header");
150         elemField.setXmlName(new javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/envelope/", "Header"));
151         elemField.setXmlType(new javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/envelope/", "Header"));
152         elemField.setMinOccurs(0);
153         elemField.setNillable(false);
154         typeDesc.addFieldDesc(elemField);
155         elemField = new org.apache.axis.description.ElementDesc();
156         elemField.setFieldName("body");
157         elemField.setXmlName(new javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/envelope/", "Body"));
158         elemField.setXmlType(new javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/envelope/", "Body"));
159         elemField.setNillable(false);
160         typeDesc.addFieldDesc(elemField);
161     }
162 
163     /**
164      * Return type metadata object
165      */
166     public static org.apache.axis.description.TypeDesc getTypeDesc() {
167         return typeDesc;
168     }
169 
170     /**
171      * Get Custom Serializer
172      */
173     public static org.apache.axis.encoding.Serializer getSerializer(
174            java.lang.String mechType, 
175            java.lang.Class _javaType,  
176            javax.xml.namespace.QName _xmlType) {
177         return 
178           new  org.apache.axis.encoding.ser.BeanSerializer(
179             _javaType, _xmlType, typeDesc);
180     }
181 
182     /**
183      * Get Custom Deserializer
184      */
185     public static org.apache.axis.encoding.Deserializer getDeserializer(
186            java.lang.String mechType, 
187            java.lang.Class _javaType,  
188            javax.xml.namespace.QName _xmlType) {
189         return 
190           new  org.apache.axis.encoding.ser.BeanDeserializer(
191             _javaType, _xmlType, typeDesc);
192     }
193 
194 }