Skip to content
This repository has been archived by the owner on Sep 19, 2024. It is now read-only.

CSV-Export does not work #139

Open
CarstenHollmann opened this issue Oct 16, 2014 · 0 comments
Open

CSV-Export does not work #139

CarstenHollmann opened this issue Oct 16, 2014 · 0 comments
Labels

Comments

@CarstenHollmann
Copy link

If you try to export to CSV time series of a SOS 2.0 instance that is integrated with a SOAP-adapter the export processing icon rotates but nothing more happens.

The problem is that the SWC sends a POX encoded DescribeSensor request with ContentType text/xml to the SOS although the SOAP adapter is configured. If the SOS does not support POX or the configured SOS URL point to the SOAP endpoint ../soap (52N SOS 4.x), an exception is thrown by the SOS.

Exception log of the SWC:

...
2014-10-16 13:00:22,079 DEBUG [pool-3-thread-5] [SimpleHttpClient.java:163] executing POST method to 'http://localhost:8080/52n-sos-wv-webapp/service/soap'.
2014-10-16 13:00:22,173 ERROR [http-nio-8080-exec-7] [FileDataServiceImpl.java:146] Exception occured on server side.
org.n52.shared.exceptions.ServerException: Could not generate ZIP file.
    at org.n52.server.service.FileDataServiceImpl.generateZipPresentation(FileDataServiceImpl.java:165) ~[FileDataServiceImpl.class:na]
    at org.n52.server.service.FileDataServiceImpl.getCSVzip(FileDataServiceImpl.java:144) ~[FileDataServiceImpl.class:na]
    at org.n52.server.service.rpc.RpcFileDataServlet.getCSVzip(RpcFileDataServlet.java:84) [RpcFileDataServlet.class:na]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_11]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_11]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_11]
    at java.lang.reflect.Method.invoke(Method.java:483) ~[na:1.8.0_11]
    at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:561) [RPC.class:na]
    at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:265) [RemoteServiceServlet.class:na]
    at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:305) [RemoteServiceServlet.class:na]
    at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62) [AbstractRemoteServiceServlet.class:na]
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:644) [servlet-api.jar:na]
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:725) [servlet-api.jar:na]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291) [catalina.jar:8.0.9]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [catalina.jar:8.0.9]
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) [tomcat-websocket.jar:8.0.9]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) [catalina.jar:8.0.9]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [catalina.jar:8.0.9]
    at com.thetransactioncompany.cors.CORSFilter.doFilter(CORSFilter.java:168) [CORSFilter.class:1.8]
    at com.thetransactioncompany.cors.CORSFilter.doFilter(CORSFilter.java:233) [CORSFilter.class:1.8]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) [catalina.jar:8.0.9]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [catalina.jar:8.0.9]
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219) [catalina.jar:8.0.9]
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) [catalina.jar:8.0.9]
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:503) [catalina.jar:8.0.9]
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:136) [catalina.jar:8.0.9]
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) [catalina.jar:8.0.9]
    at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610) [catalina.jar:8.0.9]
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) [catalina.jar:8.0.9]
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:526) [catalina.jar:8.0.9]
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1078) [tomcat-coyote.jar:8.0.9]
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:655) [tomcat-coyote.jar:8.0.9]
    at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:222) [tomcat-coyote.jar:8.0.9]
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1566) [tomcat-coyote.jar:8.0.9]
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1523) [tomcat-coyote.jar:8.0.9]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_11]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_11]
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util.jar:8.0.9]
    at java.lang.Thread.run(Thread.java:745) [na:1.8.0_11]
Caused by: org.n52.shared.exceptions.ServerException: Could not get sensor descrioption.
    at org.n52.server.service.FileDataServiceImpl.sendDescSens(FileDataServiceImpl.java:218) ~[FileDataServiceImpl.class:na]
    at org.n52.server.service.FileDataServiceImpl.generateZipPresentation(FileDataServiceImpl.java:154) ~[FileDataServiceImpl.class:na]
    ... 38 common frames omitted
Caused by: java.util.concurrent.ExecutionException: org.n52.oxf.OXFException: Could not parse response to XML.
    at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[na:1.8.0_11]
    at java.util.concurrent.FutureTask.get(FutureTask.java:206) ~[na:1.8.0_11]
    at org.n52.server.service.FileDataServiceImpl.sendDescSens(FileDataServiceImpl.java:211) ~[FileDataServiceImpl.class:na]
    ... 39 common frames omitted
Caused by: org.n52.oxf.OXFException: Could not parse response to XML.
    at org.n52.oxf.sos.adapter.SOSAdapter.doOperation(SOSAdapter.java:302) ~[SOSAdapter.class:2.0.0-alpha.3.3]
    at org.n52.server.da.oxf.SOSAdapter_OXFExtension.doOperation(SOSAdapter_OXFExtension.java:86) ~[SOSAdapter_OXFExtension.class:na]
    at org.n52.server.da.oxf.OperationAccessor.call(OperationAccessor.java:55) ~[OperationAccessor.class:na]
    at org.n52.server.da.oxf.OperationAccessor.call(OperationAccessor.java:39) ~[OperationAccessor.class:na]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_11]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_11]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_11]
    ... 1 common frames omitted
Caused by: org.apache.xmlbeans.XmlException: error: </body> does not close tag <hr>.
    at org.apache.xmlbeans.impl.store.Locale$SaxLoader.load(Locale.java:3511) ~[Locale$SaxLoader.class:na]
    at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:1277) ~[Locale.class:na]
    at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:1264) ~[Locale.class:na]
    at org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse(SchemaTypeLoaderBase.java:345) ~[SchemaTypeLoaderBase.class:na]
    at org.apache.xmlbeans.XmlObject$Factory.parse(XmlObject.java:688) ~[XmlObject$Factory.class:2.6.0-r1364789]
    at org.n52.oxf.sos.adapter.SOSAdapter.doOperation(SOSAdapter.java:296) ~[SOSAdapter.class:2.0.0-alpha.3.3]
    ... 7 common frames omitted
Caused by: org.xml.sax.SAXParseException: </body> does not close tag <hr>.
    at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.reportFatalError(Piccolo.java:1038) ~[Piccolo.class:na]
    at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.parse(Piccolo.java:723) ~[Piccolo.class:na]
    at org.apache.xmlbeans.impl.store.Locale$SaxLoader.load(Locale.java:3479) ~[Locale$SaxLoader.class:na]
    ... 12 common frames omitted

SOS log, showing the request from the SWC:

2014-10-16 13:00:22,109 DEBUG [http-nio-8080-exec-5] [SosService.java:91] Incoming request No. 76:
> [POST /52n-sos-wv-webapp/service/soap HTTP/1.1] from 127.0.0.1 127.0.0.1
> content-length: 240
> content-type: text/xml; charset=ISO-8859-1
> host: localhost:8080
> connection: Keep-Alive
> user-agent: Apache-HttpClient/4.2.1 (java 1.5)

2014-10-16 13:00:22,121 DEBUG [http-nio-8080-exec-5] [SoapBinding.java:135] SOAP-REQUEST: <DescribeSensor service="SOS" version="2.0.0" xmlns="http://www.opengis.net/swes/2.0">
  <procedure>Einzelwert</procedure>
  <procedureDescriptionFormat>http://www.opengis.net/sensorML/1.0.1</procedureDescriptionFormat>
</DescribeSensor>

And here the SWC SOS instance configuration:

<instance>
    <itemName>52N SOS 2.0</itemName>
    <url>http://localhost:8080/52n-sos-webapp/service/soap</url>
    <version>2.0.0</version>
    <metadataHandler>org.n52.server.sos.connector.hydro.HydroMetadataHandler</metadataHandler>
    <adapter>org.n52.server.sos.connector.hydro.SOSwithSoapAdapter</adapter>
    <waterML>true</waterML>
    <llEasting>6</llEasting>
    <llNorthing>51</llNorthing>
    <urEasting>8</urEasting>
    <urNorthing>52</urNorthing>
    <defaultZoom>15</defaultZoom>
    <requestChunk>200</requestChunk>
    <autoZoom>true</autoZoom>
    <protectedService>true</protectedService>
</instance>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant