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

Discussion in 'Java' started by Fahad, Nov 16, 2005.

  1. Fahad

    Fahad Guest

    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 :(


    --
    Fahad Aijaz
     
    Fahad, Nov 16, 2005
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bernd Oninger
    Replies:
    0
    Views:
    792
    Bernd Oninger
    Jun 9, 2004
  2. Bernd Oninger
    Replies:
    0
    Views:
    842
    Bernd Oninger
    Jun 9, 2004
  3. PerlFAQ Server
    Replies:
    0
    Views:
    733
    PerlFAQ Server
    Feb 3, 2011
  4. PerlFAQ Server
    Replies:
    0
    Views:
    740
    PerlFAQ Server
    Apr 4, 2011
  5. Replies:
    13
    Views:
    262
    Ned Deily
    Apr 13, 2013
Loading...

Share This Page