It may be your use of StringBufferInputStream.  The javadoc for this says
"Deprecated. This class does not properly convert characters into bytes. As
of JDK 1.1, the preferred way to create a stream from a string is via the
StringReader class."

Scott Nichol

----- Original Message -----
From: "Sebastian" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, August 01, 2002 5:02 AM
Subject: ServerUtils


Hello everyone!

I am trying to transport SOAP using BEEP. For this, I have written a
class which is supposed to read an InputStream and extract from it
the SOAP-Envelope. I have used the ServerUtils.readEnvelopeFromInputStream
method there but it doesn't seem to work, does anyone have an idea why?
I keep getting this exception:

"Exception caught:Root element of a SOAP message must be:
'http://schemas.xmlsoap.org/soap/envelope/:Envelope'."

Which is funny, because the message does have this element as a root
element.

Here is my code fragment (without the rest of the soap-string):

String msg = "<s:Envelope
xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\"...";;
StringBufferInputStream sstream = new StringBufferInputStream(msg);

SOAPContext ctx = new SOAPContext();

EnvelopeEditorAdapter editor = new EnvelopeEditorAdapter();

builder =
DocumentBuilderFactory.newInstance().newDocumentBuilder();

Envelope callEnv = ServerUtils.readEnvelopeFromInputStream
(builder, sstream, msg.length(),"text/xml", editor, ctx);


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to