001: /*
002: * Licensed to the Apache Software Foundation (ASF) under one
003: * or more contributor license agreements. See the NOTICE file
004: * distributed with this work for additional information
005: * regarding copyright ownership. The ASF licenses this file
006: * to you under the Apache License, Version 2.0 (the
007: * "License"); you may not use this file except in compliance
008: * with the License. You may obtain a copy of the License at
009: *
010: * http://www.apache.org/licenses/LICENSE-2.0
011: *
012: * Unless required by applicable law or agreed to in writing,
013: * software distributed under the License is distributed on an
014: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
015: * KIND, either express or implied. See the License for the
016: * specific language governing permissions and limitations
017: * under the License.
018: */
019:
020: /**
021: * ClientInfo.java
022: *
023: * This file was auto-generated from WSDL
024: * by the Apache Axis2 version: #axisVersion# #today#
025: */package org.apache.axis2.databinding;
026:
027: /** ClientInfo bean class */
028:
029: public class ClientInfo implements org.apache.axis2.databinding.ADBBean {
030: /* This type was generated from the piece of schema that had
031: name = ClientInfo
032: Namespace URI = http://www.wso2.com/types
033: Namespace Prefix = ns1
034: */
035:
036: public ClientInfo(String localName, String localSsn) {
037: this .localName = localName;
038: this .localSsn = localSsn;
039: }
040:
041: public ClientInfo() {
042: }
043:
044: /** field for Name */
045: protected java.lang.String localName;
046:
047: /**
048: * Auto generated getter method
049: *
050: * @return java.lang.String
051: */
052: public java.lang.String getName() {
053: return localName;
054: }
055:
056: /**
057: * Auto generated setter method
058: *
059: * @param param Name
060: */
061: public void setName(java.lang.String param) {
062:
063: this .localName = param;
064: }
065:
066: /** field for Ssn */
067: protected java.lang.String localSsn;
068:
069: /**
070: * Auto generated getter method
071: *
072: * @return java.lang.String
073: */
074: public java.lang.String getSsn() {
075: return localSsn;
076: }
077:
078: /**
079: * Auto generated setter method
080: *
081: * @param param Ssn
082: */
083: public void setSsn(java.lang.String param) {
084:
085: this .localSsn = param;
086: }
087:
088: /** databinding method to get an XML representation of this object */
089: public javax.xml.stream.XMLStreamReader getPullParser(
090: javax.xml.namespace.QName qName) {
091:
092: java.util.ArrayList elementList = new java.util.ArrayList();
093: java.util.ArrayList attribList = new java.util.ArrayList();
094:
095: elementList.add(new javax.xml.namespace.QName(
096: "http://www.wso2.com/types", "name"));
097: elementList
098: .add(org.apache.axis2.databinding.utils.ConverterUtil
099: .convertToString(localName));
100:
101: elementList.add(new javax.xml.namespace.QName(
102: "http://www.wso2.com/types", "ssn"));
103: elementList
104: .add(org.apache.axis2.databinding.utils.ConverterUtil
105: .convertToString(localSsn));
106:
107: return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(
108: qName, elementList.toArray(), attribList.toArray());
109:
110: }
111:
112: /** Factory class that keeps the parse method */
113: public static class Factory {
114: /** static method to create the object */
115: public static ClientInfo parse(
116: javax.xml.stream.XMLStreamReader reader)
117: throws java.lang.Exception {
118: ClientInfo object = new ClientInfo();
119: try {
120: int event = reader.getEventType();
121: int count = 0;
122: int argumentCount = 2;
123: boolean done = false;
124: //event better be a START_ELEMENT. if not we should go up to the start element here
125: while (!reader.isStartElement()) {
126: event = reader.next();
127: }
128:
129: while (!done) {
130: if (javax.xml.stream.XMLStreamConstants.START_ELEMENT == event) {
131:
132: if ("name".equals(reader.getLocalName())) {
133:
134: String content = reader.getElementText();
135: object
136: .setName(org.apache.axis2.databinding.utils.ConverterUtil
137: .convertToString(content));
138: count++;
139:
140: }
141:
142: if ("ssn".equals(reader.getLocalName())) {
143:
144: String content = reader.getElementText();
145: object
146: .setSsn(org.apache.axis2.databinding.utils.ConverterUtil
147: .convertToString(content));
148: count++;
149:
150: }
151:
152: }
153:
154: if (argumentCount == count) {
155: done = true;
156: }
157:
158: if (!done) {
159: event = reader.next();
160: }
161:
162: }
163:
164: } catch (javax.xml.stream.XMLStreamException e) {
165: throw new java.lang.Exception(e);
166: }
167:
168: return object;
169: }
170: }//end of factory class
171:
172: }
|