<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Hello Luis,<br><br>If you are using a vector layer with a WFS protocol you can use the property 'geometryName' to set the name of the geometry column.&nbsp; Default is 'the_geom'[1]<br>You can see an example of the WFS protocol usage at OpenLayers examples page [2]<br><br>[1] http://dev.openlayers.org/docs/files/OpenLayers/Protocol/WFS/v1-js.html#OpenLayers.Protocol.WFS.v1.geometryName<br>[2] http://openlayers.org/dev/examples/wfs-protocol-transactions.html<br><br>Best regards,<br>Gabriel Nolasco<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><div class="plainMail">Message: 6<br>Date: Tue, 26 Jan 2010 13:56:26 +0000<br>From: Lu?s de Sousa &lt;<a ymailto="mailto:luis.a.de.sousa@gmail.com" href="/mc/compose?to=luis.a.de.sousa@gmail.com">luis.a.de.sousa@gmail.com</a>&gt;<br>Subject: [OpenLayers-Users] Request
 with wrong column name<br>To: <a ymailto="mailto:users@openlayers.org" href="/mc/compose?to=users@openlayers.org">users@openlayers.org</a><br>Message-ID:<br>&nbsp;&nbsp;&nbsp; &lt;<a ymailto="mailto:d56cfcb31001260556n24f5abb6xb6f88c7b34a73c04@mail.gmail.com" href="/mc/compose?to=d56cfcb31001260556n24f5abb6xb6f88c7b34a73c04@mail.gmail.com">d56cfcb31001260556n24f5abb6xb6f88c7b34a73c04@mail.gmail.com</a>&gt;<br>Content-Type: text/plain; charset=ISO-8859-1<br><br>Hello,<br><br>I'm using the transaction example provided by OpenGeo to create new<br>features with an Oracle database (through GeoServer):<br><br><a href="http://workshops.opengeo.org/openlayers-intro/vector.html" target="_blank">http://workshops.opengeo.org/openlayers-intro/vector.html</a><br><br>The OpenLayers code to add the new feature is this:<br><br>draw.featureAdded = function(feature) {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; feature.state =
 OpenLayers.State.INSERT;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; commit = OpenLayers.Function.bind(wfs.commit, wfs);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; commit();<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; add();<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $("requestRow").style.visibility = "visible";<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br><br>And it is generating the following request to the server:<br><br>&lt;wfs:Transaction xmlns:wfs="<a href="http://www.opengis.net/wfs" target="_blank">http://www.opengis.net/wfs</a>"<br>version="1.0.0" service="WFS"&gt;<br>&lt;wfs:Insert&gt;<br> &lt;feature:M_TANQUE xmlns:feature="<a href="http://insaar.inag.pt" target="_blank">http://insaar.inag.pt</a>"&gt;<br>&nbsp; &lt;feature:the_geom&gt;<br>&nbsp;&nbsp;&nbsp;&lt;gml:Point xmlns:gml="<a href="http://www.opengis.net/gml"
 target="_blank">http://www.opengis.net/gml</a>"&gt;<br>&nbsp; &nbsp; &lt;gml:coordinates decimal="." cs="," ts="<br>"&gt;233823.57226563,280409.89264062&lt;/gml:coordinates&gt;<br>&nbsp;&nbsp;&nbsp;&lt;/gml:Point&gt; &lt;/feature:the_geom&gt;<br>&nbsp; &lt;/feature:M_TANQUE&gt;<br> &lt;/wfs:Insert&gt;<br>&lt;/wfs:Transaction&gt;<br><br>This inserts a new data row in the data base, but with a null<br>geometry. After asking for help at Geoserver's list the problem was<br>identifed, the above request is using the wrong columns name<br>"the_geom", when in the database and to Geoserver this should be<br>"shape". Here's the result of a DescribeFeatureType request:<br><br>&lt;xsd:schema elementFormDefault="qualified"<br>targetNamespace="<a href="http://insaar.inag.pt" target="_blank">http://insaar.inag.pt</a>"&gt;<br>&lt;xsd:import namespace="<a href="http://www.opengis.net/gml" target="_blank">http://www.opengis.net/gml</a>"<br>schemaLocation="<a
 href="http://localhost:8080/geoserver/schemas/gml/3.1.1/base/gml.xsd" target="_blank">http://localhost:8080/geoserver/schemas/gml/3.1.1/base/gml.xsd</a>"/&gt;<br> &lt;xsd:complexType name="M_TANQUEType"&gt;<br> &lt;xsd:complexContent&gt;<br>&nbsp; &lt;xsd:extension base="gml:AbstractFeatureType"&gt;<br>&nbsp;&nbsp;&nbsp;&lt;xsd:sequence&gt;<br>&nbsp; &nbsp; &lt;xsd:element maxOccurs="1" minOccurs="0" name="SHAPE"<br>nillable="true" type="gml:GeometryPropertyType"/&gt;<br>&nbsp;&nbsp;&nbsp;&lt;/xsd:sequence&gt;<br>&nbsp; &lt;/xsd:extension&gt;<br> &lt;/xsd:complexContent&gt;<br> &lt;/xsd:complexType&gt;<br>&lt;xsd:element name="M_TANQUE" substitutionGroup="gml:_Feature"<br>type="insaar:M_TANQUEType"/&gt;<br>&lt;/xsd:schema&gt;<br><br>What's wrong with the code? Can the column name be set prior to the commit?<br><br>Thank you,<br><br>Lu?s<br><br>P.S.: The discussion at the Geoserver list can be accessed here:<br><br><a
 href="http://old.nabble.com/Inserting-geometries-into-Oracle-database-td27309510.html" target="_blank">http://old.nabble.com/Inserting-geometries-into-Oracle-database-td27309510.html</a><br></div></blockquote></td></tr></table><br>


      <hr size=1>Veja quais são os assuntos do momento no Yahoo! + Buscados: <a href="http://br.rd.yahoo.com/mail/taglines/mail/*http://br.maisbuscados.yahoo.com/">Top 10</a> - <a href="http://br.rd.yahoo.com/mail/taglines/mail/*http://br.maisbuscados.yahoo.com/celebridades/">Celebridades</a> - <a href="http://br.rd.yahoo.com/mail/taglines/mail/*http://br.maisbuscados.yahoo.com/m%C3%BAsica/">Música</a> - <a href="http://br.rd.yahoo.com/mail/taglines/mail/*http://br.maisbuscados.yahoo.com/esportes/">Esportes</a>