1 4 5 9 10 package org.openlaszlo.remote.soap; 11 12 import java.util.*; 13 14 public class LZSOAPMessage 15 { 16 String mName; 17 String mMode; 18 String mUse = null; 19 Set mPartNames = null; 20 List mParts = null; 21 22 26 public LZSOAPMessage(String name, String mode) { 27 mName = name; 28 mMode = mode; 29 } 30 31 public String getName() { 32 return mName; 33 } 34 35 public String getMode() { 36 return mMode; 37 } 38 39 public void setUse(String use) { 40 mUse = use; 41 } 42 43 public String getUse() { 44 return mUse; 45 } 46 47 public Set getPartNames() { 48 return mPartNames; 49 } 50 51 public void setPartNames(Set partNames) { 52 mPartNames = partNames; 53 } 54 55 public void setParts(List parts) { 56 mParts = parts; 57 } 58 59 public List getParts() { 60 return mParts; 61 } 62 63 void toPartXML(StringBuffer sb) { 64 sb.append("<parts>"); 65 if (mParts != null) { 66 for (int i=0; i < mParts.size(); i++) { 67 LZSOAPPart part = (LZSOAPPart)mParts.get(i); 68 part.toXML(sb); 69 } 70 } 71 sb.append("</parts>"); 72 } 73 74 public void toXML(StringBuffer sb) { 75 sb.append("<message") 76 .append(" name=\"").append(mName).append("\"") 77 .append(" mode=\"").append(mMode).append("\"") 78 .append(" use=\"").append(mUse).append("\"") 79 .append(" partnames=\"").append(mPartNames).append("\"") 80 .append(">"); 81 toPartXML(sb); 82 sb.append("</message>"); 83 } 84 } 85 | Popular Tags |