/** * Get the fault body type for the given fault of the given operation. * * @param operation * @param faultName * @return Use.ENCODED or Use.LITERAL */ public Use getFaultBodyType(Operation operation, String faultName) { OperationAttr attr = (OperationAttr) attributes.get(operation); if (attr == null) { return Use.ENCODED; // should really create an exception for this. } else { HashMap m = attr.getFaultBodyTypeMap(); SOAPFault soapFault = (SOAPFault) m.get(faultName); // This should never happen (error thrown in SymbolTable) if (soapFault == null) { return Use.ENCODED; } String use = soapFault.getUse(); if ("literal".equals(use)) { return Use.LITERAL; } return Use.ENCODED; } }
/** * Get the fault body type for the given fault of the given operation. * * @param operation * @param faultName * @return Use.ENCODED or Use.LITERAL */ public Use getFaultBodyType(Operation operation, String faultName) { OperationAttr attr = (OperationAttr) attributes.get(operation); if (attr == null) { return Use.ENCODED; // should really create an exception for this. } else { HashMap m = attr.getFaultBodyTypeMap(); SOAPFault soapFault = (SOAPFault) m.get(faultName); // This should never happen (error thrown in SymbolTable) if (soapFault == null) { return Use.ENCODED; } String use = soapFault.getUse(); if ("literal".equals(use)) { return Use.LITERAL; } return Use.ENCODED; } }
/** * Get the fault body type for the given fault of the given operation. * * @param operation * @param faultName * @return Use.ENCODED or Use.LITERAL */ public Use getFaultBodyType(Operation operation, String faultName) { OperationAttr attr = (OperationAttr) attributes.get(operation); if (attr == null) { return Use.ENCODED; // should really create an exception for this. } else { HashMap m = attr.getFaultBodyTypeMap(); SOAPFault soapFault = (SOAPFault) m.get(faultName); // This should never happen (error thrown in SymbolTable) if (soapFault == null) { return Use.ENCODED; } String use = soapFault.getUse(); if ("literal".equals(use)) { return Use.LITERAL; } return Use.ENCODED; } }