Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//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 "ResponseHeader".
     *
     * @param soapHeader the soap header
     * @return the {@code Node} that contains elements such as "responseTime"
     */
    public static Node extractResponseHeaderNode(Node soapHeader) {
        if (soapHeader.getFirstChild() != null
                && soapHeader.getFirstChild().getLocalName().equals("ResponseHeader")) {
            return soapHeader.getFirstChild();
        } else {
            return soapHeader;
        }
    }
}