WPS-Execute with GML FeatureCollection

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

WPS-Execute with GML FeatureCollection

Felix Sch.
Hi all,

I have a problem to pars an execute request on the 52North server. I try
to send input complexData in an GML FeatureCollection to the server, but
the server is noch able to parse this FeatureCollection.
The Error message is: "Error occured, while XML parsing."

Can somebody help me to find the mistake? I think the mistake should be
in the GML schema!


I attached the execute request and the error log from the server.

Many thanks for your help.
Felix Scholtyssek

#### Here is my execute request:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<wps:Execute service="WPS" version="1.0.0"
xmlns:wps="http://www.opengis.net/wps/1.0.0"
xmlns:ows="http://www.opengis.net/ows/1.1"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/wps/1.0.0 
http://schemas.opengis.net/wps/1.0.0/wpsExecute_request.xsd">
        <ows:Identifier>org.n52.wps.server.algorithm.SimpleBufferAlgorithm</ows:Identifier> <wps:DataInputs>
<wps:Input>
<ows:Identifier>data</ows:Identifier>
<wps:Data>
<wps:ComplexData mimeType="text/xml"
schema="http://schemas.opengis.net/gml/3.1.1/base/feature.xsd">
<gml:FeatureCollection xmlns:gml="http://www.opengis.net/gml">
<gml:FeatureMembers>
<gml:MultiCurve> <gml:curveMember> <gml:LineString
axisLabels="" uomLabels="">
<gml:pos axisLabels="" uomLabels="">43.995 5.145</gml:pos>
<gml:pos axisLabels="" uomLabels="">46.807 5.980</gml:pos>
<gml:pos axisLabels="" uomLabels="">46.807 8.793</gml:pos>
</gml:LineString>
</gml:curveMember>
</gml:MultiCurve>
</gml:FeatureMembers>
</gml:FeatureCollection>
</wps:ComplexData>
</wps:Data>
</wps:Input>
<wps:Input>
<ows:Identifier>width</ows:Identifier>
<wps:Data>
<wps:LiteralData dataType="xs:double">0.05</wps:LiteralData>
</wps:Data>
</wps:Input>
</wps:DataInputs>
<wps:ResponseForm>
<wps:ResponseDocument storeExecuteResponse="false" lineage="false"
status="false">
<wps:Output asReference="false"
schema="http://schemas.opengis.net/gml/3.1.1/base/feature.xsd"
mimeType="text/xml" encoding="UTF-8">
<ows:Identifier>result</ows:Identifier>
<ows:Title>result</ows:Title>
<ows:Abstract>result</ows:Abstract>
</wps:Output>
</wps:ResponseDocument>
</wps:ResponseForm>
</wps:Execute>

### End Execute request

### Start Stack

2014-12-01 15:43:40,273 [pool-1-thread-1] ERROR
org.n52.wps.io.datahandler.parser.GML3BasicParser: Exception while
trying to determine schema of FeatureType.
java.lang.NullPointerException: null
        at
org.n52.wps.io.datahandler.parser.GML2Handler.startElement(GML2Handler.java:93)
~[52n-wps-io-geotools-3.3.1-SNAPSHOT.jar:na]
        at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown
Source) ~[xercesImpl-2.7.1.jar:na]
        at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown
Source) ~[xercesImpl-2.7.1.jar:na]
        at
org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown
Source) ~[xercesImpl-2.7.1.jar:na]
        at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source) ~[xercesImpl-2.7.1.jar:na]
        at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source) ~[xercesImpl-2.7.1.jar:na]
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
~[xercesImpl-2.7.1.jar:na]
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
~[xercesImpl-2.7.1.jar:na]
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
~[xercesImpl-2.7.1.jar:na]
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
~[xercesImpl-2.7.1.jar:na]
        at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
Source) ~[xercesImpl-2.7.1.jar:na]
        at javax.xml.parsers.SAXParser.parse(Unknown Source) ~[na:1.8.0_20]
        at javax.xml.parsers.SAXParser.parse(Unknown Source) ~[na:1.8.0_20]
        at
org.n52.wps.io.datahandler.parser.GML3BasicParser.determineFeatureTypeSchema(GML3BasicParser.java:318)
[52n-wps-io-geotools-3.3.1-SNAPSHOT.jar:na]
        at
org.n52.wps.io.datahandler.parser.GML3BasicParser.parseFeatureCollection(GML3BasicParser.java:153)
[52n-wps-io-geotools-3.3.1-SNAPSHOT.jar:na]
        at
org.n52.wps.io.datahandler.parser.GML3BasicParser.parseXML(GML3BasicParser.java:138)
[52n-wps-io-geotools-3.3.1-SNAPSHOT.jar:na]
        at
org.n52.wps.io.datahandler.parser.GML3BasicParser.parse(GML3BasicParser.java:123)
[52n-wps-io-geotools-3.3.1-SNAPSHOT.jar:na]
        at
org.n52.wps.io.datahandler.parser.GML3BasicParser.parse(GML3BasicParser.java:1)
[52n-wps-io-geotools-3.3.1-SNAPSHOT.jar:na]
        at
org.n52.wps.server.request.InputHandler.parseComplexValue(InputHandler.java:574)
[52n-wps-server-3.3.1-SNAPSHOT.jar:na]
        at
org.n52.wps.server.request.InputHandler.handleComplexData(InputHandler.java:518)
[52n-wps-server-3.3.1-SNAPSHOT.jar:na]
        at
org.n52.wps.server.request.InputHandler.<init>(InputHandler.java:157)
[52n-wps-server-3.3.1-SNAPSHOT.jar:na]
        at
org.n52.wps.server.request.InputHandler.<init>(InputHandler.java:132)
[52n-wps-server-3.3.1-SNAPSHOT.jar:na]
        at
org.n52.wps.server.request.InputHandler$Builder.build(InputHandler.java:119)
[52n-wps-server-3.3.1-SNAPSHOT.jar:na]
        at
org.n52.wps.server.request.ExecuteRequest.call(ExecuteRequest.java:663)
[52n-wps-server-3.3.1-SNAPSHOT.jar:na]
        at org.n52.wps.server.request.Request.call(Request.java:1)
[52n-wps-server-3.3.1-SNAPSHOT.jar:na]
        at java.util.concurrent.FutureTask.run(Unknown Source) [na:1.8.0_20]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
[na:1.8.0_20]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
[na:1.8.0_20]
        at java.lang.Thread.run(Unknown Source) [na:1.8.0_20]
2014-12-01 15:43:40,274 [pool-1-thread-1] ERROR
org.n52.wps.server.request.ExecuteRequest: Exception/Error while
executing ExecuteRequest for
org.n52.wps.server.algorithm.testProcesses.TrackLength:
org.n52.wps.server.ExceptionReport: Error occured, while XML parsing
2014-12-01 15:43:40,286 [pool-1-thread-1] INFO
org.n52.wps.commons.context.ExecutionContextFactory: Context unregistered
2014-12-01 15:43:40,286 [http-bio-8080-exec-10] WARN
org.n52.wps.server.handler.RequestHandler: exception while handling
ExecuteRequest.
2014-12-01 15:43:40,287 [http-bio-8080-exec-10] ERROR
org.n52.wps.server.handler.RequestHandler: exception handling
ExecuteRequest.
org.n52.wps.server.ExceptionReport: Error occured, while XML parsing
        at
org.n52.wps.server.request.InputHandler.parseComplexValue(InputHandler.java:576)
~[52n-wps-server-3.3.1-SNAPSHOT.jar:na]
        at
org.n52.wps.server.request.InputHandler.handleComplexData(InputHandler.java:518)
~[52n-wps-server-3.3.1-SNAPSHOT.jar:na]
        at
org.n52.wps.server.request.InputHandler.<init>(InputHandler.java:157)
~[52n-wps-server-3.3.1-SNAPSHOT.jar:na]
        at
org.n52.wps.server.request.InputHandler.<init>(InputHandler.java:132)
~[52n-wps-server-3.3.1-SNAPSHOT.jar:na]
        at
org.n52.wps.server.request.InputHandler$Builder.build(InputHandler.java:119)
~[52n-wps-server-3.3.1-SNAPSHOT.jar:na]
        at
org.n52.wps.server.request.ExecuteRequest.call(ExecuteRequest.java:663)
~[52n-wps-server-3.3.1-SNAPSHOT.jar:na]
        at org.n52.wps.server.request.Request.call(Request.java:1)
~[52n-wps-server-3.3.1-SNAPSHOT.jar:na]
        at java.util.concurrent.FutureTask.run(Unknown Source) ~[na:1.8.0_20]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
[na:1.8.0_20]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
[na:1.8.0_20]
        at java.lang.Thread.run(Unknown Source) [na:1.8.0_20]
Caused by: java.lang.IllegalArgumentException:
java.lang.NullPointerException
        at
org.n52.wps.io.datahandler.parser.GML3BasicParser.determineFeatureTypeSchema(GML3BasicParser.java:328)
~[52n-wps-io-geotools-3.3.1-SNAPSHOT.jar:na]
        at
org.n52.wps.io.datahandler.parser.GML3BasicParser.parseFeatureCollection(GML3BasicParser.java:153)
~[52n-wps-io-geotools-3.3.1-SNAPSHOT.jar:na]
        at
org.n52.wps.io.datahandler.parser.GML3BasicParser.parseXML(GML3BasicParser.java:138)
~[52n-wps-io-geotools-3.3.1-SNAPSHOT.jar:na]
        at
org.n52.wps.io.datahandler.parser.GML3BasicParser.parse(GML3BasicParser.java:123)
~[52n-wps-io-geotools-3.3.1-SNAPSHOT.jar:na]
        at
org.n52.wps.io.datahandler.parser.GML3BasicParser.parse(GML3BasicParser.java:1)
~[52n-wps-io-geotools-3.3.1-SNAPSHOT.jar:na]
        at
org.n52.wps.server.request.InputHandler.parseComplexValue(InputHandler.java:574)
~[52n-wps-server-3.3.1-SNAPSHOT.jar:na]
        ... 10 common frames omitted
Caused by: java.lang.NullPointerException: null
        at
org.n52.wps.io.datahandler.parser.GML2Handler.startElement(GML2Handler.java:93)
~[52n-wps-io-geotools-3.3.1-SNAPSHOT.jar:na]
        at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown
Source) ~[xercesImpl-2.7.1.jar:na]
        at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown
Source) ~[xercesImpl-2.7.1.jar:na]
        at
org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown
Source) ~[xercesImpl-2.7.1.jar:na]
        at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source) ~[xercesImpl-2.7.1.jar:na]
        at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source) ~[xercesImpl-2.7.1.jar:na]
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
~[xercesImpl-2.7.1.jar:na]
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
~[xercesImpl-2.7.1.jar:na]
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
~[xercesImpl-2.7.1.jar:na]
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
~[xercesImpl-2.7.1.jar:na]
        at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
Source) ~[xercesImpl-2.7.1.jar:na]
        at javax.xml.parsers.SAXParser.parse(Unknown Source) ~[na:1.8.0_20]
        at javax.xml.parsers.SAXParser.parse(Unknown Source) ~[na:1.8.0_20]
        at
org.n52.wps.io.datahandler.parser.GML3BasicParser.determineFeatureTypeSchema(GML3BasicParser.java:318)
~[52n-wps-io-geotools-3.3.1-SNAPSHOT.jar:na]
        ... 15 common frames omitted
2014-12-01 15:43:40,288 [http-bio-8080-exec-10] DEBUG
org.n52.wps.server.WebProcessingService:
org.n52.wps.server.ExceptionReport: Error occured, while XML parsing
_______________________________________________
Geoprocessingservices mailing list
[hidden email]
http://list.52north.org/mailman/listinfo/geoprocessingservices
http://geoprocessing.forum.52north.org
Please respect our mailing list guidelines:
http://52north.org/resources/mailing-lists-and-forums/guidelines
Reply | Threaded
Open this post in threaded view
|

Re: WPS-Execute with GML FeatureCollection

BenjaminPross
Hi Felix,

I am afraid, I did not find another solution yet than to specify the
schemaLocation in the GML. Would that be an option for you?
It is not sufficient to provide the schema in the complexData element.
This is merely used to choose the right parser for the input.

Cheers,

Benjamin

Am 01.12.2014 15:57, schrieb Felix Scholtyssek:

> Hi all,
>
> I have a problem to pars an execute request on the 52North server. I
> try to send input complexData in an GML FeatureCollection to the
> server, but the server is noch able to parse this FeatureCollection.
> The Error message is: "Error occured, while XML parsing."
>
> Can somebody help me to find the mistake? I think the mistake should
> be in the GML schema!
>
>
> I attached the execute request and the error log from the server.
>
> Many thanks for your help.
> Felix Scholtyssek
>
> #### Here is my execute request:
>
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <wps:Execute service="WPS" version="1.0.0"
> xmlns:wps="http://www.opengis.net/wps/1.0.0"
> xmlns:ows="http://www.opengis.net/ows/1.1"
> xmlns:ogc="http://www.opengis.net/ogc"
> xmlns:xlink="http://www.w3.org/1999/xlink"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://www.opengis.net/wps/1.0.0 
> http://schemas.opengis.net/wps/1.0.0/wpsExecute_request.xsd">
> <ows:Identifier>org.n52.wps.server.algorithm.SimpleBufferAlgorithm</ows:Identifier>
> <wps:DataInputs>
> <wps:Input>
> <ows:Identifier>data</ows:Identifier>
> <wps:Data>
> <wps:ComplexData mimeType="text/xml"
> schema="http://schemas.opengis.net/gml/3.1.1/base/feature.xsd">
> <gml:FeatureCollection xmlns:gml="http://www.opengis.net/gml">
> <gml:FeatureMembers>
> <gml:MultiCurve> <gml:curveMember> <gml:LineString axisLabels=""
> uomLabels="">
> <gml:pos axisLabels="" uomLabels="">43.995 5.145</gml:pos>
> <gml:pos axisLabels="" uomLabels="">46.807 5.980</gml:pos>
> <gml:pos axisLabels="" uomLabels="">46.807 8.793</gml:pos>
> </gml:LineString>
> </gml:curveMember>
> </gml:MultiCurve>
> </gml:FeatureMembers>
> </gml:FeatureCollection>
> </wps:ComplexData>
> </wps:Data>
> </wps:Input>
> <wps:Input>
> <ows:Identifier>width</ows:Identifier>
> <wps:Data>
> <wps:LiteralData dataType="xs:double">0.05</wps:LiteralData>
> </wps:Data>
> </wps:Input>
> </wps:DataInputs>
> <wps:ResponseForm>
> <wps:ResponseDocument storeExecuteResponse="false" lineage="false"
> status="false">
> <wps:Output asReference="false"
> schema="http://schemas.opengis.net/gml/3.1.1/base/feature.xsd"
> mimeType="text/xml" encoding="UTF-8">
> <ows:Identifier>result</ows:Identifier>
> <ows:Title>result</ows:Title>
> <ows:Abstract>result</ows:Abstract>
> </wps:Output>
> </wps:ResponseDocument>
> </wps:ResponseForm>
> </wps:Execute>
>
> ### End Execute request
>
> ### Start Stack
>
> 2014-12-01 15:43:40,273 [pool-1-thread-1] ERROR
> org.n52.wps.io.datahandler.parser.GML3BasicParser: Exception while
> trying to determine schema of FeatureType.
> java.lang.NullPointerException: null
> at
> org.n52.wps.io.datahandler.parser.GML2Handler.startElement(GML2Handler.java:93)
> ~[52n-wps-io-geotools-3.3.1-SNAPSHOT.jar:na]
> at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown
> Source) ~[xercesImpl-2.7.1.jar:na]
> at
> org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown
> Source) ~[xercesImpl-2.7.1.jar:na]
> at
> org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown
> Source) ~[xercesImpl-2.7.1.jar:na]
> at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
> Source) ~[xercesImpl-2.7.1.jar:na]
> at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
> Source) ~[xercesImpl-2.7.1.jar:na]
> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> ~[xercesImpl-2.7.1.jar:na]
> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> ~[xercesImpl-2.7.1.jar:na]
> at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
> ~[xercesImpl-2.7.1.jar:na]
> at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
> ~[xercesImpl-2.7.1.jar:na]
> at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
> Source) ~[xercesImpl-2.7.1.jar:na]
> at javax.xml.parsers.SAXParser.parse(Unknown Source) ~[na:1.8.0_20]
> at javax.xml.parsers.SAXParser.parse(Unknown Source) ~[na:1.8.0_20]
> at
> org.n52.wps.io.datahandler.parser.GML3BasicParser.determineFeatureTypeSchema(GML3BasicParser.java:318)
> [52n-wps-io-geotools-3.3.1-SNAPSHOT.jar:na]
> at
> org.n52.wps.io.datahandler.parser.GML3BasicParser.parseFeatureCollection(GML3BasicParser.java:153)
> [52n-wps-io-geotools-3.3.1-SNAPSHOT.jar:na]
> at
> org.n52.wps.io.datahandler.parser.GML3BasicParser.parseXML(GML3BasicParser.java:138)
> [52n-wps-io-geotools-3.3.1-SNAPSHOT.jar:na]
> at
> org.n52.wps.io.datahandler.parser.GML3BasicParser.parse(GML3BasicParser.java:123)
> [52n-wps-io-geotools-3.3.1-SNAPSHOT.jar:na]
> at
> org.n52.wps.io.datahandler.parser.GML3BasicParser.parse(GML3BasicParser.java:1)
> [52n-wps-io-geotools-3.3.1-SNAPSHOT.jar:na]
> at
> org.n52.wps.server.request.InputHandler.parseComplexValue(InputHandler.java:574)
> [52n-wps-server-3.3.1-SNAPSHOT.jar:na]
> at
> org.n52.wps.server.request.InputHandler.handleComplexData(InputHandler.java:518)
> [52n-wps-server-3.3.1-SNAPSHOT.jar:na]
> at
> org.n52.wps.server.request.InputHandler.<init>(InputHandler.java:157)
> [52n-wps-server-3.3.1-SNAPSHOT.jar:na]
> at
> org.n52.wps.server.request.InputHandler.<init>(InputHandler.java:132)
> [52n-wps-server-3.3.1-SNAPSHOT.jar:na]
> at
> org.n52.wps.server.request.InputHandler$Builder.build(InputHandler.java:119)
> [52n-wps-server-3.3.1-SNAPSHOT.jar:na]
> at
> org.n52.wps.server.request.ExecuteRequest.call(ExecuteRequest.java:663) [52n-wps-server-3.3.1-SNAPSHOT.jar:na]
>
> at org.n52.wps.server.request.Request.call(Request.java:1)
> [52n-wps-server-3.3.1-SNAPSHOT.jar:na]
> at java.util.concurrent.FutureTask.run(Unknown Source) [na:1.8.0_20]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
> [na:1.8.0_20]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
> [na:1.8.0_20]
> at java.lang.Thread.run(Unknown Source) [na:1.8.0_20]
> 2014-12-01 15:43:40,274 [pool-1-thread-1] ERROR
> org.n52.wps.server.request.ExecuteRequest: Exception/Error while
> executing ExecuteRequest for
> org.n52.wps.server.algorithm.testProcesses.TrackLength:
> org.n52.wps.server.ExceptionReport: Error occured, while XML parsing
> 2014-12-01 15:43:40,286 [pool-1-thread-1] INFO
> org.n52.wps.commons.context.ExecutionContextFactory: Context unregistered
> 2014-12-01 15:43:40,286 [http-bio-8080-exec-10] WARN
> org.n52.wps.server.handler.RequestHandler: exception while handling
> ExecuteRequest.
> 2014-12-01 15:43:40,287 [http-bio-8080-exec-10] ERROR
> org.n52.wps.server.handler.RequestHandler: exception handling
> ExecuteRequest.
> org.n52.wps.server.ExceptionReport: Error occured, while XML parsing
> at
> org.n52.wps.server.request.InputHandler.parseComplexValue(InputHandler.java:576)
> ~[52n-wps-server-3.3.1-SNAPSHOT.jar:na]
> at
> org.n52.wps.server.request.InputHandler.handleComplexData(InputHandler.java:518)
> ~[52n-wps-server-3.3.1-SNAPSHOT.jar:na]
> at
> org.n52.wps.server.request.InputHandler.<init>(InputHandler.java:157)
> ~[52n-wps-server-3.3.1-SNAPSHOT.jar:na]
> at
> org.n52.wps.server.request.InputHandler.<init>(InputHandler.java:132)
> ~[52n-wps-server-3.3.1-SNAPSHOT.jar:na]
> at
> org.n52.wps.server.request.InputHandler$Builder.build(InputHandler.java:119)
> ~[52n-wps-server-3.3.1-SNAPSHOT.jar:na]
> at
> org.n52.wps.server.request.ExecuteRequest.call(ExecuteRequest.java:663) ~[52n-wps-server-3.3.1-SNAPSHOT.jar:na]
>
> at org.n52.wps.server.request.Request.call(Request.java:1)
> ~[52n-wps-server-3.3.1-SNAPSHOT.jar:na]
> at java.util.concurrent.FutureTask.run(Unknown Source) ~[na:1.8.0_20]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
> [na:1.8.0_20]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
> [na:1.8.0_20]
> at java.lang.Thread.run(Unknown Source) [na:1.8.0_20]
> Caused by: java.lang.IllegalArgumentException:
> java.lang.NullPointerException
> at
> org.n52.wps.io.datahandler.parser.GML3BasicParser.determineFeatureTypeSchema(GML3BasicParser.java:328)
> ~[52n-wps-io-geotools-3.3.1-SNAPSHOT.jar:na]
> at
> org.n52.wps.io.datahandler.parser.GML3BasicParser.parseFeatureCollection(GML3BasicParser.java:153)
> ~[52n-wps-io-geotools-3.3.1-SNAPSHOT.jar:na]
> at
> org.n52.wps.io.datahandler.parser.GML3BasicParser.parseXML(GML3BasicParser.java:138)
> ~[52n-wps-io-geotools-3.3.1-SNAPSHOT.jar:na]
> at
> org.n52.wps.io.datahandler.parser.GML3BasicParser.parse(GML3BasicParser.java:123)
> ~[52n-wps-io-geotools-3.3.1-SNAPSHOT.jar:na]
> at
> org.n52.wps.io.datahandler.parser.GML3BasicParser.parse(GML3BasicParser.java:1)
> ~[52n-wps-io-geotools-3.3.1-SNAPSHOT.jar:na]
> at
> org.n52.wps.server.request.InputHandler.parseComplexValue(InputHandler.java:574)
> ~[52n-wps-server-3.3.1-SNAPSHOT.jar:na]
> ... 10 common frames omitted
> Caused by: java.lang.NullPointerException: null
> at
> org.n52.wps.io.datahandler.parser.GML2Handler.startElement(GML2Handler.java:93)
> ~[52n-wps-io-geotools-3.3.1-SNAPSHOT.jar:na]
> at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown
> Source) ~[xercesImpl-2.7.1.jar:na]
> at
> org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown
> Source) ~[xercesImpl-2.7.1.jar:na]
> at
> org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown
> Source) ~[xercesImpl-2.7.1.jar:na]
> at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
> Source) ~[xercesImpl-2.7.1.jar:na]
> at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
> Source) ~[xercesImpl-2.7.1.jar:na]
> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> ~[xercesImpl-2.7.1.jar:na]
> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> ~[xercesImpl-2.7.1.jar:na]
> at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
> ~[xercesImpl-2.7.1.jar:na]
> at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
> ~[xercesImpl-2.7.1.jar:na]
> at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
> Source) ~[xercesImpl-2.7.1.jar:na]
> at javax.xml.parsers.SAXParser.parse(Unknown Source) ~[na:1.8.0_20]
> at javax.xml.parsers.SAXParser.parse(Unknown Source) ~[na:1.8.0_20]
> at
> org.n52.wps.io.datahandler.parser.GML3BasicParser.determineFeatureTypeSchema(GML3BasicParser.java:318)
> ~[52n-wps-io-geotools-3.3.1-SNAPSHOT.jar:na]
> ... 15 common frames omitted
> 2014-12-01 15:43:40,288 [http-bio-8080-exec-10] DEBUG
> org.n52.wps.server.WebProcessingService:
> org.n52.wps.server.ExceptionReport: Error occured, while XML parsing
> _______________________________________________
> Geoprocessingservices mailing list
> [hidden email]
> http://list.52north.org/mailman/listinfo/geoprocessingservices
> http://geoprocessing.forum.52north.org
> Please respect our mailing list guidelines:
> http://52north.org/resources/mailing-lists-and-forums/guidelines


--
Benjamin Proß
Software Engineer
52°North Geoprocessing Community

52°North Initiative for Geospatial Open Source Software GmbH
Martin-Luther-King-Weg 24
Fon: +49-(0)-251–396371-42
Fax: +49-(0)-251–396371-11
[hidden email]
http://52north.org/

General Managers: Dr. Albert Remke, Dr. Andreas Wytzisk
Local Court Muenster HRB 10849

_______________________________________________
Geoprocessingservices mailing list
[hidden email]
http://list.52north.org/mailman/listinfo/geoprocessingservices
http://geoprocessing.forum.52north.org
Please respect our mailing list guidelines:
http://52north.org/resources/mailing-lists-and-forums/guidelines
Reply | Threaded
Open this post in threaded view
|

Re: WPS-Execute with GML FeatureCollection

Felix Sch.
Hi,
Thanks Benjamin for the answer!

I implement your answer in my client. But now I have an other error message. Further the server is not able to parse the XML correctly.

The problem is, that the server tries to determine the feature type schema in GML3BasicParser class (Line 154), but the result is null. So there musst be a further mistake in my GML.
Do you or any one else the further mistake?


Maybe somebody can send me a GML-Geometry, which could be parsed from the 52North-server. Based on these i can create my own GML like this.

At the end you can see my GML and bei error message.

Cheers,

Felix

### XML_GML:
<gml:FeatureCollection xmlns:gml="http://www.opengis.net/gml" schemaLocation="http://schemas.opengis.net/gml/3.1.1/base/feature.xsd">
        <gml:FeatureMembers>
                <gml:MultiCurve>
                        <gml:curveMember>
                                <ns8:LineString xmlns:ns8="http://www.opengis.net/gml" axisLabels="" uomLabels="">
                                        <ns8:pos axisLabels="" uomLabels="">41.1826171875 4.8823242634535</ns8:pos>
                                        <ns8:pos axisLabels="" uomLabels="">46.587890625 5.7172852009535</ns8:pos>
                                        <ns8:pos axisLabels="" uomLabels="">46.67578125 9.1889648884535</ns8:pos>
                                </ns8:LineString>
                        </gml:curveMember>
                </gml:MultiCurve>
        </gml:FeatureMembers>
</gml:FeatureCollection>


### Error message:
org.n52.wps.server.ExceptionReport: Error occured, while XML parsing
        at org.n52.wps.server.request.InputHandler.parseComplexValue(InputHandler.java:576) ~[52n-wps-server-3.3.1-SNAPSHOT.jar:na]
        at org.n52.wps.server.request.InputHandler.handleComplexData(InputHandler.java:518) ~[52n-wps-server-3.3.1-SNAPSHOT.jar:na]
        at org.n52.wps.server.request.InputHandler.<init>(InputHandler.java:157) ~[52n-wps-server-3.3.1-SNAPSHOT.jar:na]
        at org.n52.wps.server.request.InputHandler.<init>(InputHandler.java:132) ~[52n-wps-server-3.3.1-SNAPSHOT.jar:na]
        at org.n52.wps.server.request.InputHandler$Builder.build(InputHandler.java:119) ~[52n-wps-server-3.3.1-SNAPSHOT.jar:na]
        at org.n52.wps.server.request.ExecuteRequest.call(ExecuteRequest.java:663) ~[52n-wps-server-3.3.1-SNAPSHOT.jar:na]
        at org.n52.wps.server.request.Request.call(Request.java:1) ~[52n-wps-server-3.3.1-SNAPSHOT.jar:na]
        at java.util.concurrent.FutureTask.run(Unknown Source) ~[na:1.8.0_20]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [na:1.8.0_20]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [na:1.8.0_20]
        at java.lang.Thread.run(Unknown Source) [na:1.8.0_20]
Caused by: java.lang.NullPointerException: null
        at org.n52.wps.io.datahandler.parser.GML3BasicParser.parseFeatureCollection(GML3BasicParser.java:166) ~[52n-wps-io-geotools-3.3.1-SNAPSHOT.jar:na]
        at org.n52.wps.io.datahandler.parser.GML3BasicParser.parseXML(GML3BasicParser.java:139) ~[52n-wps-io-geotools-3.3.1-SNAPSHOT.jar:na]
        at org.n52.wps.io.datahandler.parser.GML3BasicParser.parse(GML3BasicParser.java:124) ~[52n-wps-io-geotools-3.3.1-SNAPSHOT.jar:na]
        at org.n52.wps.io.datahandler.parser.GML3BasicParser.parse(GML3BasicParser.java:1) ~[52n-wps-io-geotools-3.3.1-SNAPSHOT.jar:na]
        at org.n52.wps.server.request.InputHandler.parseComplexValue(InputHandler.java:574) ~[52n-wps-server-3.3.1-SNAPSHOT.jar:na]
        ... 10 common frames omitted
2014-12-05 14:26:28,780 [http-bio-8080-exec-1] DEBUG org.n52.wps.server.WebProcessingService: org.n52.wps.server.ExceptionReport: Error occured, while XML parsing
Reply | Threaded
Open this post in threaded view
|

Re: WPS-Execute with GML FeatureCollection

BenjaminPross
Hello Felix,

You could have a look at the GML at [1] and respective XSD schema at [2].
You will have to provide a web-accessible XSD for a GML input (i.e.
provide the right schemaLocation in the GML), otherwise the parsers will
most likely not be able to parse the GML correctly.
Also, I don't think that a generic GML XSD (e.g.
http://schemas.opengis.net/gml/3.1.1/base/feature.xsd) will do.
I am not sure, what you want to achieve in the end, but there are other
formats that are less complicated, e.g. zipped shapefiles or JSON.
Maybe that would be an option for you. As we are using GeoTools to parse
GML, you also could ask for help/examples on their mailinglist.

Cheers,

Benjamin

[1]
http://geoprocessing.demo.52north.org:8080/geoserver/topp/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=topp:tasmania_roads&maxFeatures=1
[2]
http://geoprocessing.demo.52north.org:8080/geoserver/topp/wfs?service=WFS&version=1.0.0&request=DescribeFeatureType&typeName=topp%3Atasmania_roads

Am 05.12.2014 14:30, schrieb Felix Sch.:

> Hi,
> Thanks Benjamin for the answer!
>
> I implement your answer in my client. But now I have an other error message.
> Further the server is not able to parse the XML correctly.
>
> The problem is, that the server tries to determine the feature type schema
> in GML3BasicParser class (Line 154), but the result is null. So there musst
> be a further mistake in my GML.
> Do you or any one else the further mistake?
>
>
> Maybe somebody can send me a GML-Geometry, which could be parsed from the
> 52North-server. Based on these i can create my own GML like this.
>
> At the end you can see my GML and bei error message.
>
> Cheers,
>
> Felix
>
> ### XML_GML:
> <gml:FeatureCollection xmlns:gml="http://www.opengis.net/gml"
> schemaLocation="http://schemas.opengis.net/gml/3.1.1/base/feature.xsd">
> <gml:FeatureMembers>
> <gml:MultiCurve>
> <gml:curveMember>
> <ns8:LineString xmlns:ns8="http://www.opengis.net/gml" axisLabels=""
> uomLabels="">
> <ns8:pos axisLabels="" uomLabels="">41.1826171875
> 4.8823242634535</ns8:pos>
> <ns8:pos axisLabels="" uomLabels="">46.587890625
> 5.7172852009535</ns8:pos>
> <ns8:pos axisLabels="" uomLabels="">46.67578125
> 9.1889648884535</ns8:pos>
> </ns8:LineString>
> </gml:curveMember>
> </gml:MultiCurve>
> </gml:FeatureMembers>
> </gml:FeatureCollection>
>
>
> ### Error message:
> org.n52.wps.server.ExceptionReport: Error occured, while XML parsing
> at
> org.n52.wps.server.request.InputHandler.parseComplexValue(InputHandler.java:576)
> ~[52n-wps-server-3.3.1-SNAPSHOT.jar:na]
> at
> org.n52.wps.server.request.InputHandler.handleComplexData(InputHandler.java:518)
> ~[52n-wps-server-3.3.1-SNAPSHOT.jar:na]
> at org.n52.wps.server.request.InputHandler.<init>(InputHandler.java:157)
> ~[52n-wps-server-3.3.1-SNAPSHOT.jar:na]
> at org.n52.wps.server.request.InputHandler.<init>(InputHandler.java:132)
> ~[52n-wps-server-3.3.1-SNAPSHOT.jar:na]
> at
> org.n52.wps.server.request.InputHandler$Builder.build(InputHandler.java:119)
> ~[52n-wps-server-3.3.1-SNAPSHOT.jar:na]
> at org.n52.wps.server.request.ExecuteRequest.call(ExecuteRequest.java:663)
> ~[52n-wps-server-3.3.1-SNAPSHOT.jar:na]
> at org.n52.wps.server.request.Request.call(Request.java:1)
> ~[52n-wps-server-3.3.1-SNAPSHOT.jar:na]
> at java.util.concurrent.FutureTask.run(Unknown Source) ~[na:1.8.0_20]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
> [na:1.8.0_20]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
> [na:1.8.0_20]
> at java.lang.Thread.run(Unknown Source) [na:1.8.0_20]
> Caused by: java.lang.NullPointerException: null
> at
> org.n52.wps.io.datahandler.parser.GML3BasicParser.parseFeatureCollection(GML3BasicParser.java:166)
> ~[52n-wps-io-geotools-3.3.1-SNAPSHOT.jar:na]
> at
> org.n52.wps.io.datahandler.parser.GML3BasicParser.parseXML(GML3BasicParser.java:139)
> ~[52n-wps-io-geotools-3.3.1-SNAPSHOT.jar:na]
> at
> org.n52.wps.io.datahandler.parser.GML3BasicParser.parse(GML3BasicParser.java:124)
> ~[52n-wps-io-geotools-3.3.1-SNAPSHOT.jar:na]
> at
> org.n52.wps.io.datahandler.parser.GML3BasicParser.parse(GML3BasicParser.java:1)
> ~[52n-wps-io-geotools-3.3.1-SNAPSHOT.jar:na]
> at
> org.n52.wps.server.request.InputHandler.parseComplexValue(InputHandler.java:574)
> ~[52n-wps-server-3.3.1-SNAPSHOT.jar:na]
> ... 10 common frames omitted
> 2014-12-05 14:26:28,780 [http-bio-8080-exec-1] DEBUG
> org.n52.wps.server.WebProcessingService: org.n52.wps.server.ExceptionReport:
> Error occured, while XML parsing
>
>
>
>
> --
> View this message in context: http://geoprocessing.forum.52north.org/WPS-Execute-with-GML-FeatureCollection-tp4025926p4025948.html
> Sent from the 52° North - Geoprocessing Community Forum mailing list archive at Nabble.com.
> _______________________________________________
> Geoprocessingservices mailing list
> [hidden email]
> http://list.52north.org/mailman/listinfo/geoprocessingservices
> http://geoprocessing.forum.52north.org
> Please respect our mailing list guidelines:
> http://52north.org/resources/mailing-lists-and-forums/guidelines


--
Benjamin Proß
Software Engineer
52°North Geoprocessing Community

52°North Initiative for Geospatial Open Source Software GmbH
Martin-Luther-King-Weg 24
Fon: +49-(0)-251–396371-42
Fax: +49-(0)-251–396371-11
[hidden email]
http://52north.org/

General Managers: Dr. Albert Remke, Dr. Andreas Wytzisk
Local Court Muenster HRB 10849

_______________________________________________
Geoprocessingservices mailing list
[hidden email]
http://list.52north.org/mailman/listinfo/geoprocessingservices
http://geoprocessing.forum.52north.org
Please respect our mailing list guidelines:
http://52north.org/resources/mailing-lists-and-forums/guidelines
Reply | Threaded
Open this post in threaded view
|

Re: WPS-Execute with GML FeatureCollection

Felix Sch.
Hello Benjamin,

i tried to use your example to generate my GML and schema.

Now I have some problems with the parser.   And the structure from the schema.
I know this is part of geotools, but maybe you or everybody in this community have an answer to solve my problem.

Here are my Files and the error message, to comprehend my question.

Thanks for help.

Felix Scholtyssek

The error message is:

Dez 12, 2014 1:54:45 PM org.geotools.xml.Schemas getImports
INFORMATION: Schema import wasn't resolved: http://www.opengis.net/gml declared location: http://schemas.opengis.net/gml/3.1.1/base/gml.xsd
Dez 12, 2014 1:54:45 PM org.geotools.xml.impl.ParserHandler startElement
INFORMATION: parser configuration specified schema: 'http://www.openplans.org/n52', but instance document does not reference this schema.
2014-12-12 13:54:45,660 [pool-1-thread-4] ERROR org.n52.wps.io.datahandler.parser.GML3BasicParser: Exception while handling parsed GML.
org.xml.sax.SAXException: Handler for n52:TestGML could not be found.
        at org.geotools.xml.impl.ParserHandler.startElement(ParserHandler.java:676) ~[gt-xsd-core-8.7.jar:na]
...

My GML3 is:
<gml:FeatureCollection
xmlns:gml="http://www.opengis.net/gml" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="
http://www.opengis.net/gml 
http://schemas.opengis.net/gml/3.1.1/base/feature.xsd 
http://www.openplans.org/n52 
http://localhost:8282/wps-demo-dev/demos/testGML.xsd">
        <gml:featureMember>
                <n52:TestGML xmlns:n52="http://www.openplans.org/n52" gml:id="ID0">
                        <gml:boundedBy>
                                <gml:Envelope srsDimension="2" srsName="http://www.opengis.net/gml/srs/epsg.xml#4326">
                                        <gml:lowerCorner>10.0 10.0</gml:lowerCorner>
                                        <gml:upperCorner>10.0 10.0</gml:upperCorner>
                                </gml:Envelope>
                        </gml:boundedBy>
                        <n52:GEOMETRY>
                                <gml:MultiPoint srsDimension="2" srsName="http://www.opengis.net/gml/srs/epsg.xml#4326">
                                        <gml:pointMember>
                                                <gml:Point srsDimension="2">
                                                        <gml:pos>10.0 10.0</gml:pos>
                                                </gml:Point>
                                        </gml:pointMember>
                                </gml:MultiPoint>
                        </n52:GEOMETRY>
                </n52:TestGML>
        </gml:featureMember>
</gml:FeatureCollection>

And my schema:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xs:schema targetNamespace="http://localhost:8282/wps-demo-dev/demos/TestGML" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:n52="http://www.openplans.org/n52"
        elementFormDefault="qualified" version="1.0">
        <xs:import namespace="http://www.opengis.net/gml" schemaLocation="http://schemas.opengis.net/gml/3.1.1/base/gml.xsd" />
        <xs:element name="TestGML" type="n52:FeatureType" substitutionGroup="gml:_Feature" />
        <xs:complexType name="FeatureType">
                <xs:complexContent>
                        <xs:extension base="gml:AbstractFeatureType">
                                <xs:sequence>
                                        <xs:element name="GEOMETRY" type="gml:MultiPointPropertyType">
                                        </xs:element>
                                </xs:sequence>
                        </xs:extension>
                </xs:complexContent>
        </xs:complexType>
</xs:schema>