1 57 58 package stockquote.wsifservice; 59 60 import java.util.Iterator ; 61 import java.util.List ; 62 import java.util.Map ; 63 import javax.wsdl.Message; 64 65 import org.apache.wsif.WSIFException; 66 import org.apache.wsif.WSIFMessage; 67 68 public class GetQuoteInputMessage implements WSIFMessage { 69 private String partNames[] = { "symbol" }; 70 protected String _symbol; 71 private String representationStyle; 72 73 public GetQuoteInputMessage() { 74 75 } 76 public String getName() { 77 return "GetQuoteInput"; 78 } 79 public void setName(String s) { 80 } 81 public java.util.Iterator getPartNames() { 82 System.err.println(this.getClass().getName() + "getPartNames"); 83 List resp = new java.util.LinkedList (); 84 for (int i = 0; i < partNames.length; i++) { 85 resp.add(partNames[i]); 86 } 87 return resp.iterator(); 88 } 89 public String getPt_Symbol() { 90 return _symbol; 91 } 92 public void setPt_Symbol(String value) { 93 this._symbol = value; 94 } 95 public boolean getBooleanPart(String partName) { 96 throw new IllegalArgumentException ("Part " + partName + " not found"); 97 } 98 public void setBooleanPart(String partName, boolean value) { 99 throw new IllegalArgumentException ("Part " + partName + " not found"); 100 } 101 public char getCharPart(String partName) { 102 throw new IllegalArgumentException ("Part " + partName + " not found"); 103 } 104 public void setCharPart(String partName, char value) { 105 throw new IllegalArgumentException ("Part " + partName + " not found"); 106 } 107 public String getStringPart(String partName) { 108 if (partName.equals("symbol")) { 109 return _symbol; 110 } else 111 throw new IllegalArgumentException ("Part " + partName + " not found"); 112 } 113 public void setStringPart(String partName, String value) { 114 if (partName.equals("symbol")) { 115 this._symbol = value; 116 } else 117 throw new IllegalArgumentException ("Part " + partName + " not found"); 118 } 119 public byte getBytePart(String partName) { 120 throw new IllegalArgumentException ("Part " + partName + " not found"); 121 } 122 public void setBytePart(String partName, byte value) { 123 throw new IllegalArgumentException ("Part " + partName + " not found"); 124 } 125 public short getShortPart(String partName) { 126 throw new IllegalArgumentException ("Part " + partName + " not found"); 127 } 128 public void setShortPart(String partName, short value) { 129 throw new IllegalArgumentException ("Part " + partName + " not found"); 130 } 131 public int getIntPart(String partName) { 132 throw new IllegalArgumentException ("Part " + partName + " not found"); 133 } 134 public void setIntPart(String partName, int value) { 135 throw new IllegalArgumentException ("Part " + partName + " not found"); 136 } 137 public long getLongPart(String partName) { 138 throw new IllegalArgumentException ("Part " + partName + " not found"); 139 } 140 public void setLongPart(String partName, long value) { 141 throw new IllegalArgumentException ("Part " + partName + " not found"); 142 } 143 public float getFloatPart(String partName) { 144 throw new IllegalArgumentException ("Part " + partName + " not found"); 145 } 146 public void setFloatPart(String partName, float value) { 147 throw new IllegalArgumentException ("Part " + partName + " not found"); 148 } 149 public double getDoublePart(String partName) { 150 throw new IllegalArgumentException ("Part " + partName + " not found"); 151 } 152 public void setDoublePart(String partName, double value) { 153 throw new IllegalArgumentException ("Part " + partName + " not found"); 154 } 155 public Object getObjectPart(String partName) { 156 if (partName.equals("symbol")) { 157 return _symbol; 158 } else 159 throw new IllegalArgumentException ("Part " + partName + " not found"); 160 } 161 public Object getObjectPart(String partName, Class sourceClass) { 162 if (partName.equals("symbol")) { 163 return _symbol; 164 } else 165 throw new IllegalArgumentException ("Part " + partName + " not found"); 166 } 167 public void setObjectPart(String partName, Object value) { 168 if (partName.equals("symbol")) { 169 this._symbol = (String ) value; 170 } else 171 throw new IllegalArgumentException ("Part " + partName + " not found"); 172 } 173 public Iterator getParts() { 174 Map resp = new java.util.HashMap (); 175 resp.put("symbol", _symbol); 176 return resp.values().iterator(); 177 } 178 public void getParts(Map resp) { 179 resp.put("symbol", _symbol); 180 } 181 public void setParts(Map source) { 182 _symbol = (String ) source.get("symbol"); 183 } 184 private GetQuoteInputMessage(GetQuoteInputMessage msg) throws WSIFException { 185 this.partNames = msg.partNames; 186 this.representationStyle = msg.representationStyle; 187 this._symbol = new String (msg._symbol); 188 } 189 public String getRepresentationStyle() { 190 return representationStyle; 191 } 192 public void setRepresentationStyle(String style) { 193 representationStyle = style; 194 } 195 public Object clone() throws CloneNotSupportedException { 196 try { 197 return new GetQuoteInputMessage(this); 198 } catch (WSIFException ex) { 199 throw new CloneNotSupportedException (ex.getMessage()); 200 } 201 } 202 203 public Message getMessageDefinition() { return null; } 204 205 public void setMessageDefinition(Message msgDef) {} 206 } 207
| Popular Tags
|