Skip to content

Commit

Permalink
Pull request #785: fix npe
Browse files Browse the repository at this point in the history
Merge in MC/connect from ROCKSOLID-12154-fix-npe-from-soapui-removal to development

* commit 'aa2121de2cae506c0cd0a37f38179e064b185894':
  fix npe
  • Loading branch information
lmillergithub authored and narupley committed Jan 17, 2024
2 parents 196f418 + aa2121d commit 088d4b3
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 088d4b3

Please sign in to comment.