e.printStackTrace(System.out); result = false; continue;
xmlToken = XmlToken.Factory.parse(picXml); } catch (XmlException xe) { xe.printStackTrace();
} catch (XmlException e) { e.printStackTrace(); } catch (IOException e) {
} catch (XmlException e) { e.printStackTrace(); } catch (IOException e) {
protected EnvelopeDocument addSoapEnvelope(String request, String action) { XmlObject xb_request = null; try { xb_request = XmlObject.Factory.parse(request); } catch (XmlException e) { e.printStackTrace(); } EnvelopeDocument envelope = SoapUtil.wrapToSoapEnvelope(xb_request, action); return envelope; }
public boolean addAlgorithm(Object describeProcess) { String processName = ""; ProcessDescriptionType document = null; try { if(describeProcess instanceof File){ document = ProcessDescriptionType.Factory.parse((File)describeProcess); } if(describeProcess instanceof ProcessDescriptionType){ document = (ProcessDescriptionType) describeProcess; } } catch (IOException e) { LOGGER.warn("Could not add Sextante Extension Process. Identifier: Unknown", e); e.printStackTrace(); } catch (XmlException e) { e.printStackTrace(); } if(describeProcess == null){ throw new RuntimeException("Could not add process"); } registeredProcesses.put(document.getIdentifier().getStringValue(), document); LOGGER.info("Sextante Extension Process "+ processName + " added successfully"); return true; }
} catch (XmlException e) { e.printStackTrace(); } catch (IOException e) {
/** * Method publishSync * * @param message * a String message that should be a valid XML String (serialized XML document) * */ public void publishSync(String message) { try { XmlObject xmlMessage = XmlObject.Factory.parse(message); NotificationType type = MessageUtil.getType(xmlMessage); listener.deliverMessage(topic, type, xmlMessage); } catch (XmlException e) { System.err.println("Error parsing workflow tracking message : [" + message + "]\n" + "as an XML Object"); e.printStackTrace(); } }
@Override public String[] handleResponse(Response response, SoapVersion version) throws SoapUIException { // 响应内容 String responseContent = response.getContentAsString(); try { if(SoapUtils.isSoapFault(responseContent)) { } } catch (XmlException e) { e.printStackTrace(); } return SoapuiResponseUtils.parseResponseToArray(responseContent, version); }
} catch (XmlException e) { e.printStackTrace(); } catch (IOException e) {
private String getTopic(MessageContext context) { SOAPHeader header = context.getEnvelope().getHeader(); OMElement contextHeader = header.getFirstChildWithName(new QName( "http://schemas.airavata.apache.org/workflow-execution-context", "context-header")); String topic = null; try { ContextHeaderDocument document = ContextHeaderDocument.Factory.parse(contextHeader.toStringWithConsume()); topic = document.getContextHeader().getWorkflowMonitoringContext().getWorkflowInstanceId(); } catch (XmlException e) { e.printStackTrace(); // To change body of catch statement use File | Settings | File Templates. } catch (XMLStreamException e) { e.printStackTrace(); // To change body of catch statement use File | Settings | File Templates. } topic = topic.substring(1); return topic.replaceAll("_", "-"); }
public void handleNotification(String message) { XmlObject messageObj = null; try { messageObj = XmlObject.Factory.parse(message); XmlCursor xc = messageObj.newCursor(); xc.toNextToken(); xc.dispose(); } catch (XmlException e) { logger.error("error parsing message content: " + message, e); e.printStackTrace(); } NotificationType type = MessageUtil.getType(messageObj); this.callback.deliverMessage(this.topic, type, messageObj); }
private String getEventBrokerURL(MessageContext context) { SOAPHeader header = context.getEnvelope().getHeader(); OMElement contextHeader = header.getFirstChildWithName(new QName( "http://schemas.airavata.apache.org/workflow-execution-context", "context-header")); String address = null; try { ContextHeaderDocument document = ContextHeaderDocument.Factory.parse(contextHeader.toStringWithConsume()); address = document.getContextHeader().getWorkflowMonitoringContext().getEventPublishEpr(); } catch (XmlException e) { e.printStackTrace(); // To change body of catch statement use File | Settings | File Templates. } catch (XMLStreamException e) { e.printStackTrace(); // To change body of catch statement use File | Settings | File Templates. } return address; }
private String getEventBrokerURL(MessageContext context) { SOAPHeader header = context.getEnvelope().getHeader(); OMElement contextHeader = header.getFirstChildWithName(new QName( "http://airavata.apache.org/schemas/wec/2012/05", "context-header")); String address = null; try { ContextHeaderDocument document = ContextHeaderDocument.Factory.parse(contextHeader.toStringWithConsume()); address = document.getContextHeader().getWorkflowMonitoringContext().getEventPublishEpr(); } catch (XmlException e) { e.printStackTrace(); // To change body of catch statement use File | Settings | File Templates. } catch (XMLStreamException e) { e.printStackTrace(); // To change body of catch statement use File | Settings | File Templates. } return address; }
public static String getFaultCode(SoapVersion soapVersion, String responseContent) { try { XmlObject xmlObject = XmlUtils.createXmlObject(responseContent); Element body = (Element) SoapUtils.getBodyElement(xmlObject, soapVersion).getDomNode(); Element soapenvFault = XmlUtils.getFirstChildElementNS(body, "http://schemas.xmlsoap.org/soap/envelope/", "Fault"); Element faultCode = XmlUtils.getFirstChildElement(soapenvFault, "faultcode"); if (faultCode != null) { return XmlUtils.getElementText(faultCode); } } catch (XmlException e) { e.printStackTrace(); } return null; }
inline.set(xmlToken); } catch (XmlException xe) { xe.printStackTrace();
} catch (XmlException e) { logger.error("error parsing message content: " + messageContent, e); e.printStackTrace();
private String getTopic(MessageContext context) { OMElement contextHeader = getHeader(context); String topic = null; try { ContextHeaderDocument document = ContextHeaderDocument.Factory.parse(contextHeader.toStringWithConsume()); topic = document.getContextHeader().getWorkflowMonitoringContext().getExperimentId(); } catch (XmlException e) { e.printStackTrace(); } catch (XMLStreamException e) { e.printStackTrace(); } return topic; }
private void buildDefault() { try { CTDocDefaults defaults = document.getStyle().getDocDefaults(); // Style aStyle = new Style(DEFAULT_STYLE); stylesMap.add( DEFAULT_STYLE ); cssStyleSheet.startCSSStyleDeclaration( DEFAULT_STYLE ); if ( defaults != null ) { if ( defaults.getPPrDefault().getPPr() != null ) { maptStyleParagraphProperties( defaults.getPPrDefault().getPPr() ); } } cssStyleSheet.endCSSStyleDeclaration(); // stylesMap.put(DEFAULT_STYLE, aStyle); } catch ( XmlException e ) { // TODO Auto-generated catch block e.printStackTrace(); } catch ( IOException e ) { // TODO Auto-generated catch block e.printStackTrace(); } }
xmlToken = XmlToken.Factory.parse(picXml); } catch (XmlException xe) { xe.printStackTrace();