HeaderBuilderpublic class HeaderBuilder extends SOAPHandler
Fields Summary |
---|
protected static Log | log | private SOAPHeaderElement | header | private SOAPEnvelope | envelope |
Constructors Summary |
---|
HeaderBuilder(SOAPEnvelope envelope)
this.envelope = envelope;
|
Methods Summary |
---|
public void | onEndChild(java.lang.String namespace, java.lang.String localName, org.apache.axis.encoding.DeserializationContext context)
| public SOAPHandler | onStartChild(java.lang.String namespace, java.lang.String localName, java.lang.String prefix, org.xml.sax.Attributes attributes, org.apache.axis.encoding.DeserializationContext context)
try {
header = new SOAPHeaderElement(namespace, localName, prefix,
attributes, context);
} catch (AxisFault axisFault) {
throw new SAXException(axisFault);
}
SOAPHandler handler = new SOAPHandler();
handler.myElement = header;
return handler;
| public void | startElement(java.lang.String namespace, java.lang.String localName, java.lang.String prefix, org.xml.sax.Attributes attributes, org.apache.axis.encoding.DeserializationContext context)
SOAPConstants soapConstants = context.getSOAPConstants();
if (soapConstants == SOAPConstants.SOAP12_CONSTANTS &&
attributes.getValue(Constants.URI_SOAP12_ENV, Constants.ATTR_ENCODING_STYLE) != null) {
AxisFault fault = new AxisFault(Constants.FAULT_SOAP12_SENDER,
null, Messages.getMessage("noEncodingStyleAttrAppear", "Header"), null, null, null);
throw new SAXException(fault);
}
if (!context.isDoneParsing()) {
if (myElement == null) {
try {
myElement = new SOAPHeader(namespace, localName, prefix,
attributes, context,
envelope.getSOAPConstants());
} catch (AxisFault axisFault) {
throw new SAXException(axisFault);
}
envelope.setHeader((SOAPHeader)myElement);
}
context.pushNewElement(myElement);
}
|
|