Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Problem with getting the content of the SOAPMessage

843834Oct 1 2004 — edited Nov 21 2006
Hi

I've got still the same problem - with reading a SOAP message on the servlet side (the one from client to servlet) - I can see the fallowing error:

"org.xml.sax.SAXParseException: The root element is required in a well-formed document."

I've edit both messages: the one from client to servlet and form servlet to client and they have some differeces(of course except those connected with the content od the messages)

CLIENT->SERVLET:

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmln
s:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSc
hema-instance">
<soapenv:Body>
<request-mqmessages xmlns="">
<request xmlns="">414d51204b4b514d475220202020202040cdafb100194012</request>
</request-mqmessages>
</soapenv:Body>
</soapenv:Envelope>

SERLVET->CLIENT:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><S
OAP-ENV:Header/><SOAP-ENV:Body><mqmessages-list><mqelem><mesg><niezdefiniowan
y></mesg><dir>1</dir><date>2004-03-02 17:36:43.0</date><state>javax.xml.soap.
character-set-encoding</state></mqelem></mqmessages-list></SOAP-ENV:Body></SOAP-
ENV:Envelope>

Two things I noticed are: in the second there are no "\n" signs between parts of the message and second - the header is a little different (and I can't understand that couse I use exactly the same mathods to make those messages!)

Maybe someone could tell me what's the reason of not working one of them and how to fix that?Pleeeease :)

ania
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 19 2006
Added on Oct 1 2004
3 comments
331 views