diff --git a/server/src/com/mirth/connect/connectors/ws/WebServiceConnectorServlet.java b/server/src/com/mirth/connect/connectors/ws/WebServiceConnectorServlet.java index 9582156f5..5728ab5b9 100644 --- a/server/src/com/mirth/connect/connectors/ws/WebServiceConnectorServlet.java +++ b/server/src/com/mirth/connect/connectors/ws/WebServiceConnectorServlet.java @@ -432,8 +432,13 @@ private String buildEnvelope(Definition definition, String operationName, boolea // go through all main elements for (int i = 1; i < schema.getElement().getChildNodes().getLength(); i += 2) { Node node = schema.getElement().getChildNodes().item(i); - String name = node.getAttributes().getNamedItem("name") != null ? node.getAttributes().getNamedItem("name").getNodeValue() : null; - + String name = ""; + try { + name = node.getAttributes().getNamedItem("name").getNodeValue(); + } catch (Exception e) { + name = null; + } + // go through child nodes of all elements related to operationName if (StringUtils.equalsIgnoreCase(name, operationName)) { while (node.getChildNodes().getLength() != 0) {