{
/* QNameListOrTokenAnyAttrImpl is the class registered for this extension attribute. Use this type
* here, rather than the QNameListOrTokenAttr interface, to gaurantee that if the code contains an
* xs:token it is of type #any.
*/
QNameListOrTokenAnyAttrImpl subcodes = (QNameListOrTokenAnyAttrImpl) ((WSDLElement)getParent())
.getExtensionAttribute(SOAPConstants.Q_ATTR_SOAP_SUBCODES);
if(subcodes == null)
{
//defaults to xs:token #any if the attribute is omitted from the WSDL.
return SOAPFaultSubcodes.ANY;
}
if(subcodes.isToken()) {
return SOAPFaultSubcodes.ANY;
}
if(subcodes.isQNameList())
{
return new SOAPFaultSubcodes(subcodes.getQNames());
}
else
{
//the wsoap:subcodes attribute contains an invalid value (i.e. not a list of xs:QName or the xs:token #any)
//TODO confirm if this should be represented in the Component model as a null