<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. 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 <<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>><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> <<a ymailto="mailto:d56cfcb31001260556n24f5abb6xb6f88c7b34a73c04@mail.gmail.com" href="/mc/compose?to=d56cfcb31001260556n24f5abb6xb6f88c7b34a73c04@mail.gmail.com">d56cfcb31001260556n24f5abb6xb6f88c7b34a73c04@mail.gmail.com</a>><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> feature.state =
OpenLayers.State.INSERT;<br> commit = OpenLayers.Function.bind(wfs.commit, wfs);<br> commit();<br> add();<br> $("requestRow").style.visibility = "visible";<br> }<br><br>And it is generating the following request to the server:<br><br><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"><br><wfs:Insert><br> <feature:M_TANQUE xmlns:feature="<a href="http://insaar.inag.pt" target="_blank">http://insaar.inag.pt</a>"><br> <feature:the_geom><br> <gml:Point xmlns:gml="<a href="http://www.opengis.net/gml"
target="_blank">http://www.opengis.net/gml</a>"><br> <gml:coordinates decimal="." cs="," ts="<br>">233823.57226563,280409.89264062</gml:coordinates><br> </gml:Point> </feature:the_geom><br> </feature:M_TANQUE><br> </wfs:Insert><br></wfs:Transaction><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><xsd:schema elementFormDefault="qualified"<br>targetNamespace="<a href="http://insaar.inag.pt" target="_blank">http://insaar.inag.pt</a>"><br><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>"/><br> <xsd:complexType name="M_TANQUEType"><br> <xsd:complexContent><br> <xsd:extension base="gml:AbstractFeatureType"><br> <xsd:sequence><br> <xsd:element maxOccurs="1" minOccurs="0" name="SHAPE"<br>nillable="true" type="gml:GeometryPropertyType"/><br> </xsd:sequence><br> </xsd:extension><br> </xsd:complexContent><br> </xsd:complexType><br><xsd:element name="M_TANQUE" substitutionGroup="gml:_Feature"<br>type="insaar:M_TANQUEType"/><br></xsd:schema><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>