* Write the encoding style attribute IF it's different from
* whatever encoding style is in scope....
*/
if (encodingStyle != null) {
MessageContext mc = context.getMessageContext();
SOAPConstants soapConstants = (mc != null) ?
mc.getSOAPConstants() :
SOAPConstants.SOAP11_CONSTANTS;
if (parent == null) {
// don't emit an encoding style if its "" (literal)
if (!encodingStyle.equals("")) {
setAttribute(soapConstants.getEnvelopeURI(),
Constants.ATTR_ENCODING_STYLE,
encodingStyle);
}
} else if (!encodingStyle.equals(parent.getEncodingStyle())) {
setAttribute(soapConstants.getEnvelopeURI(),
Constants.ATTR_ENCODING_STYLE,
encodingStyle);
}
}