}
// Set the encoding style to the attribute value. If null,
// we just automatically use our parent's (see getEncodingStyle)
MessageContext mc = context.getMessageContext();
SOAPConstants sc = (mc != null) ?
mc.getSOAPConstants() :
SOAPConstants.SOAP11_CONSTANTS;
href = attributes.getValue(sc.getAttrHref());
// If there's an arrayType attribute, we can pretty well guess that we're an Array???
if (attributes.getValue(Constants.URI_DEFAULT_SOAP_ENC, Constants.ATTR_ARRAY_TYPE) != null) {
typeQName = Constants.SOAP_ARRAY;
}
encodingStyle =
attributes.getValue(sc.getEncodingURI(),
Constants.ATTR_ENCODING_STYLE);
// if no-encoding style was defined, we don't define as well
if (Constants.URI_SOAP12_NOENC.equals(encodingStyle))
encodingStyle = null;
// If we have an encoding style, and are not a MESSAGE style
// operation (in other words - we're going to do some data
// binding), AND we're SOAP 1.2, check the encoding style against
// the ones we've got type mappings registered for. If it isn't
// registered, throw a DataEncodingUnknown fault as per the
// SOAP 1.2 spec.
if (encodingStyle != null &&
sc.equals(SOAPConstants.SOAP12_CONSTANTS) &&
(mc.getOperationStyle() != Style.MESSAGE)) {
TypeMapping tm = mc.getTypeMappingRegistry().
getTypeMapping(encodingStyle);
if (tm == null ||
(tm.equals(mc.getTypeMappingRegistry().