<div dir="ltr">I have gotten a little farther and am running into an error that I believe might be MapGuide related. MgStreamIoException?<div><br></div><div><div class="" style="clear:right;border-top-width:1px;border-top-style:solid;border-top-color:rgb(240,240,240);padding:1px 22px 1px 0px;margin-left:24px;min-height:16px;color:rgb(0,0,0);font-family:Consolas,'Lucida Console',monospace;font-size:12px">
<ol class="" tabindex="0" style="font-size:inherit;list-style-type:none;margin:0px;outline:none;padding-left:0px;line-height:12px"><li title="" class="" style="padding:0px 0px 0px 14px;margin-top:1px;word-wrap:break-word">
<span class="" style="white-space:pre-wrap;color:red!important"><span style>POST <a href="http://localhost/mapguide/mapagent/mapagent.fcgi?USERNAME=Administrator&Password=admin" class="" title="http://localhost/mapguide/mapagent/mapagent.fcgi?USERNAME=Administrator&Password=admin" style="color:rgb(84,84,84)">http://localhost/mapguide/mapagent/mapagent.fcgi?USERNAME=Administrator&Password=admin</a> 559 (MgStreamIoException)</span> <a href="http://localhost/mapguide/RBAC%20Mobile%20GIS/lib/OpenLayers/Request/XMLHttpRequest.js" class="" title="http://localhost/mapguide/RBAC%20Mobile%20GIS/lib/OpenLayers/Request/XMLHttpRequest.js:220" style="float:right;text-align:right;max-width:100%;margin-left:4px;color:rgb(84,84,84)">XMLHttpRequest.js:220</a></span></li>
<ol class="" style="margin:0px;min-width:100%;list-style-type:none;font-size:inherit;padding:0px 0px 0px 12px!important"><li title="" style="padding:0px 0px 0px 14px;margin-top:1px;word-wrap:break-word"><div style><span class="" style="white-space:pre-wrap;color:red!important">fXMLHttpRequest_send</span><a href="http://localhost/mapguide/RBAC%20Mobile%20GIS/lib/OpenLayers/Request/XMLHttpRequest.js" class="" title="http://localhost/mapguide/RBAC%20Mobile%20GIS/lib/OpenLayers/Request/XMLHttpRequest.js:220" style="float:right;text-align:right;max-width:100%;margin-left:4px;color:rgb(84,84,84)">XMLHttpRequest.js:220</a></div>
</li><li title="" style="padding:0px 0px 0px 14px;margin-top:1px;word-wrap:break-word"><div style><span class="" style="white-space:pre-wrap;color:red!important">cXMLHttpRequest.send</span><a href="http://localhost/mapguide/RBAC%20Mobile%20GIS/lib/OpenLayers/Request/XMLHttpRequest.js" class="" title="http://localhost/mapguide/RBAC%20Mobile%20GIS/lib/OpenLayers/Request/XMLHttpRequest.js:262" style="float:right;text-align:right;max-width:100%;margin-left:4px;color:rgb(84,84,84)">XMLHttpRequest.js:262</a></div>
</li><li title="" style="padding:0px 0px 0px 14px;margin-top:1px;word-wrap:break-word"><div style><span class="" style="white-space:pre-wrap;color:red!important">(anonymous function)</span><a href="http://localhost/mapguide/RBAC%20Mobile%20GIS/lib/OpenLayers/Request.js" class="" title="http://localhost/mapguide/RBAC%20Mobile%20GIS/lib/OpenLayers/Request.js:240" style="float:right;text-align:right;max-width:100%;margin-left:4px;color:rgb(84,84,84)">Request.js:240</a></div>
</li></ol></ol></div><div class="" style="clear:right;border-top-width:1px;border-top-style:solid;border-top-color:rgb(240,240,240);padding:1px 22px 1px 0px;margin-left:24px;min-height:16px;color:rgb(0,0,0);font-family:Consolas,'Lucida Console',monospace;font-size:12px">
<ol class="" tabindex="0" style="font-size:inherit;list-style-type:none;margin:0px;padding-left:0px;line-height:12px"><li title="" class="" style="padding:0px 0px 0px 14px;margin-top:1px;word-wrap:break-word"><span class="" style="white-space:pre-wrap;color:blue"><span style>XHR finished loading: "<a href="http://localhost/mapguide/mapagent/mapagent.fcgi?USERNAME=Administrator&Password=admin" class="" title="http://localhost/mapguide/mapagent/mapagent.fcgi?USERNAME=Administrator&Password=admin" style="color:rgb(84,84,84)">http://localhost/mapguide/mapagent/mapagent.fcgi?USERNAME=Administrator&Password=admin</a>".</span> <a href="http://localhost/mapguide/RBAC%20Mobile%20GIS/lib/OpenLayers/Request/XMLHttpRequest.js" class="" title="http://localhost/mapguide/RBAC%20Mobile%20GIS/lib/OpenLayers/Request/XMLHttpRequest.js:220" style="float:right;text-align:right;max-width:100%;margin-left:4px;color:rgb(84,84,84)">XMLHttpRequest.js:220</a></span></li>
<ol class="" style="margin:0px;min-width:100%;list-style-type:none;font-size:inherit;padding:0px 0px 0px 12px!important"><li title="" style="padding:0px 0px 0px 14px;margin-top:1px;word-wrap:break-word"><div style><span class="" style="white-space:pre-wrap;color:blue">fXMLHttpRequest_send</span><a href="http://localhost/mapguide/RBAC%20Mobile%20GIS/lib/OpenLayers/Request/XMLHttpRequest.js" class="" title="http://localhost/mapguide/RBAC%20Mobile%20GIS/lib/OpenLayers/Request/XMLHttpRequest.js:220" style="float:right;text-align:right;max-width:100%;margin-left:4px;color:rgb(84,84,84)">XMLHttpRequest.js:220</a></div>
</li><li title="" style="padding:0px 0px 0px 14px;margin-top:1px;word-wrap:break-word"><div style><span class="" style="white-space:pre-wrap;color:blue">cXMLHttpRequest.send</span><a href="http://localhost/mapguide/RBAC%20Mobile%20GIS/lib/OpenLayers/Request/XMLHttpRequest.js" class="" title="http://localhost/mapguide/RBAC%20Mobile%20GIS/lib/OpenLayers/Request/XMLHttpRequest.js:262" style="float:right;text-align:right;max-width:100%;margin-left:4px;color:rgb(84,84,84)">XMLHttpRequest.js:262</a></div>
</li><li title="" style="padding:0px 0px 0px 14px;margin-top:1px;word-wrap:break-word"><div style><span class="" style="white-space:pre-wrap;color:blue">(anonymous function)</span><a href="http://localhost/mapguide/RBAC%20Mobile%20GIS/lib/OpenLayers/Request.js" class="" title="http://localhost/mapguide/RBAC%20Mobile%20GIS/lib/OpenLayers/Request.js:240" style="float:right;text-align:right;max-width:100%;margin-left:4px;color:rgb(84,84,84)">Request.js:240</a></div>
</li></ol></ol></div></div><div class="gmail_extra"><br></div><div class="gmail_extra" style>The response preview is:</div><div class="gmail_extra" style><br></div><div class="gmail_extra" style><h2 style="color:rgb(0,0,0);font-family:'Times New Roman'">
A stream IO exception occurred.</h2><span style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium">A stream IO exception occurred.- IsapiAgent.HttpExtensionProc() line 211 file IsapiAgent.cpp- IsapiPostParser.Parse() line 196 file IsapiPostParser.cpp</span><br>
</div><div class="gmail_extra" style><span style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium"><br></span></div><div class="gmail_extra" style>I didn't see anything in the server logs through the Site Administrator that stood out to me as being related to this. I can post code if it would help.<br>
</div><div class="gmail_extra"><br></div><div class="gmail_extra">Thanks,</div><div class="gmail_extra">Rich<br><br><div class="gmail_quote">On Fri, Jun 14, 2013 at 12:39 PM, Rich Bauer <span dir="ltr"><<a href="mailto:rdbauer@gmail.com" target="_blank">rdbauer@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">FYI...I also posted in the OpenLayers list because I am not sure now if it is OpenLayers or MapGuide related.<div>
<br></div><div>OpenLayers link: <a href="http://osgeo-org.1560.x6.nabble.com/Connecting-to-MapGuide-via-WFS-td5060238.html" target="_blank">http://osgeo-org.1560.x6.nabble.com/Connecting-to-MapGuide-via-WFS-td5060238.html</a></div>

</div><div class=""><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jun 14, 2013 at 12:14 PM, Rich Bauer <span dir="ltr"><<a href="mailto:rdbauer@gmail.com" target="_blank">rdbauer@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Update...<div><br></div><div>I stumbled across something that creates the WFS connection from a WMS Layer. I tried this earlier but evidently had the code wrong. Both layers show up in the Layers panel as it is added to the map, but the WMS layer shows up and the created WFS does not.  Code below:</div>


<div><br></div><div><div>var wmsParcels = new OpenLayers.Layer.WMS("Parcels",</div><div>        "<a href="http://localhost/mapguide/mapagent/mapagent.fcgi?USERNAME=Administrator&Password=admin" target="_blank">http://localhost/mapguide/mapagent/mapagent.fcgi?USERNAME=Administrator&Password=admin</a>",</div>


<div>        { layers: 'Samples/Sheboygan/Layers/Parcels', transparent: true },</div><div>        { isBaseLayer: false, transitionEffect: 'resize', format: 'image/png' }</div><div>        //{ projection: new OpenLayers.Projection('EPSG:900913') }</div>


<div>    );</div><div><br></div><div>map.addLayer(wmsParcels);<br></div><div><br></div><div>var wfsParcels = new OpenLayers.Layer.Vector("WFS Parcels", { protocol: new OpenLayers.Protocol.WFS.fromWMSLayer(wmsParcels) });<br>


</div><div><br></div><div>map.addLayers([select, wfsParcels]);<br></div><div><br></div><div>With this there are no errors showing up in Chrome.</div><div><br></div></div></div><div><div><div class="gmail_extra">
<br><br><div class="gmail_quote">
On Fri, Jun 14, 2013 at 7:37 AM, RDBauer <span dir="ltr"><<a href="mailto:rdbauer@gmail.com" target="_blank">rdbauer@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">


All,<br>
<br>
I have searched the list and Google and have not been able to find what I<br>
need. I am trying to connect to MapGuide (2.5 on test machine but 2.2 on<br>
production machine right now) from OpenLayers 2.12. I know that it would be<br>
easier to use Fusion, but it currently doesn't have the support for Mobile<br>
and that is what I need. Also, I can't use PHP or .NET for any code because<br>
it will be packaged in PhoneGap for a mobile app. Right now I am just trying<br>
to connect to the sample dataset to get things working and also, by actual<br>
data will most likely be served as the same WGS projection. My current code<br>
is:<br>
<br>
<br>
/map = new OpenLayers.Map({<br>
        div: "map",<br>
        theme: null,<br>
        projection: osmProj,<br>
        displayProjection: wgs,<br>
        maxExtent: extent,<br>
        scales: tempScales,<br>
        controls: [<br>
            new OpenLayers.Control.Attribution(),<br>
            new OpenLayers.Control.TouchNavigation({ dragPanOptions: {<br>
enableKinetic: true } }),<br>
            //new<br>
OpenLayers.Control.Scale(document.getElementById("mapScale"))<br>
        geolocate<br>
        //selectControl<br>
        ]<br>
    });<br>
<br>
var layer = new OpenLayers.Layer.MapGuide("Sheboygan Tiled Layer", url,<br>
params, options);<br>
<br>
var wfsParcels = new OpenLayers.Layer.Vector("WFS Parcels", {<br>
        strategies: [new OpenLayers.Strategy.Fixed()],<br>
        protocol: new OpenLayers.Protocol.WFS({<br>
            //version: "1.1.0",<br>
            srsName: "EPSG:4326",<br>
            url:<br>
"<a href="http://localhost/mapguide/mapagent/mapagent.fcgi?USERNAME=Administrator&Password=admin" target="_blank">http://localhost/mapguide/mapagent/mapagent.fcgi?USERNAME=Administrator&Password=admin</a>",<br>



            featureType: "ns34414117:ParcelsType",<br>
            featureNS: "<a href="http://www.opengis.net/gml" target="_blank">http://www.opengis.net/gml</a>",<br>
            geometryName: "SHPGEOM"<br>
        }),<br>
        styleMap: new OpenLayers.StyleMap({<br>
            strokeWidth: 3,<br>
            strokeColor: "#333333"<br>
        })<br>
        //projection: wgs<br>
    });<br>
<br>
map.addLayer(layer);<br>
map.addLayer(wfsParcels);<br>
map.zoomToExtent(extent);/<br>
<br>
With this current code, I get the following error in Chrome Developer Tools:<br>
<br>
/Failed to load resource: Origin null is not allowed by<br>
Access-Control-Allow-Origin.<br>
<a href="http://localhost/mapguide/mapagent/mapagent.fcgi?USERNAME=Administrator&Password=admin" target="_blank">http://localhost/mapguide/mapagent/mapagent.fcgi?USERNAME=Administrator&Password=admin</a><br>
<br>
XMLHttpRequest cannot load<br>
<a href="http://localhost/mapguide/mapagent/mapagent.fcgi?USERNAME=Administrator&Password=admin" target="_blank">http://localhost/mapguide/mapagent/mapagent.fcgi?USERNAME=Administrator&Password=admin</a>.<br>
Origin null is not allowed by Access-Control-Allow-Origin. index.html:1/<br>
<br>
Things I am not sure about if they are correct are the "featureType" &<br>
"featureNS". I got those from the GETCAPABILITIES command. Any thoughts?<br>
<br>
Thanks,<br>
Rich<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://osgeo-org.1560.x6.nabble.com/WFS-Connection-from-OpenLayers-tp5060185.html" target="_blank">http://osgeo-org.1560.x6.nabble.com/WFS-Connection-from-OpenLayers-tp5060185.html</a><br>



Sent from the MapGuide Users mailing list archive at Nabble.com.<br>
_______________________________________________<br>
mapguide-users mailing list<br>
<a href="mailto:mapguide-users@lists.osgeo.org" target="_blank">mapguide-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/mapguide-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a><br>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div></div><div class="gmail_extra"><br></div></div>