You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@xml.apache.org by Wouter Cloetens <wo...@roadkill.intern.mind.be> on 2001/03/01 00:31:48 UTC

Re: Messaging-Sample: Processing messages?

On Tue, Feb 27, 2001 at 12:21:23PM +0100, Raymond Schulz wrote:

> i tried the messaging sample of the Apache Soap-Implementation and it
> worked. But there's no description how to process the received message
> serverside. 

Um, yes, documentation is "to be done"...
 
> The Method 'purchaseOrder' of class 'samples.messaging.POProcessor' has
> three parameters 
> 	purchaseOrder(Envelope env, SOAPContext reqCtx, SOAPContext resCtx).
> 
> First, is it necessary to exactly use this signature?

Yep. I'm hoping we will be able to detect multiple signatures to allow
for simpler cases in the future.

> In order to get the whole message I could write out the reqCtx or the body
> of the envelope-object to an OutputStream.
> Is there an easy way to process the received information? Or, i have to
> extract the information from the xml-Stream for myself (e.g. with xerces)?

Uh, there are better ways to inspect the Envelope object than to convert its
contents back from a DOM Element in the Body object, encapsulated in the
envelope object, back to a byte-encoded XML stream. No, you don't need to
parse it, it's already been done for you. (Somebody correct me if I'm
wrong).
You only need access to the reqCtx if there are specific data (HTTP
session info, MIME attachments etc.) about the request.

bfn, Wouter