Ticket #1101 (new defect)
[OGR - WFS] SQL VRT with WFS
| Reported by: | jlacroix | Owned by: | mapserverbugs |
|---|---|---|---|
| Priority: | high | Milestone: | |
| Component: | WFS Server | Version: | 4.4 |
| Severity: | normal | Keywords: | |
| Cc: |
Description
A VRT data source containing a SQL Query may have problem with WFS. If the SQL query returns a binary field, OGR will return a gml file containing illegal characters (Binary data). For example, I have a MySQL query on a table (SELECT * FROM table1) that contains a blob with binary data in it. When I try to query those data via WFS, the gml returned by MapServer contains a tag <geom>[insert_fuzzy_characters_here]</geom>. This make the WFS client (MapServer again) to fail. A ogrinfo on the GML file returns: FAILURE: Unable to open datasource `/opt/fgs/tmp/ms_tmp//64b2afb384715e6ca9a49d6c393713e7.tmp.gml' with the following drivers. A proposed solution is to use CDATA in the XML. See: http://www.w3schools.com/xml/xml_cdata.asp Paul Spencer wrote: AFAIK you can use CDATA in any XML document to indicate 'character data' inside an element, it is used as follows: <element><![CDATA[this is my data to be treated exactly as is, you can use invalid characters like & < and > ...]]></element> The only rules appears to be: * the delimiter ']]>' must be continuous, no spaces, no linebreaks inside this delimiter * you can't use ]]> inside a cdata
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

