protected static void handleException(String s) { log.error(s); throw new BaseTransportException(s); }
protected static void handleException(String s) { log.error(s); throw new BaseTransportException(s); }
protected static void handleException(String s, Exception e) { log.error(s, e); throw new BaseTransportException(s, e); }
protected static void handleException(String s, Exception e) { log.error(s, e); throw new BaseTransportException(s, e); }
private MessageFormatter getMessageFormatter(MessageContext msgContext){ try { return MessageProcessorSelector.getMessageFormatter(msgContext); } catch (AxisFault axisFault) { throw new BaseTransportException("Unable to get the message formatter to use"); } }
String msg = "Error loading properties from a file at :" + filePath; log.error(msg, e); throw new BaseTransportException(msg, e); } finally { try {
String msg = "Error loading properties from a file at :" + filePath; log.error(msg, e); throw new BaseTransportException(msg, e); } finally { try {
/** * Get the MessageFormatter for the given message. * @param msgContext the axis message context * @return the MessageFormatter to be used */ public static MessageFormatter getMessageFormatter(MessageContext msgContext) { // check the first element of the SOAP body, do we have content wrapped using the // default wrapper elements for binary (BaseConstants.DEFAULT_BINARY_WRAPPER) or // text (BaseConstants.DEFAULT_TEXT_WRAPPER) ? If so, select the appropriate // message formatter directly ... OMElement firstChild = msgContext.getEnvelope().getBody().getFirstElement(); if (firstChild != null) { if (BaseConstants.DEFAULT_BINARY_WRAPPER.equals(firstChild.getQName())) { return new BinaryFormatter(); } else if (BaseConstants.DEFAULT_TEXT_WRAPPER.equals(firstChild.getQName())) { return new PlainTextFormatter(); } } // ... otherwise, let Axis choose the right message formatter: try { return MessageProcessorSelector.getMessageFormatter(msgContext); } catch (AxisFault axisFault) { throw new BaseTransportException("Unable to get the message formatter to use"); } }
/** * Get the MessageFormatter for the given message. * @param msgContext the axis message context * @return the MessageFormatter to be used */ public static MessageFormatter getMessageFormatter(MessageContext msgContext) { // check the first element of the SOAP body, do we have content wrapped using the // default wrapper elements for binary (BaseConstants.DEFAULT_BINARY_WRAPPER) or // text (BaseConstants.DEFAULT_TEXT_WRAPPER) ? If so, select the appropriate // message formatter directly ... OMElement firstChild = msgContext.getEnvelope().getBody().getFirstElement(); if (firstChild != null) { if (BaseConstants.DEFAULT_BINARY_WRAPPER.equals(firstChild.getQName())) { return new BinaryFormatter(); } else if (BaseConstants.DEFAULT_TEXT_WRAPPER.equals(firstChild.getQName())) { return new PlainTextFormatter(); } } // ... otherwise, let Axis choose the right message formatter: try { return MessageProcessorSelector.getMessageFormatter(msgContext); } catch (AxisFault axisFault) { throw new BaseTransportException("Unable to get the message formatter to use"); } }