Viac

POST (OL3-> Geoserver 2.8.1-> PostGIS 2.2)


Mám problém s príspevkom. Tu je kód OL3. (multiplatformová hybridná aplikácia - Cordova)

bod varu = nový ol.geom.Point ([18.25, 49,83]); var feature = new ol.Feature ({geometry: point}); feature.setGeometryName ('the_geom'); feature.set ("popis", "abcd"); feature.setId ("body.8"); var format = new ol.format.WFS ({featureNS: "moj", featureType: "body"}); var node = format.writeTransaction ([feature], null, null, {gmlOptions: {srsName: "EPSG: 4326"}, featureNS: "moj", featureType: "body"}); console.log ("uzol:" + uzol) console.log ("xml:" + nový XMLSerializer (). serializeToString (uzol)); $ .ajax ({type: "POST", URL: "http: // localhost: 8080/geoserver/wfs", data: new XMLSerializer (). serializeToString (node), contentType: 'text/xml', success: function (údaje) {var result = format.readTransactionResponse (data); console.log (result);}, error: function (e) {var errorMsg = e? (e.status + " + e.statusText):" "; console.log ('Chyba pri ukladaní tejto funkcie na server GeoServer.

' + errorMsg); }/*, kontext: toto*/});

A tu je transakčný súbor

xml: 49.83 18.25a B C d

A tu je CHYBA od Geoserver LOG

01 dec. 22:18:22 CHYBA [geoserver.ows] - org.geoserver.platform.ServiceException: Nebolo možné určiť požiadavku geoserveru z http požiadavky org.geoserver.platform.AdvancedDispatchFilter $ AdvancedDispatchH [email protected] na org.geoserver. Dispatcher.dispatch (Dispatcher.java:629) na org.geoserver.ows.Dispatcher.handleRequestInternal (Dispatcher.java:26 5) na org.springframework.web.servlet.mvc.AbstractController.handleRequest (AbstractController.java:153) na org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.ha ndle (SimpleControllerHandlerAdapter.java:48) na org.springframework.web.servlet.DispatcherServlet.doDispatch (Dispatch erServlet.java:9b). org.s DispatcherServlet.doService (Dispatche rServlet.java:852) na org.springframework.web.servlet.FrameworkServlet.processRequest (Frame workServlet.java:882) na org.springframework.web.servlet.FrameavaServlet.doPost ( ) na javax.servlet.http.HttpServlet.service (HttpServlet .java: 727) na javax.servlet.http.HttpServlet.service (HttpServlet.java:820) na org.mortbay.jetty.servlet.ServletHolder.handle (ServletHolder.java:487) na org.mortbay.jetty.servlet. ServletHandler $ CachedChain.doFilter (Servlet Handler.java:1093) na org.geoserver.filters.ThreadLocalsCleanupFilter.doFilter (ThreadLocals CleanupFilter.java:28) na org.mortbay.jetty.servlet.ServletHandlet $ Handler.ain : 1084) na org.geoserver.filters.SpringDelegatingFilter $ Chain.doFilter (SpringDel egatingFilter.java:75) na org.geoserver.wms.animate.AnimatorFilter.doFilter (AnimatorFilter.java: 71) na org.geoserver.filters.SpringDeleg $ Chain.doFilter (SpringDel egatingFilter.java:71) na org.geoserver.filters.SpringDelegatingFilter.doFilter (SpringDelegatin gFilter.java:46) na org.mortbay.jetty.servlet.ServletHandler $ CachedChain.doFilter: Servlet Handler.j 1084) na org.geoserver.platform.AdvancedDispatchFilter.doFilter (AdvancedDispat chFilter.java:50) na org.mortbay.jetty.servle t.ServletHandler $ CachedChain.doFilter (Servlet Handler.java:1084) na org.springframework.security.web.FilterChainProxy $ VirtualFilterChain. doFilter (FilterChainProxy.java:311) na org.geoserver.security.filter.GeoServerCompositeFilter $ NestedFilterCh ain.doFilter (GeoServerCompositeFilter.java:69) na org.springframework.security.Feat.Web.access. java: 116) na org.springframework.security.web.access.intercept.FilterSecurityInter ceptor.doFilter (FilterSecurityInterceptor.java:83) na org.geoserver.security.filter.GeoServerCompositeFilter $ NestedFilterCilterdofilterdofilterdofilterdo na org.geoserver.security.filter.GeoServerCompositeFilter.doFilter (GeoSe rverCompositeFilter.java:92) na org.springframework.security.web.FilterChainProxy $ VirtualFilterChain. doFilter (FilterChainProxy.java:323) na org.geoserver.security.filter.GeoServerCompositeFilter $ NestedFilterCh ain.doFilter (GeoServerCompositeFilter.java:69) na org.springframework.security.ransb.access.Existuje 113) na org.geoserver.security.filter.GeoServerCompositeFilter $ NestedFilterCh ain.doFilter (GeoServerCompositeFilter.java:73) na org.geoserver.security.filter.GeoServerCompositeFilter.doFilteree .web.FilterChainProxy $ VirtualFilterChain. doFilter (FilterChainProxy.java:323) na org.geoserver.security.filter.GeoServerAnonymousAuthenticationFilter. doFilter (GeoServerAnonymousAuthenticationFilter.java:54) na org.springframework.security.web.FilterChainProxy $ VirtualFilterChain. doFilter (FilterChainProxy.java:323) na org.geoserver.security.filter.GeoServerCompositeFilter $ NestedFilterCh ain.doFilter (GeoServerCompositeFilter.java:69) na org.springframework.security.web.auth java: 150) na org.geoserver.security.filter.GeoServerCompositeFilter $ NestedFilterCh ain.doFilter (GeoServerCompositeFilter.java:73) na org.geoserver.security.filter.GeoServerCompositeFilter.eFilter () .security.filter.GeoServerBasicAuthenticationFilter.doFi lter (GeoServerBasicAuthenticationFilter.java:83) na org.springframework.security.web.FilterChainProxy $ VirtualFilterChain. doFilter (FilterChainProxy.java:323) na org.geoserver.security.filter.GeoServerCompositeFilter $ NestedFilterCh ain.doFilter (GeoServerCompositeFilter.java:69) na org.springframework.security.web.context 87) na org.geoserver.security.filter.GeoServerSecurityContextPersistenceFilt alebo $ 1. doFilter (GeoServerSecurityContextPersistenceFilter.java:53) na org.geoserver.security.filter.GeoServerCompositeFilter $ Nested security.filter.GeoServerCompositeFilter.doFilter (GeoSe rverCompositeFilter.java:92) na org.springframework.security.web.FilterChainProxy $ VirtualFilterChain. doFilter (FilterChainProxy.java:323) na org.springframework.security.web.FilterChainProxy.doFilter (FilterChai nProxy.java:173) na org.geoserver.security.GeoServerSecurityFilterChainProxy.doFilter .web.filter.DelegatingFilterProxy.invokeDelegate (D elegatingFilterProxy.java:346) na org.springframework.web.filter.DelegatingFilterProxy.doFilter (Delegat ingFilterProxy.java:259) na org.mortberv.ay. (Servlet Handler.java:1084) na org.geoserver.filters.LoggingFilter.doFilter (LoggingFilter.java:87) na org.mortbay.jetty.servlet.ServletHandler $ CachedChain.doFilter (Servlet Handler.java:1084) na org. geoserver.filters.GZIPFilter.doFilter (GZIPFilter.java:48) na org.mortbay.jetty.servlet.ServletHandler $ CachedChain.doFilter (Servlet Handler.java:1084) na org.geoserver.filters.SessionDebugFilter.doFilter (S : 48) na org.mortbay.jetty.servlet.ServletHandler $ CachedChain.doFilter (Servlet Handler.java:1084) na org.geoserver.filters.FlushSafeFilter.doFilter (FlushSafeFilter.java:4 4) na org.mortbay.jetty.servlet.ServletHandler $ CachedChain.doFilter (Servlet Handler.java:1084) na org .springframework.web.filter.CharacterEncodingFilter.doFilterIntern al (CharacterEncodingFilter.java:88) na org.springframework.web.filter.OncePerRequestFilter.doFilter (OncePerR equestFilter.java:let.76: $. .doFilter (Servlet Handler.java:1084) na org.mortbay.jetty.servlet.ServletHandler.handle (ServletHandler.java:3 60) na org.mortbay.jetty.security.SecurityHandler.handle (SecurityHandler.jav a: 216) na org.mortbay.jetty.servlet.SessionHandler.handle (SessionHandler.java:1 81) na org.mortbay.jetty.handler.ContextHandler.handle (ContextHandler.java:7 26) na org.mortbay.jetty.webapp.WebAppContext .handle (WebAppContext.java:405) na org.mortbay.jetty.handler.ContextHandlerCollection.handle (ContextHand lerCollection.java:206) na org.mortbay.jetty.handle r.HandlerCollection.handle (HandlerCollection. java: 114) na org.mortbay.jetty.handler.HandlerWrapper.handle (HandlerWrapper.java:1 52) na org.mortbay.jetty.Server.handle (Server.java:324) na org.mortbay.jetty.HttpConnection. handleRequest (HttpConnection.java:50 5) na org.mortbay.jetty.HttpConnection $ RequestHandler.headerComplete (HttpCo nnection.java:828) na org.mortbay.jetty.HttpParser.parseNext (HttpParser.java:514) na org .jetty.HttpParser.parseAvailable (HttpParser.java:211) na org.mortbay.jetty.HttpConnection.handle (HttpConnection.java:380) na org.mortbay.io.nio.SelectChannelEndPoint.run (SelectChannelEndPoint.ja: na org.mortbay.thread.BoundedThreadPool $ PoolThread.run (BoundedThreadPool .java: 450)

NÁPAD?


Pozri si video: Connect GeoServer to PostGIS (Október 2021).