org.kxml.parser.XmlParser$DefaultParserException: Attribute name ressmust be followed by '='! @8:176

F

Fahad

Hello Friends,

If I have received the following xml from the client via UDP:

<SOAP-ENV:Envelope
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">
<SOAP-ENV:Header>
<wsa:To>datagram://127.0.0.1:9090/soaprpc</wsa:To>
<wsa:Action>urn:Services#echoString</wsa:Action>
<wsa:MessageId>uuid:95946541-2ce-d590dbc-22e14a74</wsa:MessageId>
<wsa:ReplyTo>

<wsa:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:Address>
</wsa:ReplyTo>
</SOAP-ENV:Header>
<SOAP-ENV:Body
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<echoString xmlns="urn:Services" id="o0" SOAP-ENC:root="1">
<String xmlns="" xsi:type="xsd:string">a</String>
</echoString>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Does any one of you have any idea (or can see what i cannot may be :S)
what could be the cause of the following exception when I use the
method extractRoot(..) pasted below, to parse it? I am using kXML in
J2ME environment.

org.kxml.parser.XmlParser$DefaultParserException: Attribute name
ressmust be followed by '='! @8:1764
at org.kxml.parser.XmlParser.parseStartTag(+169)
at org.kxml.parser.XmlParser.parseSpecial(+145)
at org.kxml.parser.XmlParser.peek(+106)
at org.kxml.kdom.Node.parse(+6)
at org.kxml.kdom.Element.parse(+45)
at org.kxml.kdom.Node.parse(+80)
at org.kxml.kdom.Element.parse(+45)
at org.kxml.kdom.Node.parse(+80)
at org.kxml.kdom.Element.parse(+45)
at org.kxml.kdom.Node.parse(+80)
at org.kxml.kdom.Document.parse(+5)
at cnsoap.server.UDPServerThread.extractRoot(+45)
at cnsoap.server.UDPServerThread.await(+794)
at cnsoap.server.UDPServerThread.run(+9)

private void extractRoot(Datagram incomingPacket) throws IOException
{

// incomingPacket.getData() returns the xml I have pasted above
InputStreamReader reader = new InputStreamReader (new
ByteArrayInputStream(incomingPacket.getData()));
XmlParser xp = new XmlParser(reader);
Document doc = new Document();
doc.parse(xp);
root = doc.getRootElement(); // root is an instance member of
the class
}

Suggestions please :(
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top