*/
public synchronized Callback callbackFromXML(final String xml) throws JGBXException, JGBXFault {
try {
this.reader.parse(new InputSource(new StringReader(xml)));
if (this.handler.getMessageType() == MessageType.METHOD_CALL) {
return new Callback(this.handler.getMethodName(), this.handler.getParameters());
}
else if (this.handler.getMessageType() == MessageType.FAULT) {
@SuppressWarnings("unchecked")
final Map<String, Object> map = (Map<String, Object>) this.handler.getParameters().get(0);
throw new JGBXFault((Integer) map.get("faultCode"), (String) map.get("faultString"));