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