[deegree-users] Fw: Change xpath of filter for stantard query GetFeature
OSGeo project deegree
Brought to you by:
deegreesfadmin,
tfr
From: Pau P. <asi...@gv...> - 2008-05-23 07:18:34
|
The version is 2.1 (stable) Thanks > ----- Original Message ----- > From: "Andreas Poth" <po...@la...> > To: <dee...@li...> > Sent: Thursday, May 22, 2008 1:58 PM > Subject: Re: [deegree-users] SLD External Graphic with http URL > > > Hi, > > which version of deegree WFS do you use (where did you get it)? > > best regards > > ANDREAS > > Pau Pérez schrieb: > >> Hi, >> >> I woud like to make a gazetteer, like WFS-G, but with a different >> model (MNE 1.2. of National Geographic Institute(IGN) in Spain), and >> in this model, there is a namespace "mne". I make the steps in the >> documentation (pages 53-54) of "deegree Web Feature Service 2.1" in >> order to add the new model. >> >> 1- In wfs_configuration, I added this: >> >> <wfs:FeatureType> >> <wfs:Name>mne:Entidad</wfs:Name> >> <wfs:Title/> >> <wfs:DefaultSRS>EPSG:23030</wfs:DefaultSRS> >> <wfs:Operations> >> <wfs:Operation>Query</wfs:Operation> >> </wfs:Operations> >> <wfs:OutputFormats> >> <wfs:Format deegree:outFilter="./xslt/outfilter_main.xsl" >> deegree:inFilter="./xslt/infilter_main.xsl" >> deegree:schemaLocation="./schemas/mne_12.xsd">text/xml; >> subtype=gml/3.1.1</wfs:Format> >> </wfs:OutputFormats> >> <ows:WGS84BoundingBox> >> <ows:LowerCorner>-180 -90</ows:LowerCorner> >> <ows:UpperCorner>180 90</ows:UpperCorner> >> </ows:WGS84BoundingBox> >> </wfs:FeatureType> >> >> 2-outfilter_main.xsl. I added a namespace "mne": >> >> <?xml version="1.0" encoding="UTF-8"?> >> <xsl:stylesheet version="1.0" >> xmlns:app="http://www.deegree.org/app" >> xmlns:dog="http://www.deegree.org/dog" >> xmlns:gco="http://www.isotc211.org/2005/gco" >> xmlns:gmd="http://www.isotc211.org/2005/gmd" >> xmlns:gml="http://www.opengis.net/gml" >> xmlns:iso19112="http://www.opengis.net/iso19112" >> xmlns:mne="http://www.idee.es/mne" >> xmlns:wfs="http://www.opengis.net/wfs" >> xmlns:xlink="http://www.w3.org/1999/xlink" >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> >> <xsl:output method="xml" version="1.0" encoding="ISO-8859-1" >> indent="yes" omit-xml-declaration="no" /> >> ... >> ... >> >> In infilter_main.xsl, I also add the namespace "mne". >> >> 3- In the file request_gazetteer.properties, I add the namespace "mne" >> and a new xpath to map: >> >> $namespace.wfs=http://www.opengis.net/wfs >> $namespace.gml=http://www.opengis.net/gml >> $namespace.app=http://www.deegree.org/app >> $namespace.dog=http://www.deegree.org/dog >> $namespace.xlink=http://www.w3.org/1999/xlink >> $namespace.iso19112=http://www.opengis.net/iso19112 >> $namespace.mne=http://www.idee.es/mne >> #--------------------------------------- >> #never empty rows in this document!!! >> mne:Entidad/mne:nombreEntidad/mne:nombre=app:Entidad/app:nombreEntidad/app:NombreEntidad/app:nombre >> >> #--------------------------------------- >> #SI_Gazetteer >> iso19112:SI_Gazetteer/iso19112:name=app:SI_Gazetteer/app:name >> #--------------------------------------- >> dog:Counties/iso19112:geographicIdentifier=app:Counties/app:geographicIdentifier >> dog:Counties/iso19112:geographicExtent=app:Counties/app:geographicExtent >> dog:Counties/iso19112:position=app:Counties/app:position >> dog:Counties/iso19112:gazetteer=app:Counties/app:gazetteer >> #--------------------------------------- >> dog:Municipalities/iso19112:geographicIdentifier=app:Municipalities/app:geographicIdentifier >> dog:Municipalities/iso19112:geographicExtent=app:Municipalities/app:geographicExtent >> dog:Municipalities/iso19112:position=app:Municipalities/app:position >> dog:Municipalities/iso19112:gazetteer=app:Municipalities/app:gazetteer >> dog:Municipalities/iso19112:parent=app:Municipalities/app:parent >> >> >> The standard request to "nombre" (name) must be >> "mne:nombreEntidad/mne:nombre". When I make the request: >> >> <?xml version="1.0" encoding="UTF-8"?> >> <wfs:GetFeature version="1.1.0" xmlns:app="http://www.deegree.org/app" >> xmlns:wfs="http://www.opengis.net/wfs" >> xmlns:ogc="http://www.opengis.net/ogc" >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >> xsi:schemaLocation="http://www.opengis.net/wfs >> http://schemas.opengis.net/wfs/1.1.0/wfs.xsd" >> xmlns:mne="http://www.idee.es/mne"> >> <wfs:Query typeName="mne:Entidad" /> >> </wfs:GetFeature> >> >> The response is fine, and the transformation of mne_Entidad to >> app:Entidad works fine, but when I make this request: >> >> <?xml version="1.0" encoding="UTF-8"?> >> <wfs:GetFeature version="1.1.0" xmlns:mne="http://www.idee.es/mne" >> xmlns:app="http://www.deegree.org/app" >> xmlns:wfs="http://www.opengis.net/wfs" >> xmlns:gml="http://www.opengis.net/gml" >> xmlns:ogc="http://www.opengis.net/ogc" >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >> xsi:schemaLocation="http://www.opengis.net/wfs >> http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"> >> <wfs:Query typeName="mne:Entidad"> >> <ogc:Filter> >> <PropertyIsLike wildCard="*" singleChar="_" escapeChar="\"> >> <PropertyName>mne:nombreEntidad/mne:nombre</PropertyName> >> <Literal>*Calderona*</Literal> >> </PropertyIsLike> >> </ogc:Filter> >> </wfs:Query> >> </wfs:GetFeature> >> >> The response is: >> >>Unexpected failure: HTTP/1.1 500 Error Interno del Servidor >> >> And the log of Tomcat is. >> >> [12:56:43] INFO: Handling request '0' from '127.0.0.1' to service: >> 'WFS' [12:56:43] DEBUG: [WFSHandler] Performing request: >> WFSGetFeatureRequest: { outputFormat = text/xml; subtype=gml/3.1.1 >> handle = null query = [propertyNames = >> [Lorg.deegree.ogcbase.PropertyPath;@aa0877 handle = null version = >> null typeName = [Lorg.deegree.datatypes.QualifiedName;@111ded2 filter >> = org.deegree.model.filterencoding.ComplexFilter@3bc20e >> <mailto:org.deegree.model.filterencoding.ComplexFilter@3bc20e> ] } >> >>[12:56:43] INFO: No working directory for the lock manager specified. >>Using default temp directory: 'C:\Tomcat_5_5_26\temp' >>[12:56:43] INFO: Lock manager will use directory 'C:\Tomcat_5_5_26\temp' >>to persist it's locks. >>[12:56:43] INFO: Restoring 0 locks from directory >>"C:\Tomcat_5_5_26\temp". >>[12:56:44] DEBUG: [WFSHandler] <?xml version="1.0" >>encoding="UTF-8"?><wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs" >>maxFeatures="-1" outputFormat="text/xml; subtype=gml/3.1.1" >>resultType="results" service="WFS" startPosition="1" version="1.1.0"> >> <wfs:Query xmlns:mne="http://www.idee.es/mne" typeName="mne:Entidad"> >> <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc"> >> <ogc:PropertyIsLike escape="\" matchCase="true" singleChar="_" >> wildCard="*"> >> >> <ogc:PropertyName>mne:nombreEntidad/mne:nombre</ogc:PropertyName> >> <ogc:Literal>*Calderona*</ogc:Literal> >> </ogc:PropertyIsLike> >> </ogc:Filter> >> </wfs:Query> >></wfs:GetFeature> >>[12:56:44] DEBUG: [WFSHandler] Transforming GetFeature request. >>[12:56:44] ERROR: Servlet.service() para servlet owservice lanzó excepción >>java.lang.ArrayIndexOutOfBoundsException: 0 >> at de.latlon.gazetteer.RequestMapping.<clinit>(RequestMapping.java:99) >> at infilter_main.template$dot$4() >> at infilter_main.applyTemplates() >> at infilter_main.template$dot$4() >> at infilter_main.applyTemplates() >> at infilter_main.template$dot$3() >> at infilter_main.applyTemplates() >> at infilter_main.template$dot$2() >> at infilter_main.applyTemplates() >> at infilter_main.template$dot$1() >> at infilter_main.applyTemplates() >> at infilter_main.template$dot$0() >> at infilter_main.applyTemplates() >> at infilter_main.transform() >> at >> com.sun.org.apache.xalan.internal.xsltc.runtime.AbstractTranslet.transform(Unknown >> Source) >> at >> com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(Unknown >> Source) >> at >> com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(Unknown >> Source) >> at >> org.deegree.framework.xml.XSLTDocument.transform(XSLTDocument.java:278) >> at >> org.deegree.framework.xml.XSLTDocument.transform(XSLTDocument.java:136) >> at >> org.deegree.enterprise.servlet.WFSHandler.transformGetFeature(WFSHandler.java:484) >> at >> org.deegree.enterprise.servlet.WFSHandler.performGetFeature(WFSHandler.java:294) >> at org.deegree.enterprise.servlet.WFSHandler.perform(WFSHandler.java:166) >> at >> org.deegree.enterprise.servlet.OGCServletController.doService(OGCServletController.java:146) >> at >> org.deegree.enterprise.servlet.OGCServletController.doPost(OGCServletController.java:276) >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) >> at >> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) >> at >> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) >> at >> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) >> at >> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174) >> at >> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) >> at >> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) >> at >> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) >> at >> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174) >> at >> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874) >> at >> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) >> at >> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) >> at >> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) >> at >> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) >> at java.lang.Thread.run(Unknown Source) >>javax.servlet.ServletException: La ejecución del Servlet lanzó una >>excepción >> at >> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292) >> at >> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) >> at >> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) >> at >> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174) >> at >> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) >> at >> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) >> at >> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) >> at >> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174) >> at >> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874) >> at >> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) >> at >> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) >> at >> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) >> at >> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) >> at java.lang.Thread.run(Unknown Source) >> >>Anybody has any idea of what does this error mean? >> >>It is possible to make a request without namespace, like this: >> >><?xml version="1.0" encoding="UTF-8"?> >><wfs:GetFeature version="1.1.0" xmlns:mne="http://www.idee.es/mne" >>xmlns:app="http://www.deegree.org/app" >>xmlns:wfs="http://www.opengis.net/wfs" >>xmlns:gml="http://www.opengis.net/gml" >>xmlns:ogc="http://www.opengis.net/ogc" >>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >>xsi:schemaLocation="http://www.opengis.net/wfs >>http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"> >> <wfs:Query typeName="Entidad"> >> <ogc:Filter> >> <PropertyIsLike wildCard="*" singleChar="_" escapeChar="\"> >> <PropertyName>nombreEntidad/nombre</PropertyName> >> <Literal>*Calderona*</Literal> >> </PropertyIsLike> >> </ogc:Filter> >> </wfs:Query> >></wfs:GetFeature> >> >>Many thanks in advance. >> >> >> >>-------------------------------------------------------- >>Pau Pérez Puigcerver >>-------------------------------------------------------- >>Prodevelop, Integración de tecnologías >>http://www.prodevelop.es >>-------------------------------------------------------- >>Servicio de Informática >>Conselleria de Medi Ambient, Aigua, Urbanisme i Habitatge. >>C./ Francisco Cubells, 7 >>46011 Valencia >>Telf.: 96 197 3941 >>Email: asi...@gv... <mailto:asi...@gv...> >>http://www.cth.gva.es >> >> >> >> >>------------------------------------------------------------------------ >> >>------------------------------------------------------------------------- >>This SF.net email is sponsored by: Microsoft >>Defy all challenges. Microsoft(R) Visual Studio 2008. >>http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ >> >>------------------------------------------------------------------------ >> >>_______________________________________________ >>deegree-users mailing list >>dee...@li... >>https://lists.sourceforge.net/lists/listinfo/deegree-users >> >> > > > -- > Dr. Andreas Poth > > l a t / l o n GmbH > Aennchenstrasse 19 53177 Bonn, Germany > phone ++49 +228 18496-0 fax ++49 +228 18496-29 > http://www.lat-lon.de http://www.deegree.org > > ------------------------------------------------------- > On June 17 is deegree day - Am 17. Juni ist deegree day > http://deegree.org/deegreeday > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > deegree-users mailing list > dee...@li... > https://lists.sourceforge.net/lists/listinfo/deegree-users > |