| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!--NewPage--> |
| <HTML> |
| <HEAD> |
| <!-- Generated by javadoc (build 1.4.2_08) on Sat Apr 22 18:56:42 PDT 2006 --> |
| <TITLE> |
| MessageFactory (Axis API) |
| </TITLE> |
| |
| <META NAME="keywords" CONTENT="javax.xml.soap.MessageFactory class"> |
| |
| <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"> |
| |
| <SCRIPT type="text/javascript"> |
| function windowTitle() |
| { |
| parent.document.title="MessageFactory (Axis API)"; |
| } |
| </SCRIPT> |
| |
| </HEAD> |
| |
| <BODY BGCOLOR="white" onload="windowTitle();"> |
| |
| |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <A NAME="navbar_top"><!-- --></A> |
| <A HREF="#skip-navbar_top" 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_top_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> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> |
| <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/MessageFactory.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> |
| </TR> |
| </TABLE> |
| </TD> |
| <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> |
| </EM> |
| </TD> |
| </TR> |
| |
| <TR> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../javax/xml/soap/AttachmentPart.html" title="class in javax.xml.soap"><B>PREV CLASS</B></A> |
| <A HREF="../../../javax/xml/soap/MimeHeader.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> |
| <A HREF="MessageFactory.html" target="_top"><B>NO FRAMES</B></A> |
| <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: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> |
| </TR> |
| </TABLE> |
| <A NAME="skip-navbar_top"></A> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| |
| <HR> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <H2> |
| <FONT SIZE="-1"> |
| javax.xml.soap</FONT> |
| <BR> |
| Class MessageFactory</H2> |
| <PRE> |
| java.lang.Object |
| <IMG SRC="../../../resources/inherit.gif" ALT="extended by"><B>javax.xml.soap.MessageFactory</B> |
| </PRE> |
| <DL> |
| <DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../org/apache/axis/soap/MessageFactoryImpl.html" title="class in org.apache.axis.soap">MessageFactoryImpl</A></DD> |
| </DL> |
| <HR> |
| <DL> |
| <DT>public abstract class <B>MessageFactory</B><DT>extends java.lang.Object</DL> |
| |
| <P> |
| <P>A factory for creating <CODE>SOAPMessage</CODE> objects.</P> |
| |
| <P>A JAXM client performs the following steps to create a |
| message.</P> |
| |
| <UL> |
| <LI> |
| Creates a <CODE>MessageFactory</CODE> object from a <CODE> |
| ProviderConnection</CODE> object (<CODE>con</CODE> in the |
| following line of code). The <CODE>String</CODE> passed to |
| the <CODE>createMessageFactory</CODE> method is the name of |
| of a messaging profile, which must be the URL for the |
| schema. |
| <PRE> |
| MessageFactory mf = con.createMessageFactory(schemaURL); |
| </PRE> |
| </LI> |
| |
| <LI> |
| Calls the method <CODE>createMessage</CODE> on the <CODE> |
| MessageFactory</CODE> object. All messages produced by this |
| <CODE>MessageFactory</CODE> object will have the header |
| information appropriate for the messaging profile that was |
| specified when the <CODE>MessageFactory</CODE> object was |
| created. |
| <PRE> |
| SOAPMessage m = mf.createMessage(); |
| </PRE> |
| </LI> |
| </UL> |
| It is also possible to create a <CODE>MessageFactory</CODE> |
| object using the method <CODE>newInstance</CODE>, as shown in |
| the following line of code. |
| <PRE> |
| MessageFactory mf = MessageFactory.newInstance(); |
| </PRE> |
| A standalone client (a client that is not running in a |
| container) can use the <CODE>newInstance</CODE> method to |
| create a <CODE>MessageFactory</CODE> object. |
| |
| <P>All <CODE>MessageFactory</CODE> objects, regardless of how |
| they are created, will produce <CODE>SOAPMessage</CODE> objects |
| that have the following elements by default:</P> |
| |
| <UL> |
| <LI>A <CODE>SOAPPart</CODE> object</LI> |
| |
| <LI>A <CODE>SOAPEnvelope</CODE> object</LI> |
| |
| <LI>A <CODE>SOAPBody</CODE> object</LI> |
| |
| <LI>A <CODE>SOAPHeader</CODE> object</LI> |
| </UL> |
| If a <CODE>MessageFactory</CODE> object was created using a |
| <CODE>ProviderConnection</CODE> object, which means that it was |
| initialized with a specified profile, it will produce messages |
| that also come prepopulated with additional entries in the |
| <CODE>SOAPHeader</CODE> object and the <CODE>SOAPBody</CODE> |
| object. The content of a new <CODE>SOAPMessage</CODE> object |
| depends on which of the two <CODE>MessageFactory</CODE> methods |
| is used to create it. |
| |
| <UL> |
| <LI><CODE>createMessage()</CODE> -- message has no |
| content<BR> |
| This is the method clients would normally use to create a |
| request message.</LI> |
| |
| <LI><CODE>createMessage(MimeHeaders, |
| java.io.InputStream)</CODE> -- message has content from the |
| <CODE>InputStream</CODE> object and headers from the <CODE> |
| MimeHeaders</CODE> object<BR> |
| This method can be used internally by a service |
| implementation to create a message that is a response to a |
| request.</LI> |
| </UL> |
| <P> |
| |
| <P> |
| <HR> |
| |
| <P> |
| <!-- ======== NESTED CLASS SUMMARY ======== --> |
| |
| |
| <!-- =========== FIELD SUMMARY =========== --> |
| |
| |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| |
| <A NAME="constructor_summary"><!-- --></A> |
| <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TD COLSPAN=2><FONT SIZE="+2"> |
| <B>Constructor Summary</B></FONT></TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD><CODE><B><A HREF="../../../javax/xml/soap/MessageFactory.html#MessageFactory()">MessageFactory</A></B>()</CODE> |
| |
| <BR> |
| Create a new MessageFactory.</TD> |
| </TR> |
| </TABLE> |
| |
| <!-- ========== METHOD SUMMARY =========== --> |
| |
| <A NAME="method_summary"><!-- --></A> |
| <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TD COLSPAN=2><FONT SIZE="+2"> |
| <B>Method Summary</B></FONT></TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>abstract <A HREF="../../../javax/xml/soap/SOAPMessage.html" title="class in javax.xml.soap">SOAPMessage</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../javax/xml/soap/MessageFactory.html#createMessage()">createMessage</A></B>()</CODE> |
| |
| <BR> |
| Creates a new <CODE>SOAPMessage</CODE> object with the |
| default <CODE>SOAPPart</CODE>, <CODE>SOAPEnvelope</CODE>, |
| <CODE>SOAPBody</CODE>, and <CODE>SOAPHeader</CODE> objects.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>abstract <A HREF="../../../javax/xml/soap/SOAPMessage.html" title="class in javax.xml.soap">SOAPMessage</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../javax/xml/soap/MessageFactory.html#createMessage(javax.xml.soap.MimeHeaders, java.io.InputStream)">createMessage</A></B>(<A HREF="../../../javax/xml/soap/MimeHeaders.html" title="class in javax.xml.soap">MimeHeaders</A> mimeheaders, |
| java.io.InputStream inputstream)</CODE> |
| |
| <BR> |
| Internalizes the contents of the given <CODE> |
| InputStream</CODE> object into a new <CODE>SOAPMessage</CODE> |
| object and returns the <CODE>SOAPMessage</CODE> object.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static <A HREF="../../../javax/xml/soap/MessageFactory.html" title="class in javax.xml.soap">MessageFactory</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../javax/xml/soap/MessageFactory.html#newInstance()">newInstance</A></B>()</CODE> |
| |
| <BR> |
| Creates a new <CODE>MessageFactory</CODE> object that is |
| an instance of the default implementation.</TD> |
| </TR> |
| </TABLE> |
| <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> |
| <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
| <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> |
| <TD><B>Methods inherited from class java.lang.Object</B></TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD> |
| </TR> |
| </TABLE> |
| |
| <P> |
| |
| <!-- ============ FIELD DETAIL =========== --> |
| |
| |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| |
| <A NAME="constructor_detail"><!-- --></A> |
| <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TD COLSPAN=1><FONT SIZE="+2"> |
| <B>Constructor Detail</B></FONT></TD> |
| </TR> |
| </TABLE> |
| |
| <A NAME="MessageFactory()"><!-- --></A><H3> |
| MessageFactory</H3> |
| <PRE> |
| public <B>MessageFactory</B>()</PRE> |
| <DL> |
| <DD>Create a new MessageFactory. |
| <P> |
| </DL> |
| |
| <!-- ============ METHOD DETAIL ========== --> |
| |
| <A NAME="method_detail"><!-- --></A> |
| <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TD COLSPAN=1><FONT SIZE="+2"> |
| <B>Method Detail</B></FONT></TD> |
| </TR> |
| </TABLE> |
| |
| <A NAME="newInstance()"><!-- --></A><H3> |
| newInstance</H3> |
| <PRE> |
| public static <A HREF="../../../javax/xml/soap/MessageFactory.html" title="class in javax.xml.soap">MessageFactory</A> <B>newInstance</B>() |
| throws <A HREF="../../../javax/xml/soap/SOAPException.html" title="class in javax.xml.soap">SOAPException</A></PRE> |
| <DL> |
| <DD>Creates a new <CODE>MessageFactory</CODE> object that is |
| an instance of the default implementation. |
| <P> |
| <DD><DL> |
| |
| <DT><B>Returns:</B><DD>a new <CODE>MessageFactory</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 there was an error in |
| creating the default implementation of the <CODE> |
| MessageFactory</CODE></DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="createMessage()"><!-- --></A><H3> |
| createMessage</H3> |
| <PRE> |
| public abstract <A HREF="../../../javax/xml/soap/SOAPMessage.html" title="class in javax.xml.soap">SOAPMessage</A> <B>createMessage</B>() |
| throws <A HREF="../../../javax/xml/soap/SOAPException.html" title="class in javax.xml.soap">SOAPException</A></PRE> |
| <DL> |
| <DD>Creates a new <CODE>SOAPMessage</CODE> object with the |
| default <CODE>SOAPPart</CODE>, <CODE>SOAPEnvelope</CODE>, |
| <CODE>SOAPBody</CODE>, and <CODE>SOAPHeader</CODE> objects. |
| Profile-specific message factories can choose to |
| prepopulate the <CODE>SOAPMessage</CODE> object with |
| profile-specific headers. |
| |
| <P>Content can be added to this message's <CODE> |
| SOAPPart</CODE> object, and the message can be sent "as is" |
| when a message containing only a SOAP part is sufficient. |
| Otherwise, the <CODE>SOAPMessage</CODE> object needs to |
| create one or more <CODE>AttachmentPart</CODE> objects and |
| add them to itself. Any content that is not in XML format |
| must be in an <CODE>AttachmentPart</CODE> object.</P> |
| <P> |
| <DD><DL> |
| |
| <DT><B>Returns:</B><DD>a new <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 a SOAP error occurs</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="createMessage(javax.xml.soap.MimeHeaders, java.io.InputStream)"><!-- --></A><H3> |
| createMessage</H3> |
| <PRE> |
| public abstract <A HREF="../../../javax/xml/soap/SOAPMessage.html" title="class in javax.xml.soap">SOAPMessage</A> <B>createMessage</B>(<A HREF="../../../javax/xml/soap/MimeHeaders.html" title="class in javax.xml.soap">MimeHeaders</A> mimeheaders, |
| java.io.InputStream inputstream) |
| throws java.io.IOException, |
| <A HREF="../../../javax/xml/soap/SOAPException.html" title="class in javax.xml.soap">SOAPException</A></PRE> |
| <DL> |
| <DD>Internalizes the contents of the given <CODE> |
| InputStream</CODE> object into a new <CODE>SOAPMessage</CODE> |
| object and returns the <CODE>SOAPMessage</CODE> object. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>mimeheaders</CODE> - the transport-specific headers |
| passed to the message in a transport-independent fashion |
| for creation of the message<DD><CODE>inputstream</CODE> - the <CODE>InputStream</CODE> object |
| that contains the data for a message |
| <DT><B>Returns:</B><DD>a new <CODE>SOAPMessage</CODE> object containing the |
| data from the given <CODE>InputStream</CODE> object |
| <DT><B>Throws:</B> |
| <DD><CODE>java.io.IOException</CODE> - if there is a |
| problem in reading data from the input stream |
| <DD><CODE><A HREF="../../../javax/xml/soap/SOAPException.html" title="class in javax.xml.soap">SOAPException</A></CODE> - if the message is invalid</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> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> |
| <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/MessageFactory.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> |
| </TR> |
| </TABLE> |
| </TD> |
| <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> |
| </EM> |
| </TD> |
| </TR> |
| |
| <TR> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../javax/xml/soap/AttachmentPart.html" title="class in javax.xml.soap"><B>PREV CLASS</B></A> |
| <A HREF="../../../javax/xml/soap/MimeHeader.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> |
| <A HREF="MessageFactory.html" target="_top"><B>NO FRAMES</B></A> |
| <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: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> |
| </TR> |
| </TABLE> |
| <A NAME="skip-navbar_bottom"></A> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| |
| <HR> |
| Copyright © 2005 Apache Web Services Project. All Rights Reserved. |
| </BODY> |
| </HTML> |