MapTools.org

[Chameleon] Problem interpreting results from CatalogSearch w idget

Hans Verlouw Hans.Verlouw@Geodan.nl
Wed, 05 Nov 2003 00:48:10 +0100
Hi Tom,

I forgot to mention, but I caught the request that was generated, and 
tested this in a browser.
The request generated is:
http://ceomap2.ccrs.nrcan.gc.ca/cgi-bin/cslt/wes/service_manager/catquery?RS=XML&catalog=http%3A%2F%2Fceomap2.ccrs.nrcan.gc.ca%2Fcgi-bin%2Fcslt%2Fwes%2Fservice_manager%2Fcatquery&QUERY=SRS%3D%27EPSG%3A4326%27%0D%0AAND+title+like+%27%25Drainage%20Network%201M%20-%20Island%20(lines)%25%27%0D%0AAND+Format%3D%27gif%27%0D%0AAND+ServiceType%3D%27Web+Mapping+Layer%27+%0D%0AAND+Intersects%28LatLongBoundingBox%2C%0D%0A%09%09Envelope%28-160%2C+-50%2C+50%2C+10%29%29%0D%0A%09%09%09&SCHEMA=ISO19119&ESN=f&WANTCONTENT=XML&SEARCH=SEARCH
I get a normal response, that is the one dataset I requested, and the 
response is complete.
If I make my request 'wider', so it results in over 5 datasets I get a 
timeout in Chameleon, even if I increase the timeout in cwc2.xml.
But that's another problem, which I hope will be solved when we have our 
own WCaS up and running.
So that's not the real problem.
So the XML returned looks good. The problem is interpreting this returned XML.
Do you have a CatalogSearch widget running well in an app?

Hans


At 11/4/2003 07:54 PM, Tom Kralidis [Burlington] wrote:

>Hi,
>
>This may be because a Service Exception report is being returned in the
>response, instead of the structure you are expecting.  Can you print out the
>query string for the catalog URL and test in a web browser?  What does the
>raw XML response say?
>
>..Tom
>
>=========================
>Tom Kralidis
>Systems Scientist
>Environment Canada
>Tel: +01-905-336-4409
>http://www.ec.gc.ca/cise/
>=========================
>
>-----Original Message-----
>From: Hans Verlouw [mailto:Hans.Verlouw@Geodan.nl]
>Sent: Tuesday, November 04, 2003 1:43 PM
>To: chameleon@lists.maptools.org
>Subject: [Chameleon] Problem interpreting results from CatalogSearch widget
>
>
>I have a problem interpreting results from the Catalog Search widget.
>Don't know if it's a Chameleon problem or PHP problem,
>but when I get results from the catalog server
>($oXMLDoc->searchResponse->value->searchStatus->attributes['numberOfRecords'
>] > 0)
>I cannot retrieve the subelements of array ISO19119 in the XML doc.
>The core of the original code goes like:
>
>$nbIso =
>count($oXMLDoc->searchResponse->value->searchResults->value->ISO19119);
>for($i=0; $i < $nbIso; $i++)
>{
>      $oRes =&
>$oXMLDoc->searchResponse->value->searchResults->value->ISO19119[$i];
>      $szLayerTitle    = $oRes->value->citation->value->title->value;
>      echo $szLayerTitle;
>}
>
>So I can interprete the response I get up to the level of
>$oXMLDoc->searchResponse->value->searchStatus
>but not deeper.
>My query was fulll response, so URL parameter ESN=f
>Can somebody tell me what is wrong here?
>
>Thanks in advance,
>
>
>Hans Verlouw
>-------------------------------------
>Geodan SDT b.v.
>Buitenhaven 27-A
>5211 TP 's-Hertogenbosch (NL)
>-------------------------------------
>Tel: +31 (0)73 - 692 5151
>Fax:  +31 (0)73 - 692 5150
>-------------------------------------
>Postadres / mailing address
>President Kennedylaan 1
>1079 MB Amsterdam (NL)
>-------------------------------------
>E-mail: Hans.Verlouw@Geodan.nl
>Website: www.geodan.nl
>Disclaimer: www.geodan.nl/disclaimer
>-------------------------------------



This archive was generated by Pipermail.