List of usage examples for javax.xml.soap SOAPBody hasChildNodes
public boolean hasChildNodes();
From source file:nl.nn.adapterframework.extensions.cxf.NamespaceUriProvider.java
public String findNamespaceUri() throws ListenerException { log.debug("trying to find serviceName from soapMessage[" + soapMessage + "]"); try {// w w w .j a va 2 s . com SOAPBody body = soapMessage.getSOAPBody(); if (body.hasChildNodes()) { Iterator<?> it = body.getChildElements(); while (it.hasNext()) { Node node = (Node) it.next(); //Found first namespaceURI if (StringUtils.isNotEmpty(node.getNamespaceURI())) return node.getNamespaceURI(); } } } catch (SOAPException e) { throw new ListenerException(e); } throw new ListenerException("unable to determine serviceName from NamespaceURI"); }