Java tutorial
//package com.java2s; // Licensed under the Apache License, Version 2.0 (the "License"); import org.w3c.dom.Node; public class Main { /** * Extracts the actual header node. This should be updated with each * API update that changes the header object, such as "RequestHeader". * * @param soapHeader the soap header * @return the {@code Node} that contains elements such as "email" and * "clientEmail" */ public static Node extractRequestHeaderNode(Node soapHeader) { if (soapHeader != null && soapHeader.getFirstChild() != null && soapHeader.getFirstChild().getLocalName().equals("RequestHeader")) { return soapHeader.getFirstChild(); } else { return soapHeader; } } }