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