76 * SOAPEnvelope se = sp.getEnvelope();
77 * se.getHeader().detachNode();
78 * SOAPHeader sh = se.addHeader();
79 * se.getBody().detachNode();
80 * SOAPBody sb = se.addBody();
81 * </PRE>
82 * It is an error to add a <code>SOAPBody</code> or <code>SOAPHeader</code>
83 * object if one already exists.
84 * <P>
85 * The <code>SOAPEnvelope</code> interface provides three methods for creating
86 * <code>Name</code> objects. One method creates <code>Name</code> objects with
87 * a local name, a namespace prefix, and a namesapce URI. The second method creates
88 * <code>Name</code> objects with a local name and a namespace prefix, and the third
89 * creates <code>Name</code> objects with just a local name. The following line of
90 * code, in which <i>se</i> is a <code>SOAPEnvelope</code> object, creates a new
91 * <code>Name</code> object with all three.
92 * <PRE>
93 * Name name = se.createName("GetLastTradePrice", "WOMBAT",
94 * "http://www.wombat.org/trader");
95 * </PRE>
96 */
97 public interface SOAPEnvelope extends SOAPElement {
98
99 /**
100 * Creates a new <code>Name</code> object initialized with the
101 * given local name, namespace prefix, and namespace URI.
102 * <P>
103 * This factory method creates <code>Name</code> objects for use in
104 * the SOAP/XML document.
105 *
106 * @param localName a <code>String</code> giving the local name
107 * @param prefix a <code>String</code> giving the prefix of the namespace
108 * @param uri a <code>String</code> giving the URI of the namespace
109 * @return a <code>Name</code> object initialized with the given
110 * local name, namespace prefix, and namespace URI
111 * @throws SOAPException if there is a SOAP error
112 */
113 public abstract Name createName(String localName, String prefix,
114 String uri)
115 throws SOAPException;
|
76 * SOAPEnvelope se = sp.getEnvelope();
77 * se.getHeader().detachNode();
78 * SOAPHeader sh = se.addHeader();
79 * se.getBody().detachNode();
80 * SOAPBody sb = se.addBody();
81 * </PRE>
82 * It is an error to add a <code>SOAPBody</code> or <code>SOAPHeader</code>
83 * object if one already exists.
84 * <P>
85 * The <code>SOAPEnvelope</code> interface provides three methods for creating
86 * <code>Name</code> objects. One method creates <code>Name</code> objects with
87 * a local name, a namespace prefix, and a namesapce URI. The second method creates
88 * <code>Name</code> objects with a local name and a namespace prefix, and the third
89 * creates <code>Name</code> objects with just a local name. The following line of
90 * code, in which <i>se</i> is a <code>SOAPEnvelope</code> object, creates a new
91 * <code>Name</code> object with all three.
92 * <PRE>
93 * Name name = se.createName("GetLastTradePrice", "WOMBAT",
94 * "http://www.wombat.org/trader");
95 * </PRE>
96 *
97 * @since 1.6
98 */
99 public interface SOAPEnvelope extends SOAPElement {
100
101 /**
102 * Creates a new <code>Name</code> object initialized with the
103 * given local name, namespace prefix, and namespace URI.
104 * <P>
105 * This factory method creates <code>Name</code> objects for use in
106 * the SOAP/XML document.
107 *
108 * @param localName a <code>String</code> giving the local name
109 * @param prefix a <code>String</code> giving the prefix of the namespace
110 * @param uri a <code>String</code> giving the URI of the namespace
111 * @return a <code>Name</code> object initialized with the given
112 * local name, namespace prefix, and namespace URI
113 * @throws SOAPException if there is a SOAP error
114 */
115 public abstract Name createName(String localName, String prefix,
116 String uri)
117 throws SOAPException;
|