soapmessage.html

来自「j2ee api,很好的api。我这现在有」· HTML 代码 · 共 927 行 · 第 1/4 页

HTML
927
字号
<DL><DD>Returns all the transport-specific MIME headers for this <code>SOAPMessage</code> object in a transport-independent fashion.<P><DD><DL><DT><B>Returns:</B><DD>a <code>MimeHeaders</code> object containing the <code>MimeHeader</code>         objects</DL></DD></DL><HR><A NAME="createAttachmentPart(java.lang.Object, java.lang.String)"><!-- --></A><H3>createAttachmentPart</H3><PRE>public <A HREF="../../../javax/xml/soap/AttachmentPart.html" title="class in javax.xml.soap">AttachmentPart</A> <B>createAttachmentPart</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;content,                                           <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;contentType)</PRE><DL><DD>Creates an <code>AttachmentPart</code> object and populates it with the specified data of the specified content type.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>content</CODE> - an <code>Object</code> containing the content for this           <code>SOAPMessage</code> object<DD><CODE>contentType</CODE> - a <code>String</code> object giving the type of content;           examples are "text/xml", "text/plain", and "image/jpeg"<DT><B>Returns:</B><DD>a new <code>AttachmentPart</code> object that contains the         given data<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if the contentType does not match the type of the content               object, or if there was no <code>DataContentHandler</code>               object for the given content object<DT><B>See Also:</B><DD><A HREF="../../../javax/activation/DataHandler.html" title="class in javax.activation"><CODE>DataHandler</CODE></A>, <A HREF="../../../javax/activation/DataContentHandler.html" title="interface in javax.activation"><CODE>DataContentHandler</CODE></A></DL></DD></DL><HR><A NAME="saveChanges()"><!-- --></A><H3>saveChanges</H3><PRE>public abstract void <B>saveChanges</B>()                          throws <A HREF="../../../javax/xml/soap/SOAPException.html" title="class in javax.xml.soap">SOAPException</A></PRE><DL><DD>Updates this <code>SOAPMessage</code> object with all the changes that have been made to it. This method is called automatically when <A HREF="../../../javax/xml/soap/SOAPMessage.html#writeTo(java.io.OutputStream)"><CODE>writeTo(OutputStream)</CODE></A> is  called. However, if changes are made to a message that was received or to one that has already been sent, the method <code>saveChanges</code> needs to be called explicitly in order to save the changes. The method <code>saveChanges</code> also generates any changes that can be read back (for example, a MessageId in profiles that support a message id). All MIME headers in a message that is created for sending purposes are guaranteed to have valid values only after <code>saveChanges</code> has been called. <P> In addition, this method marks the point at which the data from all constituent <code>AttachmentPart</code> objects are pulled into the message. <P><P><DD><DL><DT><B>Throws:</B><DD><CODE><code>SOAPException</code></CODE> - if there was a problem saving               changes to this message.<DD><CODE><A HREF="../../../javax/xml/soap/SOAPException.html" title="class in javax.xml.soap">SOAPException</A></CODE></DL></DD></DL><HR><A NAME="saveRequired()"><!-- --></A><H3>saveRequired</H3><PRE>public abstract boolean <B>saveRequired</B>()</PRE><DL><DD>Indicates whether this <code>SOAPMessage</code> object needs to have the method <code>saveChanges</code> called on it.<P><DD><DL><DT><B>Returns:</B><DD><code>true</code> if <code>saveChanges</code> needs to be         called; <code>false</code> otherwise.</DL></DD></DL><HR><A NAME="writeTo(java.io.OutputStream)"><!-- --></A><H3>writeTo</H3><PRE>public abstract void <B>writeTo</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/OutputStream.html" title="class or interface in java.io">OutputStream</A>&nbsp;out)                      throws <A HREF="../../../javax/xml/soap/SOAPException.html" title="class in javax.xml.soap">SOAPException</A>,                             <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE><DL><DD>Writes this <code>SOAPMessage</code> object to the given output stream. The externalization format is as defined by the SOAP 1.1 with Attachments specification. <P> If there are no attachments, just an XML stream is written out. For those messages that have attachments, <code>writeTo</code> writes a MIME-encoded byte stream.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>out</CODE> - the <code>OutputStream</code> object to which this <code>SOAPMessage</code>           object will be written<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE> - if an I/O error occurs<DD><CODE><A HREF="../../../javax/xml/soap/SOAPException.html" title="class in javax.xml.soap">SOAPException</A></CODE> - if there was a problem in externalizing this SOAP message</DL></DD></DL><HR><A NAME="setProperty(java.lang.String, java.lang.Object)"><!-- --></A><H3>setProperty</H3><PRE>public void <B>setProperty</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;property,                        <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;value)                 throws <A HREF="../../../javax/xml/soap/SOAPException.html" title="class in javax.xml.soap">SOAPException</A></PRE><DL><DD>Associates the specified value with the specified property. If there was already a value associated with this property, the old value is replaced. <p> The valid property names include <A HREF="../../../javax/xml/soap/SOAPMessage.html#WRITE_XML_DECLARATION"><CODE>WRITE_XML_DECLARATION</CODE></A>  and <A HREF="../../../javax/xml/soap/SOAPMessage.html#CHARACTER_SET_ENCODING"><CODE>CHARACTER_SET_ENCODING</CODE></A>. All of these standard SAAJ  properties are prefixed by "javax.xml.soap". Vendors may also add implementation specific properties. These properties must be prefixed with package names that are unique to the vendor. <p> Setting the property <code>WRITE_XML_DECLARATION</code> to <code>"true"</code> will cause an XML Declaration to be written out at the start of the SOAP message. The default value of "false" suppresses this declaration. <p> The property <code>CHARACTER_SET_ENCODING</code> defaults to the value <code>"utf-8"</code> which causes the SOAP message to be encoded using UTF-8. Setting <code>CHARACTER_SET_ENCODING</code> to <code>"utf-16"</code> causes the SOAP message to be encoded using UTF-16. <p> Some implementations may allow encodings in addition to UTF-8 and UTF-16. Refer to your vendor's documentation for details.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>property</CODE> - the property with which the specified value is to be           associated.<DD><CODE>value</CODE> - the value to be associated with the specified property<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/xml/soap/SOAPException.html" title="class in javax.xml.soap">SOAPException</A></CODE> - if the property name is not recognized.<DT><B>Since:</B></DT>  <DD>SAAJ 1.2</DD></DL></DD></DL><HR><A NAME="getProperty(java.lang.String)"><!-- --></A><H3>getProperty</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> <B>getProperty</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;property)                   throws <A HREF="../../../javax/xml/soap/SOAPException.html" title="class in javax.xml.soap">SOAPException</A></PRE><DL><DD>Retrieves value of the specified property.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>property</CODE> - the name of the property to retrieve<DT><B>Returns:</B><DD>the value associated with the named property or <code>null</code>         if no such property exists.<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/xml/soap/SOAPException.html" title="class in javax.xml.soap">SOAPException</A></CODE> - if the property name is not recognized.<DT><B>Since:</B></DT>  <DD>SAAJ 1.2</DD></DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">  <TR ALIGN="center" VALIGN="top">  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java<sup><font size=-2>TM</font></sup> 2 Platform<br>Ent. Ed. v1.4</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../../javax/xml/soap/SOAPFactory.html" title="class in javax.xml.soap"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../../javax/xml/soap/SOAPPart.html" title="class in javax.xml.soap"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../../index.html" target="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="SOAPMessage.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;&nbsp;<SCRIPT type="text/javascript">  <!--  if(window==top) {    document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');  }  //--></SCRIPT><NOSCRIPT>  <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR><font size="-1"><a href="http://java.sun.com/webapps/bugreport">Submit a bug or feature</a> <p>Copyright 2003 Sun Microsystems, Inc. All rights reserved.</font></BODY></HTML>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?