All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.axiom.soap.SOAPHeader Maven / Gradle / Ivy

There is a newer version: 1.4.0
Show newest version
/*
 * Copyright 2004,2005 The Apache Software Foundation.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.apache.axiom.soap;

import org.apache.axiom.om.OMElement;
import org.apache.axiom.om.OMException;
import org.apache.axiom.om.OMNamespace;

import java.util.ArrayList;
import java.util.Iterator;

/**
 * Interface SOAPHeader
 */
public interface SOAPHeader extends OMElement {
    /**
     * Creates a new SOAPHeaderBlock object initialized with the
     * specified name and adds it to this SOAPHeader object.
     *
     * @param localName
     * @param ns
     * @return the new SOAPHeaderBlock object that was inserted
     *         into this SOAPHeader object
     * @throws org.apache.axiom.om.OMException
     *             if a SOAP error occurs
     */
    public abstract SOAPHeaderBlock addHeaderBlock(String localName,
            OMNamespace ns) throws OMException;

    /**
     * Returns a list of all the SOAPHeaderBlock objects in this
     * SOAPHeader object that have the the specified role. An
     * role is a global attribute that indicates the intermediate parties to
     * whom the message should be sent. An role receives the message and then
     * sends it to the next role. The default role is the ultimate intended
     * recipient for the message, so if no role attribute is included in a
     * SOAPHeader object, the message is sent to its ultimate
     * destination.
     *
     * @param role
     *            a String giving the URI of the role for which
     *            to search
     * @return Returns an Iterator object over all the 
     *         SOAPHeaderBlock objects that contain the specified role
     * @see #extractHeaderBlocks(java.lang.String)
     *      extractHeaderBlocks(java.lang.String)
     */
    public abstract Iterator examineHeaderBlocks(String role);

    /**
     * Returns a list of all the SOAPHeaderBlock objects in this
     * SOAPHeader object that have the the specified role and
     * detaches them from this SOAPHeader object.
     * 

* This method allows an role to process only the parts of the * SOAPHeader object that apply to it and to remove them before * passing the message on to the next role. * * @param role * a String giving the URI of the role for which * to search * @return Returns an Iterator object over all the * SOAPHeaderBlock objects that contain the specified role * @see #examineHeaderBlocks(java.lang.String) * examineHeaderBlocks(java.lang.String) */ public abstract Iterator extractHeaderBlocks(String role); /** * Returns an Iterator over all the * SOAPHeaderBlock objects in this SOAPHeader * object that have the specified role and that have a MustUnderstand * attribute whose value is equivalent to true. * * @param role * a String giving the URI of the role for which * to search * @return Returns an Iterator object over all the * SOAPHeaderBlock objects that contain the specified * role and are marked as MustUnderstand. */ public abstract Iterator examineMustUnderstandHeaderBlocks(String role); /** * Returns an Iterator over all the * SOAPHeaderBlock objects in this SOAPHeader * object. * * @return an Iterator object over all the * SOAPHeaderBlock objects contained by this * SOAPHeader. If there are no header blocks then an * empty iterator is returned. */ public abstract Iterator examineAllHeaderBlocks(); /** * Returns an Iterator over all the * SOAPHeaderBlock objects in this SOAPHeader * object and detaches them from this SOAPHeader object. * * @return Returns an Iterator object over all the * SOAPHeaderBlock objects contained by this * SOAPHeader */ public abstract Iterator extractAllHeaderBlocks(); /** * Return all the Headers that has the Namespace URI to given NS URI. * * @param nsURI * @return Returns ArrayList. */ public ArrayList getHeaderBlocksWithNSURI(String nsURI); }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy