@Test public void parseSoapHeaderToEmptyMapIfNotParsable() throws SOAPException { assertThat(unit.parseSoapHeader(soapMessage.getSOAPHeader()), equalTo(Collections.<String, String>emptyMap())); }
public Map<String, String> parseSoapHeader(final Element soapHeader) { final NodeList tpicHeaders = soapHeader.getElementsByTagNameNS(TraceeConstants.SOAP_HEADER_NAMESPACE, TraceeConstants.TPIC_HEADER); final HashMap<String, String> contextMap = new HashMap<>(); if (tpicHeaders != null && tpicHeaders.getLength() > 0) { final int items = tpicHeaders.getLength(); for (int i = 0; i < items; i++) { contextMap.putAll(parseTpicHeader((Element) tpicHeaders.item(i))); } } return contextMap; }
SoapHeaderTransport { public Map<String, String> parseSoapHeader(final Element soapHeader) { final NodeList tpicHeaders = soapHeader.getElementsByTagNameNS(TraceeConstants.SOAP_HEADER_NAMESPACE, TraceeConstants.TPIC_HEADER); final HashMap<String, String> contextMap = new HashMap<>(); if (tpicHeaders != null && tpicHeaders.getLength() > 0) { final int items = tpicHeaders.getLength(); for (int i = 0; i < items; i++) { contextMap.putAll(parseTpicHeader((Element) tpicHeaders.item(i))); } } return contextMap; } }
SoapHeaderTransport { public Map<String, String> parseSoapHeader(final Element soapHeader) { final NodeList tpicHeaders = soapHeader.getElementsByTagNameNS(TraceeConstants.SOAP_HEADER_NAMESPACE, TraceeConstants.TPIC_HEADER); final HashMap<String, String> contextMap = new HashMap<>(); if (tpicHeaders != null && tpicHeaders.getLength() > 0) { final int items = tpicHeaders.getLength(); for (int i = 0; i < items; i++) { contextMap.putAll(parseTpicHeader((Element) tpicHeaders.item(i))); } } return contextMap; } SoapHeaderTransport(); }
SoapHeaderTransport { public Map<String, String> parseSoapHeader(final Element soapHeader) { final NodeList tpicHeaders = soapHeader.getElementsByTagNameNS(TraceeConstants.SOAP_HEADER_NAMESPACE, TraceeConstants.TPIC_HEADER); final HashMap<String, String> contextMap = new HashMap<>(); if (tpicHeaders != null && tpicHeaders.getLength() > 0) { final int items = tpicHeaders.getLength(); for (int i = 0; i < items; i++) { contextMap.putAll(parseTpicHeader((Element) tpicHeaders.item(i))); } } return contextMap; } SoapHeaderTransport(); Map<String, String> parseSoapHeader(final Element soapHeader); Map<String, String> parseTpicHeader(final Element element); Map<String, String> parseTpicHeader(final Source source); void renderSoapHeader(final Map<String, String> context, final SOAPHeader soapHeader); void renderSoapHeader(final Map<String, String> context, final Result result); }
SoapHeaderTransport { public Map<String, String> parseSoapHeader(final Element soapHeader) { final NodeList tpicHeaders = soapHeader.getElementsByTagNameNS(TraceeConstants.SOAP_HEADER_NAMESPACE, TraceeConstants.TPIC_HEADER); final HashMap<String, String> contextMap = new HashMap<>(); if (tpicHeaders != null && tpicHeaders.getLength() > 0) { final int items = tpicHeaders.getLength(); for (int i = 0; i < items; i++) { contextMap.putAll(parseTpicHeader((Element) tpicHeaders.item(i))); } } return contextMap; } SoapHeaderTransport(); Map<String, String> parseSoapHeader(final Element soapHeader); Map<String, String> parseTpicHeader(final Element element); Map<String, String> parseTpicHeader(final Source source); void renderSoapHeader(final Map<String, String> context, final SOAPHeader soapHeader); void renderSoapHeader(final Map<String, String> context, final Result result);  }