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  
18  package org.apache.axis.message.addressing;
19  
20  import org.apache.axis.types.URI;
21  
22  import javax.xml.soap.SOAPHeaderElement;
23  import javax.xml.soap.SOAPEnvelope;
24  
25  import org.w3c.dom.Document;
26  import org.w3c.dom.Element;
27  
28  /***
29   * Java content class for Recipient element declaration.
30   * <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 83)
31   * <p>
32   * <pre>
33   * &lt;element name="Recipient" type="{http://schemas.xmlsoap.org/ws/2004/08/addressing}EndpointReferenceType"/>
34   * </pre>
35   * 
36   * @author Davanum Srinivas (dims@yahoo.com)
37   */
38  public class Recipient extends EndpointReference {
39      /***
40       * Constructor Recipient
41       * 
42       * @param address 
43       */
44      public Recipient(Address address) {
45          super(address);
46      }
47  
48      /***
49       * Constructor Recipient
50       * 
51       * @param uri 
52       */
53      public Recipient(URI uri) {
54          super(uri);
55      }
56  
57      /***
58       * Constructor Recipient
59       * 
60       * @param element
61       * @throws Exception 
62       */
63      public Recipient(SOAPHeaderElement element)
64          throws Exception {
65          super(element);
66      }
67      
68      public SOAPHeaderElement toSOAPHeaderElement(SOAPEnvelope env,
69                                                   String actorURI) 
70          throws Exception {
71          return toSOAPHeaderElement(env, actorURI, Constants.RECIPIENT);
72      }
73  
74      /***
75       * Method toDOM.
76       * 
77       * @param doc 
78       */
79      public Element toDOM(Document doc) {
80          return toDOM(doc, Constants.RECIPIENT);
81      }
82  }
83  
84