soapenvelope.html

来自「j2ee的API 1.4版本,j2ee的帮助文档」· HTML 代码 · 共 549 行 · 第 1/3 页

HTML
549
字号
<DD><CODE><A HREF="../../../javax/xml/soap/SOAPException.html" title="class in javax.xml.soap">SOAPException</A></CODE> - if there is a SOAP error</DL></DD></DL><HR><A NAME="getHeader()"><!-- --></A><H3>getHeader</H3><PRE>public <A HREF="../../../javax/xml/soap/SOAPHeader.html" title="interface in javax.xml.soap">SOAPHeader</A> <B>getHeader</B>()                     throws <A HREF="../../../javax/xml/soap/SOAPException.html" title="class in javax.xml.soap">SOAPException</A></PRE><DL><DD>Returns the <code>SOAPHeader</code> object for this <code>SOAPEnvelope</code> object. <P> A new <code>SOAPMessage</code> object is by default created with a <code>SOAPEnvelope</code> object that contains an empty <code>SOAPHeader</code> object.  As a result, the method <code>getHeader</code> will always return a <code>SOAPHeader</code> object unless the header has been removed and a new one has not been added.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the <code>SOAPHeader</code> object or <code>null</code> if         there is none<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 a problem obtaining the            <code>SOAPHeader</code> object</DL></DD></DL><HR><A NAME="getBody()"><!-- --></A><H3>getBody</H3><PRE>public <A HREF="../../../javax/xml/soap/SOAPBody.html" title="interface in javax.xml.soap">SOAPBody</A> <B>getBody</B>()                 throws <A HREF="../../../javax/xml/soap/SOAPException.html" title="class in javax.xml.soap">SOAPException</A></PRE><DL><DD>Returns the <code>SOAPBody</code> object associated with this <code>SOAPEnvelope</code> object. <P> A new <code>SOAPMessage</code> object is by default created with a <code>SOAPEnvelope</code> object that contains an empty <code>SOAPBody</code> object.  As a result, the method <code>getBody</code> will always return a <code>SOAPBody</code> object unless the body has been removed and a new one has not been added.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the <code>SOAPBody</code> object for this         <code>SOAPEnvelope</code> object or <code>null</code>         if there is none<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 a problem obtaining the            <code>SOAPBody</code> object</DL></DD></DL><HR><A NAME="addHeader()"><!-- --></A><H3>addHeader</H3><PRE>public <A HREF="../../../javax/xml/soap/SOAPHeader.html" title="interface in javax.xml.soap">SOAPHeader</A> <B>addHeader</B>()                     throws <A HREF="../../../javax/xml/soap/SOAPException.html" title="class in javax.xml.soap">SOAPException</A></PRE><DL><DD>Creates a <code>SOAPHeader</code> object and sets it as the <code>SOAPHeader</code> object for this <code>SOAPEnvelope</code> object. <P> It is illegal to add a header when the envelope already contains a header.  Therefore, this method should be called only after the existing header has been removed.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the new <code>SOAPHeader</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 this            <code>SOAPEnvelope</code> object already contains a            valid <code>SOAPHeader</code> object</DL></DD></DL><HR><A NAME="addBody()"><!-- --></A><H3>addBody</H3><PRE>public <A HREF="../../../javax/xml/soap/SOAPBody.html" title="interface in javax.xml.soap">SOAPBody</A> <B>addBody</B>()                 throws <A HREF="../../../javax/xml/soap/SOAPException.html" title="class in javax.xml.soap">SOAPException</A></PRE><DL><DD>Creates a <code>SOAPBody</code> object and sets it as the <code>SOAPBody</code> object for this <code>SOAPEnvelope</code> object. <P> It is illegal to add a body when the envelope already contains a body. Therefore, this method should be called only after the existing body has been removed.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the new <code>SOAPBody</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 this            <code>SOAPEnvelope</code> object already contains a            valid <code>SOAPBody</code> object</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/SOAPElement.html" title="interface in javax.xml.soap"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../../javax/xml/soap/SOAPFault.html" title="interface 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="SOAPEnvelope.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;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&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 + -
显示快捷键?