[Zope-CVS] CVS: Packages/WebService/doc - SOAPMessage.tex:1.3 WebService.html:1.3 WebService.pdf:1.2 WebService.tex:1.4
Brian Lloyd
brian@digicool.com
Mon, 17 Dec 2001 10:00:11 -0500
Update of /cvs-repository/Packages/WebService/doc
In directory cvs.zope.org:/tmp/cvs-serv23471/doc
Modified Files:
SOAPMessage.tex WebService.html WebService.pdf WebService.tex
Log Message:
Implemented MIME multipart encoding / decoding, refactored SOAPMessage
interface to make it easier to customize.
=== Packages/WebService/doc/SOAPMessage.tex 1.2 => 1.3 ===
The \module{SOAPMessage} module provides a high-level interface for
-working with SOAP messages. The \class{SOAPMessage} model provides a
+working with SOAP messages. The \class{SOAPMessage} class provides a
layer of abstraction that simplifies client and server applications
by taking care of most of the details of SOAP message serialization.
-At the same time, \class{SOAPMessage} objects still providing a good
-deal of control and convenient ways to customize message processing.
+The \class{SOAPMessage} class is also designed to make it relatively easy
+to implement custom SOAP message processing by subclassing.
+
\begin{classdesc}{SOAPMessage}{\optional{, message_body}}
The \class{SOAPMessage} class represents a single SOAP message. It
can be used by both clients and servers, both to build new request
-or response messages or to interpret a recieved message.
+or response messages or to interpret a received message.
The message may be instantiated with a \var{message_body} in order to
deserialize and work with a recieved message (such as a request recieved
@@ -38,9 +39,9 @@
\begin{memberdesc}{serializer}
The \class{Serializer} instance that will be used to perform data
-serialization and deserialization for this message. The default
-serializer for \class{SOAPMessage} objects supports the standard
-SOAP and XML Schema simple types.
+serialization and deserialization for this message. There is a default
+serializer shared amongst \class{SOAPMessage} instances that understands
+the standard SOAP and XML Schema types.
You should not load schema into the default serializer. To support
custom types, set this attribute to a different \class{Serializer}
@@ -85,9 +86,15 @@
body, the content type is not available until after the
\method{serialize()} method is called.
-The value returned is suitable for sending as the Content-Type header
-value when sending the message over transports that support MIME
-headers.
+The value returned should be sent as the Content-Type header value when
+sending the message over transports that support MIME headers.
+\end{methoddesc}
+
+\begin{methoddesc}[SOAPMessage]{setContentType}{}
+Set the content type of the message. It is important to set this before
+attempting to deserialize a MIME multipart SOAP message, as the
+boundary information required to interpret the message is found in the
+value of the content type header.
\end{methoddesc}
\begin{methoddesc}[SOAPMessage]{getMessageBody}{}
@@ -155,30 +162,18 @@
or \class{MIMEPart} object.
\end{methoddesc}
-\begin{methoddesc}[SOAPMessage]{getReturnValue}{}
-Return the *value* of the first parameter that appears in the message
-(which represents the 'return' value in a reply from a service). This
-method will return code{None} if the message contains no parameters.
-\end{methoddesc}
-
\begin{methoddesc}[SOAPMessage]{addParameter}{
name, value, type\optional{, namespace}
}
Add a parameter with the given values to the message. The \var{type}
should be a QName tuple of the form \code{(namespaceURI, typeName)}.
-The \var{namespace} should only be passed when adding parameters to
-a SOAP document-style message. Note that parameters are serialized in
+The optional \var{namespace} indicates the XML namespace of the element
+to be written in the SOAP message. Note that parameters are serialized in
the order that they are added to the message.
-\end{methoddesc}
-\begin{methoddesc}[SOAPMessage]{addMimeParam}{
-name, content_type, data
-}
-Add a \class{MIMEPart} parameter to the message with the given \var{name},
-\var{content_type} and \var{data}. The \var{data} may be either a string
-or a file-like object containing the MIME data. Note that adding a MIME
-parameter to a message will cause it to be serialized as a
-MIME \code{multipart/related} message.
+If the \var{value} passed is an instance of the \class{MIMEPart} class,
+the SOAP parameter will reference the \class{MIMEPart} given in \var{value}
+and the message will be sent as a MIME multipart message.
\end{methoddesc}
\begin{methoddesc}[SOAPMessage]{getFault}{}
@@ -194,11 +189,10 @@
\begin{methoddesc}[SOAPMessage]{serialize}{}
Serialize the message data into a valid XML or MIME string. After the
\method{serialize()} method has been called, the serialized message is
-available as the \code{XXX} attribute of the \class{SOAPMessage}.
+available as the \code{body} attribute of the \class{SOAPMessage}.
-This method will call the \method{beforeSerialize()} before beginning
-serialization and \method{afterSerialize()} afterward, making it easy
-for subclasses to provide custom message processing.
+This method may be overridden by subclasses to customize SOAP message
+processing.
\end{methoddesc}
\begin{methoddesc}[SOAPMessage]{deserialize}{}
@@ -206,29 +200,8 @@
should only be called on instances initialized from existing SOAP message
data.
-This method will call the \method{beforeDeserialize()} before beginning
-deserialization and \method{afterDeserialize()} afterward, making it easy
-for subclasses to provide custom message processing.
-\end{methoddesc}
-
-\begin{methoddesc}[SOAPMessage]{beforeSerialize}{}
-This method is called before serialization starts. Derived classes can
-implement this method to customize message processing.
-\end{methoddesc}
-
-\begin{methoddesc}[SOAPMessage]{afterSerialize}{}
-This method is called after serialization is complete. Derived classes
-can implement this method to customize message processing.
-\end{methoddesc}
-
-\begin{methoddesc}[SOAPMessage]{beforeDeserialize}{}
-This method is called before deserialization starts. Derived classes can
-implement this method to customize message processing.
-\end{methoddesc}
-
-\begin{methoddesc}[SOAPMessage]{afterDeserialize}{}
-This method is called after deserialization is complete. Derived classes
-can implement this method to customize message processing.
+This method may be overridden by subclasses to customize SOAP message
+processing.
\end{methoddesc}
=== Packages/WebService/doc/WebService.html 1.2 => 1.3 === (4366/4466 lines abridged)
-<html>
-<head>
-<title>Web Services for Python</title>
-<META NAME="description" CONTENT="Web Services for Python">
-<META NAME="keywords" CONTENT="WebService">
-<META NAME="resource-type" CONTENT="document">
-<META NAME="distribution" CONTENT="global">
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<link rel="STYLESHEET" href="WebService.css">
-</head>
-<body>
-<DIV CLASS="navigation">
-<table align="center" width="100%" cellpadding="0" cellspacing="2">
-<tr>
-<td><img src="../icons/blank.gif"
- border="0" height="32"
- alt="" width="32"></td>
-<td><img src="../icons/blank.gif"
- border="0" height="32"
- alt="" width="32"></td>
-<td><img src="../icons/blank.gif"
- border="0" height="32"
- alt="" width="32"></td>
-<td align="center" width="100%">Web Services for Python</td>
-<td><img src="../icons/blank.gif"
- border="0" height="32"
- alt="" width="32"></td>
-<td><img src="../icons/blank.gif"
- border="0" height="32"
- alt="" width="32"></td>
-</tr></table>
-<br><hr>
-</DIV>
-<!--End of Navigation Panel-->
-
-<P>
-
-<div class="titlepage">
-<center>
-<h1>Web Services for Python</h1>
-<p><b><font size='+2'>Brian Lloyd</font></b></p>
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>Web Services for Python</title>
+<META NAME="description" CONTENT="Web Services for Python">
+<META NAME="keywords" CONTENT="WebService">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
[-=- -=- -=- 4366 lines omitted -=- -=- -=-]
+</p>
+
+<p> <a
+ href="http://saftsack.fs.uni-bayreuth.de/~latex2ht/">
+ <strong>LaTeX</strong>2<tt>HTML</tt></a> is Copyright ©
+ 1993, 1994, 1995, 1996, 1997, <a
+ href="http://cbl.leeds.ac.uk/nikos/personal.html">Nikos
+ Drakos</a>, Computer Based Learning Unit, University of
+ Leeds, and Copyright © 1997, 1998, <a
+ href="http://www.maths.mq.edu.au/~ross/">Ross
+ Moore</a>, Mathematics Department, Macquarie University,
+ Sydney.
+</p>
+
+<p> The application of <a
+ href="http://saftsack.fs.uni-bayreuth.de/~latex2ht/">
+ <strong>LaTeX</strong>2<tt>HTML</tt></a> to the Python
+ documentation has been heavily tailored by Fred L. Drake,
+ Jr. Original navigation icons were contributed by Christopher
+ Petrilli.
+</p>
+
+<DIV CLASS="navigation">
+<p><hr>
+<table align="center" width="100%" cellpadding="0" cellspacing="2">
+<tr>
+<td><img src="../icons/blank.gif"
+ border="0" height="32"
+ alt="" width="32"></td>
+<td><img src="../icons/blank.gif"
+ border="0" height="32"
+ alt="" width="32"></td>
+<td><img src="../icons/blank.gif"
+ border="0" height="32"
+ alt="" width="32"></td>
+<td align="center" width="100%">Web Services for Python</td>
+<td><img src="../icons/blank.gif"
+ border="0" height="32"
+ alt="" width="32"></td>
+<td><img src="../icons/blank.gif"
+ border="0" height="32"
+ alt="" width="32"></td>
+</tr></table>
+<hr>
+<span class="release-info">Release 1.0, documentation updated on Oct 29, 2001.</span>
+</DIV>
+<!--End of Navigation Panel-->
+
+</BODY>
+</HTML>
=== Packages/WebService/doc/WebService.pdf 1.1 => 1.2 ===
=== Packages/WebService/doc/WebService.tex 1.3 => 1.4 ===
\input{XMLWriter}
+\input{Serializer}
+
\input{XMLSchema}
\input{Transports}