soapmessage.html
来自「j2ee帮助文档软件设计/软件工程 文件格式」· HTML 代码 · 共 1,003 行 · 第 1/4 页
HTML
1,003 行
<DT><B>Parameters:</B><DD><CODE>description</CODE> - a <code>String</code> describing the content of this message<DT><B>See Also:</B><DD><A HREF="../../../javax/xml/soap/SOAPMessage.html#getContentDescription()"><CODE>getContentDescription()</CODE></A></DL></DD></DL><HR><A NAME="getContentDescription()"><!-- --></A><H3>getContentDescription</H3><PRE>public abstract <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getContentDescription</B>()</PRE><DL><DD>Retrieves a description of this <code>SOAPMessage</code> object's content.<P><DD><DL><DT><B>Returns:</B><DD>a <code>String</code> describing the content of this message or <code>null</code> if no description has been set<DT><B>See Also:</B><DD><A HREF="../../../javax/xml/soap/SOAPMessage.html#setContentDescription(java.lang.String)"><CODE>setContentDescription(java.lang.String)</CODE></A></DL></DD></DL><HR><A NAME="getSOAPPart()"><!-- --></A><H3>getSOAPPart</H3><PRE>public abstract <A HREF="../../../javax/xml/soap/SOAPPart.html" title="class in javax.xml.soap">SOAPPart</A> <B>getSOAPPart</B>()</PRE><DL><DD>Gets the SOAP part of this <code>SOAPMessage</code> object. <P> <code>SOAPMessage</code> object contains one or more attachments, the SOAP Part must be the first MIME body part in the message.<P><DD><DL><DT><B>Returns:</B><DD>the <code>SOAPPart</code> object for this <code>SOAPMessage</code> object</DL></DD></DL><HR><A NAME="getSOAPBody()"><!-- --></A><H3>getSOAPBody</H3><PRE>public <A HREF="../../../javax/xml/soap/SOAPBody.html" title="interface in javax.xml.soap">SOAPBody</A> <B>getSOAPBody</B>() throws <A HREF="../../../javax/xml/soap/SOAPException.html" title="class in javax.xml.soap">SOAPException</A></PRE><DL><DD>Gets the SOAP Body contained in this <code>SOAPMessage</code> object. <p><P><DD><DL><DT><B>Returns:</B><DD>the <code>SOAPBody</code> object contained by this <code>SOAPMessage</code> object<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/xml/soap/SOAPException.html" title="class in javax.xml.soap">SOAPException</A></CODE> - if the SOAP Body does not exist or cannot be retrieved<DT><B>Since:</B></DT> <DD>SAAJ 1.2</DD></DL></DD></DL><HR><A NAME="getSOAPHeader()"><!-- --></A><H3>getSOAPHeader</H3><PRE>public <A HREF="../../../javax/xml/soap/SOAPHeader.html" title="interface in javax.xml.soap">SOAPHeader</A> <B>getSOAPHeader</B>() throws <A HREF="../../../javax/xml/soap/SOAPException.html" title="class in javax.xml.soap">SOAPException</A></PRE><DL><DD>Gets the SOAP Header contained in this <code>SOAPMessage</code> object. <p><P><DD><DL><DT><B>Returns:</B><DD>the <code>SOAPHeader</code> object contained by this <code>SOAPMessage</code> object<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/xml/soap/SOAPException.html" title="class in javax.xml.soap">SOAPException</A></CODE> - if the SOAP Header does not exist or cannot be retrieved<DT><B>Since:</B></DT> <DD>SAAJ 1.2</DD></DL></DD></DL><HR><A NAME="removeAllAttachments()"><!-- --></A><H3>removeAllAttachments</H3><PRE>public abstract void <B>removeAllAttachments</B>()</PRE><DL><DD>Removes all <code>AttachmentPart</code> objects that have been added to this <code>SOAPMessage</code> object. <P> This method does not touch the SOAP part.<P><DD><DL></DL></DD></DL><HR><A NAME="countAttachments()"><!-- --></A><H3>countAttachments</H3><PRE>public abstract int <B>countAttachments</B>()</PRE><DL><DD>Gets a count of the number of attachments in this message. This count does not include the SOAP part.<P><DD><DL><DT><B>Returns:</B><DD>the number of <code>AttachmentPart</code> objects that are part of this <code>SOAPMessage</code> object</DL></DD></DL><HR><A NAME="getAttachments()"><!-- --></A><H3>getAttachments</H3><PRE>public abstract <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/util/Iterator.html" title="class or interface in java.util">Iterator</A> <B>getAttachments</B>()</PRE><DL><DD>Retrieves all the <code>AttachmentPart</code> objects that are part of this <code>SOAPMessage</code> object.<P><DD><DL><DT><B>Returns:</B><DD>an iterator over all the attachments in this message</DL></DD></DL><HR><A NAME="getAttachments(javax.xml.soap.MimeHeaders)"><!-- --></A><H3>getAttachments</H3><PRE>public abstract <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/util/Iterator.html" title="class or interface in java.util">Iterator</A> <B>getAttachments</B>(<A HREF="../../../javax/xml/soap/MimeHeaders.html" title="class in javax.xml.soap">MimeHeaders</A> headers)</PRE><DL><DD>Retrieves all the <code>AttachmentPart</code> objects that have header entries that match the specified headers. Note that a returned attachment could have headers in addition to those specified.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>headers</CODE> - a <code>MimeHeaders</code> object containing the MIME headers for which to search<DT><B>Returns:</B><DD>an iterator over all attachments that have a header that matches one of the given headers</DL></DD></DL><HR><A NAME="removeAttachments(javax.xml.soap.MimeHeaders)"><!-- --></A><H3>removeAttachments</H3><PRE>public abstract void <B>removeAttachments</B>(<A HREF="../../../javax/xml/soap/MimeHeaders.html" title="class in javax.xml.soap">MimeHeaders</A> headers)</PRE><DL><DD>Removes all the <code>AttachmentPart</code> objects that have header entries that match the specified headers. Note that the removed attachment could have headers in addition to those specified.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>headers</CODE> - a <code>MimeHeaders</code> object containing the MIME headers for which to search<DT><B>Since:</B></DT> <DD>SAAJ 1.3</DD></DL></DD></DL><HR><A NAME="getAttachment(javax.xml.soap.SOAPElement)"><!-- --></A><H3>getAttachment</H3><PRE>public abstract <A HREF="../../../javax/xml/soap/AttachmentPart.html" title="class in javax.xml.soap">AttachmentPart</A> <B>getAttachment</B>(<A HREF="../../../javax/xml/soap/SOAPElement.html" title="interface in javax.xml.soap">SOAPElement</A> element) throws <A HREF="../../../javax/xml/soap/SOAPException.html" title="class in javax.xml.soap">SOAPException</A></PRE><DL><DD>Returns an <code>AttachmentPart</code> object that is associated with an attachment that is referenced by this <code>SOAPElement</code> or <code>null</code> if no such attachment exists. References can be made via an <code>href</code> attribute as described in <a href="http://www.w3.org/TR/SOAP-attachments#SOAPReferenceToAttachements">SOAP Messages with Attachments</a>, or via a single <code>Text</code> child node containing a URI as described in the WS-I Attachments Profile 1.0 for elements of schema type <i>ref:swaRef</i>(<a href=http://www.ws-i.org/Profiles/AttachmentsProfile-1.0-2004-08-24.html">ref:swaRef</a>). These two mechanisms must be supported. The support for references via <code>href</code> attribute also implies that this method should also be supported on an element that is an <i>xop:Include</i> element ( <a href="http://www.w3.org/2000/xp/Group/3/06/Attachments/XOP.html">XOP</a>). other reference mechanisms may be supported by individual implementations of this standard. Contact your vendor for details.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>element</CODE> - The <code>SOAPElement</code> containing the reference to an Attachment<DT><B>Returns:</B><DD>the referenced <code>AttachmentPart</code> or null if no such <code>AttachmentPart</code> exists or no reference can be found in this <code>SOAPElement</code>.<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/xml/soap/SOAPException.html" title="class in javax.xml.soap">SOAPException</A></CODE> - if there is an error in the attempt to access the attachment<DT><B>Since:</B></DT> <DD>SAAJ 1.3</DD></DL></DD></DL><HR><A NAME="addAttachmentPart(javax.xml.soap.AttachmentPart)"><!-- --></A><H3>addAttachmentPart</H3><PRE>public abstract void <B>addAttachmentPart</B>(<A HREF="../../../javax/xml/soap/AttachmentPart.html" title="class in javax.xml.soap">AttachmentPart</A> AttachmentPart)</PRE><DL><DD>Adds the given <code>AttachmentPart</code> object to this <code>SOAPMessage</code> object. An <code>AttachmentPart</code> object must be created before it can be added to a message.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>AttachmentPart</CODE> - an <code>AttachmentPart</code> object that is to become part of this <code>SOAPMessage</code> object<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE></DL></DD></DL><HR><A NAME="createAttachmentPart()"><!-- --></A><H3>createAttachmentPart</H3><PRE>public abstract <A HREF="../../../javax/xml/soap/AttachmentPart.html" title="class in javax.xml.soap">AttachmentPart</A> <B>createAttachmentPart</B>()</PRE><DL><DD>Creates a new empty <code>AttachmentPart</code> object. Note that the method <code>addAttachmentPart</code> must be called with this new <code>AttachmentPart</code> object as the parameter in order for it to become an attachment to this <code>SOAPMessage</code> object.<P><DD><DL><DT><B>Returns:</B><DD>a new <code>AttachmentPart</code> object that can be populated and added to this <code>SOAPMessage</code> object</DL></DD></DL><HR><A NAME="createAttachmentPart(javax.activation.DataHandler)"><!-- --></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="../../../javax/activation/DataHandler.html" title="class in javax.activation">DataHandler</A> dataHandler)</PRE><DL><DD>Creates an <code>AttachmentPart</code> object and populates it using the given <code>DataHandler</code> object.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>dataHandler</CODE> - the <code>javax.activation.DataHandler</code> object that will generate the content for this <code>SOAPMessage</code> object<DT><B>Returns:</B><DD>a new <code>AttachmentPart</code> object that contains data generated by the given <code>DataHandler</code> object
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?