View Javadoc

1   /*
2    * Copyright 2005-2010 the original author or authors.
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *      http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  
17  package org.springframework.ws.soap.soap12;
18  
19  import java.util.Iterator;
20  import javax.xml.namespace.QName;
21  
22  import org.springframework.ws.soap.SoapHeader;
23  import org.springframework.ws.soap.SoapHeaderElement;
24  import org.springframework.ws.soap.SoapHeaderException;
25  
26  /**
27   * Subinterface of <code>SoapHeader</code> that exposes SOAP 1.2 functionality.
28   *
29   * @author Arjen Poutsma
30   * @since 1.0.0
31   */
32  public interface Soap12Header extends SoapHeader {
33  
34      /**
35       * Adds a new NotUnderstood <code>SoapHeaderElement</code> this header.
36       *
37       * @param headerName the qualified name of the header that was not understood
38       * @return the created <code>SoapHeaderElement</code>
39       * @throws org.springframework.ws.soap.SoapHeaderException
40       *          if the header cannot be created
41       */
42      SoapHeaderElement addNotUnderstoodHeaderElement(QName headerName);
43  
44      /**
45       * Adds a new Upgrade <code>SoapHeaderElement</code> this header.
46       *
47       * @param supportedSoapUris an array of the URIs of SOAP versions supported
48       * @return the created <code>SoapHeaderElement</code>
49       * @throws org.springframework.ws.soap.SoapHeaderException
50       *          if the header cannot be created
51       */
52      SoapHeaderElement addUpgradeHeaderElement(java.lang.String[] supportedSoapUris);
53  
54      /**
55       * Returns an <code>Iterator</code> over all the {@link SoapHeaderElement header elements} that should be processed
56       * for the given roles. Headers target to the "next" role will always be included, and those targeted to "none" will
57       * never be included.
58       *
59       * @param roles              an array of roles to search for
60       * @param isUltimateReceiver whether to search for headers for the ultimate receiver
61       * @return an iterator over all the header elements that contain the specified roles
62       * @throws SoapHeaderException if the headers cannot be returned
63       * @see SoapHeaderElement
64       */
65      Iterator<SoapHeaderElement> examineHeaderElementsToProcess(String[] roles, boolean isUltimateReceiver) throws SoapHeaderException;
66  
67  
68  }