SAX Parsing Error only on some servers

Discussion in 'XML' started by Rick Brandt, Jun 18, 2004.

  1. Rick Brandt

    Rick Brandt Guest

    I send an XML character stream to a Java servlet with an HTTPRequest and
    get the following error on both of our web servers hosting the servlet.

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

    If I send the exact same request to my local instance of the servlet
    running in JBuilder's IDE it parses just fine which is making this a real
    bitch to troubleshoot. (JBuilder 7)

    I have my WAR file including ALL classes and resources that pertain to XML
    and it makes no difference.

    Here is the XML I am sending...

    <?xml version="1.0"?>
    <MBO>
    <Record>
    <ID>1086379850</ID>
    <OrderDate><![CDATA[2004-06-04 15:10:50]]></OrderDate>
    <MemoBillType>5</MemoBillType>
    <AccountNum><![CDATA[xxxx]]></AccountNum>
    <BillToAddress><![CDATA[sample company name[LINE]blah blah
    blah[LINE]123 main street[LINE]Anytown MO 63366]]></BillToAddress>
    <ShipToAddress><![CDATA[Same as Bill To Address]]></ShipToAddress>
    <RegMgr><![CDATA[Joe Blow / RD]]></RegMgr>
    <SecCode><![CDATA[999999-999999]]></SecCode>
    <Notes><![CDATA[NULL_VALUE]]></Notes>
    <RequireDate><![CDATA[Whenever ready]]></RequireDate>
    <RackInfo><![CDATA[NULL_VALUE]]></RackInfo>
    <CallPhoneNumber><![CDATA[NULL_VALUE]]></CallPhoneNumber>
    <SubRecord_A>
    <LineNum>1</LineNum>
    <Quantity>1</Quantity>
    <PartNum><![CDATA[123-456-789]]></PartNum>
    <ShipDesignation><![CDATA[NULL_VALUE]]></ShipDesignation>
    <Price>NULL_VALUE</Price>
    <Discount><![CDATA[NULL_VALUE]]></Discount>
    <Notes><![CDATA[HDT frame off set measuring tool. This is ordered to
    replace broken tool. Old tool will be returned upon receipt of
    replacement.]]></Notes>
    </SubRecord_A>
    </Record>
    </MBO>

    If the text in the last <Notes> node is shortened to less than 32
    characters it will submit on my servers. I can't understand what is
    happening unless the XML that is being received is somehow altered compared
    to the XML being sent. I have similar operations where the text in a node
    is much longer than this and have never had any problems.

    Any idea what I should be looking for? This program has been in use for a
    couple of years without this complaint. I have one user that reported the
    problem which I was able to duplicate using the same data sending from a
    client on my PC, but I have similar records that submit just fine. I can
    also copy the XML into a local file and my web browser sees no problems
    with it.


    --
    I don't check the Email account attached
    to this message. Send instead to...
    RBrandt at Hunter dot com
     
    Rick Brandt, Jun 18, 2004
    #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. ad
    Replies:
    2
    Views:
    742
  2. Naren
    Replies:
    0
    Views:
    599
    Naren
    May 11, 2004
  3. Paul Winkler
    Replies:
    6
    Views:
    418
    Paul Winkler
    Apr 15, 2005
  4. Sidhartha
    Replies:
    1
    Views:
    537
    Martin Honnen
    Sep 15, 2008
  5. Daniel Harple
    Replies:
    0
    Views:
    131
    Daniel Harple
    Dec 23, 2005
Loading...

Share This Page