English

Bug: [ERR1006] Published document is not valid XML

Description

Publishing to an ArcIMS Metadata Service fails for valid documents by displaying the following error:

"[ERR1006] Published document is not valid XML".

Cause

Metadata Server is not resetting the XML parser error handler after a 'real' error has occurred. The error handler records XML parsing errors during processing of the ArcXML request and extraction of the metadata document from a publish request.

If an error occurs because of invalid XML, a correct response is returned, but a subsequent request to the same thread will also fail because the error handler hasn't been reset and still maintains the previous errors.

Workaround

For ArcIMS 9.0, the only way to get Metadata Server back into a good state is to restart the ArcIMS Monitor service.

For ArcIMS 9.1, sending a specific ArcXML request will reset the ArcIMS XML Parser.

Option A: If developing in Java, send this request programmatically using the JavaConnector:
 

ConnectionProxy aims = new ConnectionProxy();
aims.setConnectionType("http");
aims.setUrl(new URL ("http://mysite"));
aims.setService("Metadata");
String result = aims.send("<?xml version='1.0'?><REFRESH_ERROR_HANDLER/>");
System.out.println(result);

Option B: Use the SendArcXML HTML Viewer to send a request to Metadata Server which will reset the XML parser error handler. This is a downloadable ArcIMS sample available through the ESRI support site. Follow the procedure below to use this method.
 
  1. In a web browser window, open the SendArcXML HTML Viewer.

    For example:
    http://myserver/Website/SendArcXML/default.htm
  2. In the 'MapService' input field, type the name of the metadata service.
  3. Copy and paste the following ArcXML request into 'Request' field of the form.

    <?xml version="1.0"?>
    <REFRESH_ERROR_HANDLER/>

    Any valid XML request can be sent as long as the root element isn't <ARCXML>.
    Make sure to send the above request to all Metadata Server instances. The ArcXML error response contains thread and machine information. Note these when sending the request to make sure to hit all thread ids and machines on the network.