}
}
private CorbaTypeImpl convertFaultToCorbaType(XmlSchema xmlSchema, Fault fault) throws Exception {
org.apache.schemas.yoko.bindings.corba.Exception corbaex = null;
XmlSchemaType schemaType = null;
String faultName = fault.getMessage().getQName().getLocalPart();
int pos = faultName.indexOf("_exception.");
if (pos != -1) {
faultName = faultName.substring(pos + 11);
faultName = faultName + "Exception";
}
QName name = helper.createQNameCorbaNamespace(faultName);
Iterator parts = fault.getMessage().getParts().values().iterator();
if (parts.hasNext()) {
Part part = (Part)parts.next();
schemaType = helper.lookUpType(part);
if (schemaType != null && !helper.isSchemaTypeException(schemaType)) {
corbaex = new org.apache.schemas.yoko.bindings.corba.Exception();
corbaex.setName(schemaType.getName());
corbaex.setQName(schemaType.getQName());
CorbaTypeImpl corbaTypeImpl =
helper.convertSchemaToCorbaType(schemaType, part.getTypeName(), null, null, false);
if (corbaTypeImpl != null) {
MemberType member = new MemberType();
member.setName(corbaTypeImpl.getQName().getLocalPart());
member.setIdltype(corbaTypeImpl.getQName());
corbaex.getMember().add(member);
}
} else {
QName elementName = part.getElementName();
QName schematypeName = helper.checkPrefix(schemaType.getQName());
corbaex = createCorbaException(name, schematypeName, schemaType, elementName);
}
} else {
String msgStr = "Fault " + fault.getMessage().getQName().getLocalPart()
+ " INCORRECT_FAULT_MSG.";