View Javadoc

1   /*
2    * Copyright 2008 University Corporation for Advanced Internet Development, Inc.
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.opensaml.ws.soap.client.http;
18  
19  import net.jcip.annotations.ThreadSafe;
20  
21  import org.opensaml.ws.soap.client.SOAPClient.SOAPRequestParameters;
22  import org.opensaml.xml.util.DatatypeHelper;
23  
24  /** HTTP transported SOAP request parameters. */
25  @ThreadSafe
26  public class HttpSOAPRequestParameters implements SOAPRequestParameters {
27  
28      /** Name of the HTTP SOAPAction header. */
29      public static final String SOAP_ACTION_HEADER = "SOAPAction";
30  
31      /** HTTP SOAPAction header. */
32      private String soapAction;
33  
34      /**
35       * Constructor.
36       * 
37       * @param action value for the SOAPAction HTTP header
38       */
39      public HttpSOAPRequestParameters(String action) {
40          soapAction = DatatypeHelper.safeTrimOrNullString(action);
41      }
42  
43      /**
44       * Gets the HTTP SOAPAction header.
45       * 
46       * @return HTTP SOAPAction header
47       */
48      public String getSoapAction() {
49          return soapAction;
50      }
51  }