/** * Clear the soap MustUnderstand. * * @param soapHeader The SOAP header. * @param soapHeaderElement The SOAP header element. */ private void clearMustUnderstand( final SOAPHeader soapHeader, final SOAPHeaderElement soapHeaderElement) throws SOAPException { final Name headerName = soapHeader.getElementName(); final SOAPFactory factory = SOAPFactory.newInstance(); final Name attributeName = factory.createName("mustUnderstand", headerName.getPrefix(), headerName.getURI()); soapHeaderElement.removeAttribute(attributeName); }
private SOAPHeaderElement getHeaderElement( final SOAPHeader soapHeader, final String uri, final String name) throws SOAPException { if (soapHeader != null) { final Iterator headerIter = SOAPUtil.getChildElements(soapHeader); while (headerIter.hasNext()) { final SOAPHeaderElement current = (SOAPHeaderElement) headerIter.next(); final Name currentName = current.getElementName(); if ((currentName != null) && match(name, currentName.getLocalName()) && match(uri, currentName.getURI())) { return current; } } } return null; }