1 55 package org.jboss.axis.deployment.wsdd; 56 57 import org.jboss.axis.ConfigurationException; 58 import org.jboss.axis.EngineConfiguration; 59 import org.jboss.axis.Handler; 60 import org.jboss.axis.encoding.SerializationContext; 61 import org.jboss.axis.utils.Messages; 62 import org.w3c.dom.Element ; 63 64 import javax.xml.namespace.QName ; 65 import java.io.IOException ; 66 67 68 73 public class WSDDGlobalConfiguration 74 extends WSDDDeployableItem 75 { 76 private WSDDRequestFlow requestFlow; 77 private WSDDResponseFlow responseFlow; 78 79 82 public WSDDGlobalConfiguration() 83 { 84 } 85 86 90 public WSDDGlobalConfiguration(Element e) 91 throws WSDDException 92 { 93 super(e); 94 Element reqEl = getChildElement(e, ELEM_WSDD_REQFLOW); 95 if (reqEl != null && reqEl.getElementsByTagName("*").getLength() > 0) 96 { 97 requestFlow = new WSDDRequestFlow(reqEl); 98 } 99 Element respEl = getChildElement(e, ELEM_WSDD_RESPFLOW); 100 if (respEl != null && respEl.getElementsByTagName("*").getLength() > 0) 101 { 102 responseFlow = new WSDDResponseFlow(respEl); 103 } 104 } 105 106 protected QName getElementName() 107 { 108 return WSDDConstants.QNAME_GLOBAL; 109 } 110 111 114 public WSDDRequestFlow getRequestFlow() 115 { 116 return requestFlow; 117 } 118 119 122 public void setRequestFlow(WSDDRequestFlow reqFlow) 123 { 124 requestFlow = reqFlow; 125 } 126 127 130 public WSDDResponseFlow getResponseFlow() 131 { 132 return responseFlow; 133 } 134 135 138 public void setResponseFlow(WSDDResponseFlow responseFlow) 139 { 140 this.responseFlow = responseFlow; 141 } 142 143 146 public WSDDFaultFlow[] getFaultFlows() 147 { 148 return null; 149 } 150 151 155 public WSDDFaultFlow getFaultFlow(QName name) 156 { 157 158 WSDDFaultFlow[] t = getFaultFlows(); 159 160 for (int n = 0; n < t.length; n++) 161 { 162 if (t[n].getQName().equals(name)) 163 { 164 return t[n]; 165 } 166 } 167 168 return null; 169 } 170 171 174 public QName getType() 175 { 176 return null; 177 } 178 179 182 public void setType(String type) throws WSDDException 183 { 184 throw new WSDDException(Messages.getMessage("noTypeOnGlobalConfig00")); 185 } 186 187 191 public Handler makeNewInstance(EngineConfiguration registry) 192 { 193 return null; 194 } 195 196 199 public void writeToContext(SerializationContext context) 200 throws IOException 201 { 202 context.startElement(QNAME_GLOBAL, null); 203 writeParamsToContext(context); 204 if (requestFlow != null) 205 requestFlow.writeToContext(context); 206 if (responseFlow != null) 207 responseFlow.writeToContext(context); 208 context.endElement(); 209 } 210 211 public void deployToRegistry(WSDDDeployment registry) 212 throws ConfigurationException 213 { 214 if (requestFlow != null) 215 requestFlow.deployToRegistry(registry); 216 if (responseFlow != null) 217 responseFlow.deployToRegistry(registry); 218 } 219 } 220 221 | Popular Tags |