View Javadoc

1   /*
2    * Copyright  1999-2004 The Apache Software Foundation.
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.apache.axis.message.addressing;
18  
19  import org.apache.axis.types.URI;
20  
21  import javax.xml.soap.SOAPEnvelope;
22  import javax.xml.soap.SOAPHeaderElement;
23  
24  /***
25   * Java content class for To element declaration.
26   * <p>The following schema fragment specifies the expected content contained within this java content object. (defined at http://schemas.xmlsoap.org/ws/2004/08/addressing line 78)
27   * <p>
28   * <pre>
29   * &lt;element name="To" type="{http://schemas.xmlsoap.org/ws/2004/08/addressing}AttributedURI"/>
30   * </pre>
31   * 
32   * @author Davanum Srinivas (dims@yahoo.com)
33   */
34  public class To extends AttributedURI {
35  
36      /***
37       * Constructor To
38       * 
39       * @param uri 
40       */
41      public To(URI uri) {
42          super(uri);
43      }
44  
45      /***
46       * Constructor To
47       * 
48       * @param uri 
49       */
50      public To(String uri) throws URI.MalformedURIException {
51          super(new URI(uri));
52      }
53  
54      /***
55       * Copy constructor to
56       * 
57       * @param endpoint 
58       */
59      public To(To address) {
60          super(address);
61      }
62  
63      /***
64       * Constructor To
65       * 
66       * @param el 
67       * @throws Exception 
68       */
69      public To(SOAPHeaderElement el) 
70          throws Exception {
71          super(el);
72      }
73  
74      public SOAPHeaderElement toSOAPHeaderElement(SOAPEnvelope env,
75                                                   String actorURI) 
76          throws Exception {
77          return toSOAPHeaderElement(env, actorURI, Constants.TO);
78      }
79      
80      
81  }
82  
83