001: /*
002: * The Apache Software License, Version 1.1
003: *
004: *
005: * Copyright (c) 2002 The Apache Software Foundation. All rights
006: * reserved.
007: *
008: * Redistribution and use in source and binary forms, with or without
009: * modification, are permitted provided that the following conditions
010: * are met:
011: *
012: * 1. Redistributions of source code must retain the above copyright
013: * notice, this list of conditions and the following disclaimer.
014: *
015: * 2. Redistributions in binary form must reproduce the above copyright
016: * notice, this list of conditions and the following disclaimer in
017: * the documentation and/or other materials provided with the
018: * distribution.
019: *
020: * 3. The end-user documentation included with the redistribution,
021: * if any, must include the following acknowledgment:
022: * "This product includes software developed by the
023: * Apache Software Foundation (http://www.apache.org/)."
024: * Alternately, this acknowledgment may appear in the software itself,
025: * if and wherever such third-party acknowledgments normally appear.
026: *
027: * 4. The names "WSIF" and "Apache Software Foundation" must
028: * not be used to endorse or promote products derived from this
029: * software without prior written permission. For written
030: * permission, please contact apache@apache.org.
031: *
032: * 5. Products derived from this software may not be called "Apache",
033: * nor may "Apache" appear in their name, without prior written
034: * permission of the Apache Software Foundation.
035: *
036: * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
037: * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
038: * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
039: * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
040: * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
041: * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
042: * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
043: * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
044: * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
045: * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
046: * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
047: * SUCH DAMAGE.
048: * ====================================================================
049: *
050: * This software consists of voluntary contributions made by many
051: * individuals on behalf of the Apache Software Foundation and was
052: * originally based on software copyright (c) 2001, 2002, International
053: * Business Machines, Inc., http://www.apache.org. For more
054: * information on the Apache Software Foundation, please see
055: * <http://www.apache.org/>.
056: */
057:
058: package stockquote.wsifservice;
059:
060: import java.util.Iterator;
061: import java.util.List;
062: import java.util.Map;
063: import javax.wsdl.Message;
064:
065: import org.apache.wsif.WSIFException;
066: import org.apache.wsif.WSIFMessage;
067:
068: public class GetQuoteInputMessage implements WSIFMessage {
069: private String partNames[] = { "symbol" };
070: protected String _symbol;
071: private String representationStyle;
072:
073: public GetQuoteInputMessage() {
074:
075: }
076:
077: public String getName() {
078: return "GetQuoteInput";
079: }
080:
081: public void setName(String s) {
082: }
083:
084: public java.util.Iterator getPartNames() {
085: System.err.println(this .getClass().getName() + "getPartNames");
086: List resp = new java.util.LinkedList();
087: for (int i = 0; i < partNames.length; i++) {
088: resp.add(partNames[i]);
089: }
090: return resp.iterator();
091: }
092:
093: public String getPt_Symbol() {
094: return _symbol;
095: }
096:
097: public void setPt_Symbol(String value) {
098: this ._symbol = value;
099: }
100:
101: public boolean getBooleanPart(String partName) {
102: throw new IllegalArgumentException("Part " + partName
103: + " not found");
104: }
105:
106: public void setBooleanPart(String partName, boolean value) {
107: throw new IllegalArgumentException("Part " + partName
108: + " not found");
109: }
110:
111: public char getCharPart(String partName) {
112: throw new IllegalArgumentException("Part " + partName
113: + " not found");
114: }
115:
116: public void setCharPart(String partName, char value) {
117: throw new IllegalArgumentException("Part " + partName
118: + " not found");
119: }
120:
121: public String getStringPart(String partName) {
122: if (partName.equals("symbol")) {
123: return _symbol;
124: } else
125: throw new IllegalArgumentException("Part " + partName
126: + " not found");
127: }
128:
129: public void setStringPart(String partName, String value) {
130: if (partName.equals("symbol")) {
131: this ._symbol = value;
132: } else
133: throw new IllegalArgumentException("Part " + partName
134: + " not found");
135: }
136:
137: public byte getBytePart(String partName) {
138: throw new IllegalArgumentException("Part " + partName
139: + " not found");
140: }
141:
142: public void setBytePart(String partName, byte value) {
143: throw new IllegalArgumentException("Part " + partName
144: + " not found");
145: }
146:
147: public short getShortPart(String partName) {
148: throw new IllegalArgumentException("Part " + partName
149: + " not found");
150: }
151:
152: public void setShortPart(String partName, short value) {
153: throw new IllegalArgumentException("Part " + partName
154: + " not found");
155: }
156:
157: public int getIntPart(String partName) {
158: throw new IllegalArgumentException("Part " + partName
159: + " not found");
160: }
161:
162: public void setIntPart(String partName, int value) {
163: throw new IllegalArgumentException("Part " + partName
164: + " not found");
165: }
166:
167: public long getLongPart(String partName) {
168: throw new IllegalArgumentException("Part " + partName
169: + " not found");
170: }
171:
172: public void setLongPart(String partName, long value) {
173: throw new IllegalArgumentException("Part " + partName
174: + " not found");
175: }
176:
177: public float getFloatPart(String partName) {
178: throw new IllegalArgumentException("Part " + partName
179: + " not found");
180: }
181:
182: public void setFloatPart(String partName, float value) {
183: throw new IllegalArgumentException("Part " + partName
184: + " not found");
185: }
186:
187: public double getDoublePart(String partName) {
188: throw new IllegalArgumentException("Part " + partName
189: + " not found");
190: }
191:
192: public void setDoublePart(String partName, double value) {
193: throw new IllegalArgumentException("Part " + partName
194: + " not found");
195: }
196:
197: public Object getObjectPart(String partName) {
198: if (partName.equals("symbol")) {
199: return _symbol;
200: } else
201: throw new IllegalArgumentException("Part " + partName
202: + " not found");
203: }
204:
205: public Object getObjectPart(String partName, Class sourceClass) {
206: if (partName.equals("symbol")) {
207: return _symbol;
208: } else
209: throw new IllegalArgumentException("Part " + partName
210: + " not found");
211: }
212:
213: public void setObjectPart(String partName, Object value) {
214: if (partName.equals("symbol")) {
215: this ._symbol = (String) value;
216: } else
217: throw new IllegalArgumentException("Part " + partName
218: + " not found");
219: }
220:
221: public Iterator getParts() {
222: Map resp = new java.util.HashMap();
223: resp.put("symbol", _symbol);
224: return resp.values().iterator();
225: }
226:
227: public void getParts(Map resp) {
228: resp.put("symbol", _symbol);
229: }
230:
231: public void setParts(Map source) {
232: _symbol = (String) source.get("symbol");
233: }
234:
235: private GetQuoteInputMessage(GetQuoteInputMessage msg)
236: throws WSIFException {
237: this .partNames = msg.partNames;
238: this .representationStyle = msg.representationStyle;
239: this ._symbol = new String(msg._symbol);
240: }
241:
242: public String getRepresentationStyle() {
243: return representationStyle;
244: }
245:
246: public void setRepresentationStyle(String style) {
247: representationStyle = style;
248: }
249:
250: public Object clone() throws CloneNotSupportedException {
251: try {
252: return new GetQuoteInputMessage(this );
253: } catch (WSIFException ex) {
254: throw new CloneNotSupportedException(ex.getMessage());
255: }
256: }
257:
258: public Message getMessageDefinition() {
259: return null;
260: }
261:
262: public void setMessageDefinition(Message msgDef) {
263: }
264: }
|