1 /* 2 * Copyright (c) 2008 Rodrigo Ruiz 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 package org.apache.axis.message.addressing; 17 18 import javax.xml.soap.SOAPEnvelope; 19 import javax.xml.soap.SOAPException; 20 import javax.xml.soap.SOAPHeaderElement; 21 22 import org.apache.axis.types.URI; 23 import org.apache.axis.types.URI.MalformedURIException; 24 import org.w3c.dom.Document; 25 import org.w3c.dom.Element; 26 27 /** 28 * Java content class for ReplyTo element declaration. 29 * <p> 30 * The following schema fragment specifies the expected content contained within 31 * this java content object. (defined at 32 * http://schemas.xmlsoap.org/ws/2004/08/addressing line 81) 33 * <p> 34 * 35 * <pre> 36 * <element 37 * name="ReplyTo" 38 * type="{http://schemas.xmlsoap.org/ws/2004/08/addressing}EndpointReferenceType";/> 39 * </pre> 40 * 41 * @author Davanum Srinivas 42 * @version $Revision: 14 $ 43 */ 44 public class ReplyTo extends EndpointReference { 45 /** 46 * <code>serialVersionUID</code> attribute. 47 */ 48 private static final long serialVersionUID = -1423217018397296743L; 49 50 /** 51 * Constructor ReplyTo. 52 * 53 * @param address ReplyTo Address 54 */ 55 public ReplyTo(Address address) { 56 super(address); 57 } 58 59 /** 60 * Constructor ReplyTo. 61 * 62 * @param endpoint ReplyTo Address 63 */ 64 public ReplyTo(EndpointReferenceType endpoint) { 65 super(endpoint); 66 } 67 68 /** 69 * Constructor ReplyTo. 70 * 71 * @param element Header element 72 * @throws MalformedURIException If an error occurs 73 */ 74 public ReplyTo(SOAPHeaderElement element) throws MalformedURIException { 75 super(element); 76 } 77 78 /** 79 * Constructor ReplyTo. 80 * 81 * @param address ReplyTo Address 82 */ 83 public ReplyTo(URI address) { 84 super(address); 85 } 86 87 /** 88 * {@inheritDoc} 89 */ 90 @Override 91 public Element toDOM(Document doc) { 92 return this.toDOM(doc, Constants.REPLY_TO); 93 } 94 95 /** 96 * {@inheritDoc} 97 */ 98 public SOAPHeaderElement toSOAPHeaderElement(AddressingVersion version, 99 SOAPEnvelope env, String actorURI) throws SOAPException { 100 return this.toSOAPHeaderElement(version, env, actorURI, Constants.REPLY_TO); 101 } 102 }