1 55 package org.jboss.axis.message; 56 57 import org.jboss.axis.AxisFault; 58 import org.jboss.axis.Constants; 59 import org.jboss.axis.encoding.DeserializationContext; 60 import org.jboss.axis.utils.Messages; 61 import org.w3c.dom.Element ; 62 import org.xml.sax.Attributes ; 63 64 import javax.xml.soap.Name ; 65 import javax.xml.soap.SOAPElement ; 66 import javax.xml.soap.SOAPException ; 67 68 75 public class SOAPHeaderElementAxisImpl extends SOAPHeaderElementImpl 76 { 77 protected boolean processed; 78 79 public SOAPHeaderElementAxisImpl(String namespace, String localPart) 80 { 81 super(namespace, localPart); 82 } 83 84 public SOAPHeaderElementAxisImpl(Name name) 85 { 86 super(name); 87 } 88 89 public SOAPHeaderElementAxisImpl(String namespace, String localPart, Object value) 90 { 91 super(namespace, localPart, value); 92 } 93 94 public SOAPHeaderElementAxisImpl(Element elem) 95 { 96 super(elem); 97 } 98 99 public SOAPHeaderElementAxisImpl(String namespace, String localPart, String prefix, Attributes attributes, DeserializationContext context) 100 throws AxisFault 101 { 102 super(namespace, localPart, prefix, attributes, context); 103 } 104 105 public void setParentElement(SOAPElement parent) throws SOAPException 106 { 107 if (parent == null) 108 throw new IllegalArgumentException (Messages.getMessage("nullParent00")); 109 if (!(parent instanceof SOAPHeaderAxisImpl)) 110 throw new IllegalArgumentException (Messages.getMessage("illegalArgumentException00")); 111 try 112 { 113 super.setParentElement(parent); 114 } 115 catch (Throwable t) 116 { 117 throw new SOAPException (t); 118 } 119 } 120 121 123 public boolean getMustUnderstand() 124 { 125 String envURI = Constants.URI_SOAP11_ENV; 126 String val = getAttributeNS(envURI, Constants.ATTR_MUST_UNDERSTAND); 127 return "1".equals(val); 128 } 129 130 public void setMustUnderstand(boolean mustUnderstand) 131 { 132 String envURI = Constants.URI_SOAP11_ENV; 133 String prefix = Constants.NS_PREFIX_SOAP_ENV; 134 String val = mustUnderstand ? "1" : "0"; 135 setAttributeNS(envURI, prefix + ":" + Constants.ATTR_MUST_UNDERSTAND, val); 136 } 137 138 public String getActor() 139 { 140 String envURI = Constants.URI_SOAP11_ENV; 141 String actor = getAttributeNS(envURI, Constants.ATTR_ACTOR); 142 return actor; 143 } 144 145 public void setActor(String actor) 146 { 147 String envURI = Constants.URI_SOAP11_ENV; 148 String prefix = Constants.NS_PREFIX_SOAP_ENV; 149 setAttributeNS(envURI, prefix + ":" + Constants.ATTR_ACTOR, actor); 150 } 151 152 public String getRole() 153 { 154 return getActor(); 155 } 156 157 public void setRole(String role) 158 { 159 setActor(role); 160 } 161 162 public void setProcessed(boolean value) 163 { 164 processed = value; 165 } 166 167 public boolean isProcessed() 168 { 169 return (processed); 170 } 171 } 172 | Popular Tags |