I would use FireBug to capture that getFeatureInfo call and then try that by itself and see if you get any error.  <br><br>If not, set OpenLayers aside and get a valid getFeatureInfo request working by directly  hitting your WMS instance.  If you have problems with that, ask the MapServer list.  <br>
<br>There are several things that you need to do to make a getFeatureInfo request to work with MapServer.  There are required metadata elements in your mapfile, and the layer needs to be queryable (needs a template).  <br>
<br>David.<br><br><div class="gmail_quote">On Mon, Jan 25, 2010 at 8:15 AM, stela anders <span dir="ltr">&lt;<a href="mailto:stelaanders@gmail.com">stelaanders@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
It was a MSSQL2008 error... <br>Now, I´m trying to get a WMSGetFeatureInfo of a Point layer...<br><br>But I always got NO features .<br><br>function showInfo(evt) { <br>   alert(evt.text);<br>}<br><br>The text property is returning :<br>

Content-type: application/vnd.ogc.se_xml<div class="im"><br><br>&lt;?xml version=&#39;1.0&#39; encoding=&quot;ISO-8859-1&quot; standalone=&quot;no&quot; ?&gt;<br></div>&lt;!DOCTYPE ServiceExceptionReport SYSTEM &quot;<a href="http://schemas.opengis.net/wms/1.1.1/exception_1_1_1.dtd" target="_blank">http://schemas.opengis.net/wms/1.1.1/exception_1_1_1.dtd</a>&quot;&gt;<br>

&lt;ServiceExceptionReport version=&quot;1.1.1&quot;&gt;<br>&lt;ServiceException&gt;<br>&lt;/ServiceException&gt;<br>&lt;/ServiceExceptionReport&gt;<br><br>Any idea?<br><br>Thanks<br><br>Stella<br><br><br><div class="gmail_quote">

2010/1/21 David Fawcett <span dir="ltr">&lt;<a href="mailto:david.fawcett@gmail.com" target="_blank">david.fawcett@gmail.com</a>&gt;</span><div><div></div><div class="h5"><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

Stella, <br><br>The below info indicates a problem in MapServer, not OpenLayers.  I would set OpenLayers aside for a little bit and get your map working in basic MapServer CGI mode=map.  This will confirm that MapServer can draw the data based on your query to MS SQL Server.  <br>


<br>Once you know that the data source works, then go back to making WMS calls.  <br><br>If you have more questions on this, I would suggest posting to the MapServer list.<br><font color="#888888"><br>David.</font><div><div>

</div><div><br><br><div class="gmail_quote">On Wed, Jan 20, 2010 at 12:12 PM, stela anders <span dir="ltr">&lt;<a href="mailto:stelaanders@gmail.com" target="_blank">stelaanders@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Guys, debuging WMSGetFeatureInfo.js, the  layers[i].params.STYLES is empty (&quot;&quot;) ...<br>


Is that the error cause? How to define that STYLES property?<br><br>So, just for testing purpose, I commented the follow line:<br>
 //styles: styleNames,<br><br>Than I got I Mssql2008 error :<br><br>msMSSQL2008LayerGetShape(): Query error. Error executing MSSQL2008 SQL statement: SELECT convert(varchar(max), oid),convert(varchar(max), name),the_geom.STAsBinary(),convert(varchar(20), oid) from viwargentina WHERE the_geom.STIntersects(Geometry::STGeomFromText(&amp;#39;POLYGON((-56.0839061594084 -12.4474347926471,-56.0839061594084 -12.4474347926471,-56.0839061594084 -12.4474347926471,-56.0839061594084 -12.4474347926471,-56.0839061594084 -12.4474347926471))&amp;#39;,0)) = 1 <br>



-[Microsoft][ODBC SQL Server Driver][SQL Server]<br><br>System.FormatException: 24305: <b>The Polygon input is not valid because the ring does not have enough distinct points. Each ring of a polygon must contain at least three distinct points.</b><br>



<br>Help me please<br><br>Stella<br><br><div class="gmail_quote">2010/1/20 stela anders <span dir="ltr">&lt;<a href="mailto:stelaanders@gmail.com" target="_blank">stelaanders@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">



Hello Steve...<br><br>I done everthing you suggest me...<br>But got the same error ...<br><br>I also took of Uruguay layer... And use only Argentina layer...<br><br>Do you have any other idea? :(<br><br>Thanks so much<br>



<br>
Stella<div><div></div><div><br><br><div class="gmail_quote"><div>2010/1/19  <span dir="ltr">&lt;<a href="mailto:Steve.Toutant@inspq.qc.ca" target="_blank">Steve.Toutant@inspq.qc.ca</a>&gt;</span><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">





<p><font size="3">In the mapfile, you must define a tolerance and a template
for both layer (Argentina and Uruguay)</font>
<br><font size="3">TOLERANCE 0</font>
<br><font size="3">TEMPLATE &#39;../template/query.html&#39;</font>
<br>
<br><font size="3">just add &quot;[oid]&quot; in your query.html for now.</font>
</p><p><font size="3">In OL</font>
</p><p><font size="3">You are querying every layer with a template. Keep it simple
and try first with one layer</font>
<br><font size="3"><div><div> var _wmsControl = new OpenLayers.Control.WMSGetFeatureInfo({
<br>
                   //url
: _mapfilex,               
<br>
                   
title: &#39;Click on the map to get information on layers&#39;, <br>
                   
queryVisible: true, <br></div></div>
                   
infoFormat: &#39;text/html&#39; ,</font>
<br><font size="3">        layers:    
    [YOURLAYERNAME of new OpenLayers.Layer.WMS.....]<br>
               
});</font>
</p><p><font size="3">give it a try...</font>
</p><p>
<br>
<br>
<br>
</p><table width="100%">
<tbody><tr valign="top">
<td width="40%"><div><div><font size="1" face="sans-serif"><b>stela anders &lt;<a href="mailto:stelaanders@gmail.com" target="_blank">stelaanders@gmail.com</a>&gt;</b>
</font>
</div></div><p><font size="1" face="sans-serif">19/01/2010 02:16 PM</font>
</p></td><td width="59%">
<table width="100%">
<tbody><tr valign="top">
<td>
<div align="right"><font size="1" face="sans-serif">A</font></div>
</td><td><div></div></td><td><div><font size="1" face="sans-serif"><a href="mailto:Steve.Toutant@inspq.qc.ca" target="_blank">Steve.Toutant@inspq.qc.ca</a></font>
</div></td></tr><tr valign="top">
<td>
<div align="right"><font size="1" face="sans-serif">cc</font></div>
</td><td><font size="1" face="sans-serif">openlayers user list &lt;<a href="mailto:users@openlayers.org" target="_blank">users@openlayers.org</a>&gt;,
<a href="mailto:users-bounces@openlayers.org" target="_blank">users-bounces@openlayers.org</a></font>
</td></tr><tr valign="top">
<td>
<div align="right"><font size="1" face="sans-serif">Objet</font></div>
</td><td><font size="1" face="sans-serif">Re: RE [OpenLayers-Users] WMSGetFeatureInfo
error (Style (undefined)         not defined
on layer) ...</font></td></tr></tbody></table>
<br>
<table>
<tbody><tr valign="top">
<td>
</td><td></td></tr></tbody></table>
<br></td></tr></tbody></table><div><div></div><div><div><div></div><div>
<br>
<br>
<br>
<br>
<br><font size="3">Hi Steve...<br>
<br>
Mapserver version:<br>
MapServer version 5.6.0-beta4 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP
OUTPUT=PDF OUTPUT=SWF OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE<br>
SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT
SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER<br>
SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS SUPPORTS=RGBA_PNG INPUT=JPEG
INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE<br>
<br>
<br>
One layer definition (Mapfile)<br>
<br>
LAYER<br>
        NAME Argentina<br>
        METADATA<br>
            &quot;wms_title&quot;   
&quot;Argentina&quot;   ##required       
    <br>
            &quot;wms_feature_info_mime_type&quot;
&quot;text/html&quot; <br>
        END<br>
        GROUP &quot;Test&quot;<br>
        TYPE POLYGON<br>
        STATUS ON<br>
        INCLUDE &quot;Connection.map&quot; 
##MSSQL2008        <br>
        DATA &quot;the_geom from viwargentina
USING UNIQUE oid USING SRID=0&quot;<br>
        PROJECTION<br>
            &quot;+init=epsg:4326&quot;<br>
        END<br>
<br>
        CLASS<br>
            COLOR 255 200
255<br>
            STYLE<br>
               
OUTLINECOLOR 190 190 190<br>
               
WIDTH 1<br>
            END<br>
        END<br>
    END<br>
<br>
<br>
I´m using GeoExt to be able to use Sublayers, one layer definition :<br>
<br>
               
new OpenLayers.Layer.WMS(&quot;Country&quot;,<br>
               
_mapfile, {<br>
                   
layers: [&#39;Argentina&#39;, &#39;Uruguay&#39;],<br>
                   
format: &quot;image/png&quot;,<br>
                   
transparent: &quot;true&quot;<br>
               
}, {<br>
                   
isBaseLayer: true,<br>
                   
buffer: 0,<br>
                   
visibility: true<br>
               
}),<br>
<br>
Event to register control:<br>
_wmsControl.events.register(&quot;getfeatureinfo&quot;,map,showInfo); <br>
<br>
Thanks<br>
<br>
</font>
<br><font size="3">2010/1/19 &lt;</font><a href="mailto:Steve.Toutant@inspq.qc.ca" target="_blank"><font size="3" color="blue"><u>Steve.Toutant@inspq.qc.ca</u></font></a><font size="3">&gt;</font>
<br><font size="2" face="sans-serif"><br>
Wich mapServer version?</font><font size="3"> </font><font size="2" face="sans-serif"><br>
Can you send one layer definition of the mapfile and how you create the
Ol layer for this layer?</font><font size="3"> </font><font size="2" face="sans-serif"><br>
Do you register an event for this control, please provide all the code
related to this control.</font><font size="3"> </font><font size="2" face="sans-serif"><br>
steve</font><font size="3"> </font>
<p><font size="3"><br>
<br>
</font>
</p><p>
</p><table width="100%">
<tbody><tr valign="top">
<td width="40%"><font size="1" face="sans-serif"><b>stela anders &lt;</b></font><a href="mailto:stelaanders@gmail.com" target="_blank"><font size="1" color="blue" face="sans-serif"><b><u>stelaanders@gmail.com</u></b></font></a><font size="1" face="sans-serif"><b>&gt;@</b></font><a href="http://openlayers.org/" target="_blank"><font size="1" color="blue" face="sans-serif"><b><u>openlayers.org</u></b></font></a><font size="1" face="sans-serif">
<br>
Envoyé par : </font><a href="mailto:users-bounces@openlayers.org" target="_blank"><font size="1" color="blue" face="sans-serif"><u>users-bounces@openlayers.org</u></font></a><font size="3">
</font>
<p><font size="1" face="sans-serif">19/01/2010 01:36 PM</font><font size="3">
</font>
</p></td><td width="59%">
<br>
<table width="100%">
<tbody><tr valign="top">
<td width="5%">
<div align="right"><font size="1" face="sans-serif">A</font></div>
</td><td width="94%"><font size="1" face="sans-serif">openlayers user list &lt;</font><a href="mailto:users@openlayers.org" target="_blank"><font size="1" color="blue" face="sans-serif"><u>users@openlayers.org</u></font></a><font size="1" face="sans-serif">&gt;</font><font size="3">
</font>
</td></tr><tr valign="top">
<td>
<div align="right"><font size="1" face="sans-serif">cc</font></div>
</td><td>
</td></tr><tr valign="top">
<td>
<div align="right"><font size="1" face="sans-serif">Objet</font></div>
</td><td><font size="1" face="sans-serif">[OpenLayers-Users] WMSGetFeatureInfo
error (Style (undefined) not        defined on layer)
...</font></td></tr></tbody></table>
<br>
<br>
<table width="100%">
<tbody><tr valign="top">
<td width="50%">
</td><td width="50%"></td></tr></tbody></table>
<br></td></tr></tbody></table>
<br><font size="3"><br>
<br>
<br>
<br>
<br>
Hiii !!<br>
<br>
I´m using Mapserver WMS + Openlayers...<br>
I created a WMSGetFeatureInfo control, when I try to use I got that error:
<br>
<br>
&lt;?xml version=&#39;1.0&#39; encoding=&quot;ISO-8859-1&quot; standalone=&quot;no&quot;
?&gt;<br>
&lt;!DOCTYPE ServiceExceptionReport SYSTEM &quot;</font><a href="http://schemas.opengis.net/wms/1.1.0/exception_1_1_0.dtd" target="_blank"><font size="3" color="blue"><u>http://schemas.opengis.net/wms/1.1.0/exception_1_1_0.dtd</u></font></a><font size="3">&quot;&gt;<br>





&lt;ServiceExceptionReport version=&quot;1.1.0&quot;&gt;<br>
&lt;ServiceException code=&quot;StyleNotDefined&quot;&gt;<br>
msWMSLoadGetMapParams(): WMS server error. Style (undefined) not defined
on layer.<br>
&lt;/ServiceException&gt;<br>
&lt;/ServiceExceptionReport&gt;<br>
<br>
<br>
My control :<br>
<br>
 var _wmsControl = new OpenLayers.Control.WMSGetFeatureInfo({ <br>
                   
url : _mapfilex,               
<br>
                   
title: &#39;Click on the map to get information on layers&#39;, <br>
                   
queryVisible: true, <br>
                   
infoFormat: &#39;application/vnd.ogc.wms_xml&#39; <br>
               
});<br>
<br>
<br>
All layers on my mapfile have Style defined... <br>
<br>
Any idea?<br>
<br>
Thanks<br>
<br>
Stella</font><tt><font size="2">_______________________________________________<br>
Users mailing list</font></tt><tt><font size="2" color="blue"><u><br>
</u></font></tt><a href="mailto:Users@openlayers.org" target="_blank"><tt><font size="2" color="blue"><u>Users@openlayers.org</u></font></tt></a><tt><font size="2" color="blue"><u><br>
</u></font></tt><a href="http://openlayers.org/mailman/listinfo/users" target="_blank"><tt><font size="2" color="blue"><u>http://openlayers.org/mailman/listinfo/users</u></font></tt></a><font size="3"><br>
<br>
<br>
</font>
<br>
<br>
<br>
<br></div></div></div></div></blockquote></div><br>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@openlayers.org" target="_blank">Users@openlayers.org</a><br>
<a href="http://openlayers.org/mailman/listinfo/users" target="_blank">http://openlayers.org/mailman/listinfo/users</a><br>
<br></div></div></blockquote></div><br>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@openlayers.org" target="_blank">Users@openlayers.org</a><br>
<a href="http://openlayers.org/mailman/listinfo/users" target="_blank">http://openlayers.org/mailman/listinfo/users</a><br>
<br></blockquote></div><br>
</div></div></blockquote></div></div></div><br>
</blockquote></div><br>