You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@ws.apache.org by Anne Thomas Manes <an...@manes.net> on 2002/02/01 02:34:30 UTC

RE: RPC Vs Messaging

Nice concise description, Gary, but I should point out that the RPC
programming model and the encoding system are orthogonal. You can use
literal with RPC, and you can use encoded with Document.

Anne

> -----Original Message-----
> From: Gary Feldman [mailto:gaf@rtr.com]
> Sent: Thursday, January 31, 2002 11:50 AM
> To: soap-user@xml.apache.org
> Subject: RE: RPC Vs Messaging
>
>
> > From: Krishnamurthy, Ramanathan [mailto:rkrishnamurthy@APEngines.com]
> > Sent: Wednesday, January 30, 2002 5:43 PM
> >
> > Is this distinction necessary ? Isn't messaging a special case of RPC.
>
> The terminology itself is confusing.  I'm not sure where this
> usage started,
> but
> I think it's wrong.  And I think you have it backwards (RPC is the special
> case).
>
> Here's my take:
>
> SOAP defines a message protocol.  Thus everything is a message, and a SOAP
> message is defined by the standard as being an XML document comprised of a
> SOAP envelope containing an optional header and required body.
>
> What some people call the message model (including, in some sense, the
> Apache SOAP
> API) is also called document-style SOAP (e.g., the new O'Reilly
> book on SOAP
> by Snell,
> et al uses this term), though I think "generic" might also be a reasonable
> term.  In
> any event, all SOAP says is that the body must be an XML element named
> "body".
>
> The RPC model adds to this (and thus is a subset) by adding an encoding
> scheme (technically it's just one possible encoding scheme, but it seems
> certain to be the de
> facto standard) and a model that defines parameters, requests, and
> responses.  Thus, it really is a special case of the more general document
> model that happens to use one
> particular set of rules for the content of the body of the SOAP message.
>
> Just to confound things, there's nothing stopping you from building an RPC
> system using the Apache SOAP "Message" model.
>
> Gary
>
> ====================================================================
>                   Ready-to-Run Software, Inc.
>               The Industry's Leading Provider of
>               Cross-Platform and Porting Services
>                  *****************************
> email: gaf@rtr.com                 Gary Feldman
> fax  : 1-978-692-5401              Ready-to-Run Software, Inc.
> voice: 1-978-251-5431              11 School Street
> www  : http://www.rtr.com          North Chelmsford, MA 01863
>                                                      USA
>


Why setIgnoringElementContentWhitespace method suddenly throw Throwable?

Posted by Tim Wei <ti...@yahoo.com>.
I have a method below. It was running fine before. Why suddenly
the following line of code throws me a Throwable with null
message?
dbf.setIgnoringElementContentWhitespace(true);

in the "catch (Throwable t)" block, it prints: Throwable caught
in toXML(): null

    public static Document toXML()
    {
        Document doc = null;
        try
        {
            DocumentBuilderFactory dbf =
DocumentBuilderFactory.newInstance();
            dbf.setIgnoringComments(true);
            dbf.setValidating(false);
            dbf.setIgnoringElementContentWhitespace(true);
            dbf.setCoalescing(true);
            dbf.setExpandEntityReferences(true);
            DocumentBuilder docBuilder = null;
            try
            {
                docBuilder = dbf.newDocumentBuilder();
            }
            catch (ParserConfigurationException pe)
            {
                System.out.println("ParserConfigurationException
caught in toXML(): " + pe.getMessage());
            }
            docBuilder.setErrorHandler(new DefaultHandler());
            doc = docBuilder.parse(new
File(EVENT_TEMPLATE_XML_FILE));
            // normalize text representation
            doc.getDocumentElement().normalize();
        } catch (SAXParseException err)
        {
            System.out.println("SAXParseException caught in
toXML(): " + err.getMessage());
        } catch (SAXException e)
        {
            System.out.println("SAXException caught in toXML():
" + e.getMessage());
        } catch (Exception ne)
        {
            System.out.println("Exception caught in toXML(): " +
ne.getMessage());
        } catch (Throwable t)
        {
            System.out.println("Throwable caught in toXML(): " +
t.getMessage());
        }
        return doc;
    }// end toXML()

=====
Tim's home page: 
http://www.geocities.com/timwei

__________________________________________________
Do You Yahoo!?
Great stuff seeking new owners in Yahoo! Auctions! 
http://auctions.yahoo.com

Why setIgnoringElementContentWhitespace method suddenly throw Throwable?

Posted by Tim Wei <ti...@yahoo.com>.
I have a method below. It was running fine before. Why suddenly
the following line of code throws me a Throwable with null
message?
dbf.setIgnoringElementContentWhitespace(true);

in the "catch (Throwable t)" block, it prints: Throwable caught
in toXML(): null

    public static Document toXML()
    {
        Document doc = null;
        try
        {
            DocumentBuilderFactory dbf =
DocumentBuilderFactory.newInstance();
            dbf.setIgnoringComments(true);
            dbf.setValidating(false);
            dbf.setIgnoringElementContentWhitespace(true);
            dbf.setCoalescing(true);
            dbf.setExpandEntityReferences(true);
            DocumentBuilder docBuilder = null;
            try
            {
                docBuilder = dbf.newDocumentBuilder();
            }
            catch (ParserConfigurationException pe)
            {
                System.out.println("ParserConfigurationException
caught in toXML(): " + pe.getMessage());
            }
            docBuilder.setErrorHandler(new DefaultHandler());
            doc = docBuilder.parse(new
File(EVENT_TEMPLATE_XML_FILE));
            // normalize text representation
            doc.getDocumentElement().normalize();
        } catch (SAXParseException err)
        {
            System.out.println("SAXParseException caught in
toXML(): " + err.getMessage());
        } catch (SAXException e)
        {
            System.out.println("SAXException caught in toXML():
" + e.getMessage());
        } catch (Exception ne)
        {
            System.out.println("Exception caught in toXML(): " +
ne.getMessage());
        } catch (Throwable t)
        {
            System.out.println("Throwable caught in toXML(): " +
t.getMessage());
        }
        return doc;
    }// end toXML()

=====
Tim's home page: 
http://www.geocities.com/timwei

__________________________________________________
Do You Yahoo!?
Great stuff seeking new owners in Yahoo! Auctions! 
http://auctions.yahoo.com