Bug 320 - OGC error handling does not handle XML headers etc.
: OGC error handling does not handle XML headers etc.
Status: RESOLVED FIXED
: Chameleon
Widget
: 1.99
: PC Windows 2000
: P2 normal
: 1.99 beta 4
Assigned To:
:
:
:
:
:
  Show dependency treegraph
 
Reported: 2004-03-23 10:04 by
Modified: 2004-12-02 21:27 (History)


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2004-03-23 10:04:47
E.g. in ExpressionBuilder.widget.php:

        if ( !is_array( $aszFile ) || 
             strtoupper( substr( $aszFile[0], 0, 23 ) ) 
== "<SERVICEEXCEPTIONREPORT" )

it is checked whether or not the first 23 characters received are 
<ServiceExceptionReport.

This works for Mapserver, but if a WMS has a response with a XML header and/or 
a DTD declaration etc., this does not work.

The same code is also present in the ExtractWFSData widget.
------- Comment #1 From 2004-04-01 14:40:19 -------
this should be fixed for the next release.
------- Comment #2 From 2004-04-06 15:58:15 -------
fixed in CVS.  The entire file is now searched for "serviceexception".
------- Comment #3 From 2004-06-22 15:36:39 -------
Bart, is it possible for you to verify this bug. 
------- Comment #4 From 2004-06-22 15:49:25 -------
I checked this bug (with the CVS version) by using the ExpressionBuilder on an 
ArcIMS WMS adapter, which does not support DescribeLayer.

I still get exception handling which is not very nice.

The following happens:
Warning: invalid argument supplied for foreach() .... in ExpressionBuilder.php 
on line 176.

With the ExtractWFSData I get a javascript error message that the describelayer 
request failed, but the message contains something like %1$s ???
------- Comment #5 From 2004-06-22 16:10:07 -------
I looked a little deeper in what is happening here, at least with the 
ExpressionBuilder.

The OGC exception is caught now, but the code in ExpressionBuilder.php still 
assumes getting an array back from the getWFSConnection function.

ArcIMS returns:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ServiceExceptionReport SYSTEM "http://192.168.3.107:
8080/wmsconnector/schema/wms/1.1.1/WMS_exception_1_1_1.dtd">
<ServiceExceptionReport version="1.1.1">
<ServiceException >
Invalid REQUEST value. If doGet, then REQUEST Should be 
[map|GetMap|capabilities|GetCapabilities].
</ServiceException>
</ServiceExceptionReport>

And in layerattributes.php the getWFSResource function returns false because of 
the following check, which works correctly now:

    // check to see if an error was generated
    if ( strpos( strtoupper( $szXMLFile ), '<SERVICEEXCEPTIONREPORT' ) !== false 
)
    {
        return false;
    }
------- Comment #6 From 2004-06-24 08:01:14 -------
Thanks Bart, I'll fix that the first chance I get.
------- Comment #7 From 2004-06-24 10:23:56 -------
Same as bug 187: Changing the version of this bug, but also the target to "-".
the target defined
as "1.99 beta release" is no longer going to be active.

Paul and Darren, should decide whether this will be a fix for 1.99 beta 2 or beta 3.

Thanks
------- Comment #8 From 2004-06-24 12:01:44 -------
updating the version to 1.99
------- Comment #9 From 2004-07-05 14:21:58 -------
Bart, is it possible for you to commit a fix for this?
------- Comment #10 From 2004-07-06 02:09:40 -------
Committed to CVS. Can somebody verify?
------- Comment #11 From 2004-07-06 15:34:14 -------
Bart, I don't see your changes in either the expression builder or in the
extractwfs widgets.  Did you commit to CVS?
------- Comment #12 From 2004-07-06 15:53:59 -------
Bill, it is revision 1.9 of ExpressionBuilder.php.

I did not update/check the ExtractWFSData as yet, will do this on Thursday 
probably.
------- Comment #13 From 2004-07-06 16:07:38 -------
Yaaarg, sorry, my mistake.  I updated the widget file(instead of the php file)
and checked the log, when I didn't see a comment from you I fired off this question.

I looked at te code and everything seems to be in order.  I don't have an ArcIMS
connection to use to test this fix.

Is there anyone else that could test this?
------- Comment #14 From 2004-10-25 08:24:16 -------
Changed target for verification to 1.99 RC 1.