Returning XML generated data

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Returning XML generated data

sammeek
Hi Board,

I am attempting to generate an xml file during my process and then return it to the Java client. I can get as far as generating the xml as a temporary file on the server side, but when I attempt to return it I get:

Caused by: java.lang.RuntimeException: Could not create GTVectorDataBinding for Input
        at org.n52.wps.io.data.GenericFileData.getAsGTVectorDataBinding(GenericFileData.java:442) ~[52n-wps-io-impl-3.2.0.jar:na]
        at org.n52.wps.io.datahandler.generator.ProxyGMLGenerator4Files.generateStream(ProxyGMLGenerator4Files.java:57) ~[52n-wps-io-impl-3.2.0.jar:na]
        at org.n52.wps.server.response.OutputDataItem.updateResponseForInlineComplexData(OutputDataItem.java:123) ~[52n-wps-server-3.2.0.jar:na]
        ... 10 common frames omitted

My process has three outputs, two are GTVectorDataBinding, and the third is GenericFileDataBinding as outlined in this post:

http://geoprocessing.forum.52north.org/WPS-with-image-png-Output-td2283302.html

I have also setup a "text/xml" generator in the Generators part of the web client. Any idea why it is doing this?

Thanks

Sam
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Returning XML generated data

sammeek
Hi Again,

Apologies, but I have actually solved this problem, however, I have had another issue. I can get the xml to generate server side, I then pass that as a file to GenericFileData and then GenericFileDataBinding to put in the result Hashmap.

I have added a "text/xml" "default" and a xml schema to the parsers and generators. However, when I try and get the output on the java client side, I get:

java.lang.RuntimeException: Could not find suitable parser
        at org.n52.WPSExample.ExecuteResponseAnalyser.parseProcessOutput(ExecuteResponseAnalyser.java:244)
        at org.n52.WPSExample.ExecuteResponseAnalyser.getComplexData(ExecuteResponseAnalyser.java:89)
        at pillar.lbs.AuthoritativeDataClient.executeProcess(AuthoritativeDataClient.java:251)
        at pillar.lbs.AuthoritativeDataClient.testExecute(AuthoritativeDataClient.java:80)
        at pillar.lbs.AuthoritativeDataClient.main(AuthoritativeDataClient.java:286)

I set the parser and mimetype as follows in the client code:

executeBuilder.setMimeTypeForOutput("text/xml", "metadata");
                executeBuilder.setSchemaForOutput("http://schemas.geoviqua.org/GVQ/4.0/GeoViQua_DataQuality.xsd",
                "metadata");

Any ideas why?

Sam
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Returning XML generated data

BenjaminPross
Hi Sam,

If you are using a newer WPS version that has two config files
(wps_config and wps_config_geotools), make sure that the additions you
made to the GenericFileParser also appear in the wps_config file.
This one is currently used by the client library.

Hope this helps.

Cheers,

Benjamin


Am 04.08.2014 13:31, schrieb sammeek:

> Hi Again,
>
> Apologies, but I have actually solved this problem, however, I have had
> another issue. I can get the xml to generate server side, I then pass that
> as a file to GenericFileData and then GenericFileDataBinding to put in the
> result Hashmap.
>
> I have added a "text/xml" "default" and a xml schema to the parsers and
> generators. However, when I try and get the output on the java client side,
> I get:
>
> java.lang.RuntimeException: Could not find suitable parser
> at
> org.n52.WPSExample.ExecuteResponseAnalyser.parseProcessOutput(ExecuteResponseAnalyser.java:244)
> at
> org.n52.WPSExample.ExecuteResponseAnalyser.getComplexData(ExecuteResponseAnalyser.java:89)
> at
> pillar.lbs.AuthoritativeDataClient.executeProcess(AuthoritativeDataClient.java:251)
> at
> pillar.lbs.AuthoritativeDataClient.testExecute(AuthoritativeDataClient.java:80)
> at
> pillar.lbs.AuthoritativeDataClient.main(AuthoritativeDataClient.java:286)
>
> I set the parser and mimetype as follows in the client code:
>
> executeBuilder.setMimeTypeForOutput("text/xml", "metadata");
>                
> executeBuilder.setSchemaForOutput("http://schemas.geoviqua.org/GVQ/4.0/GeoViQua_DataQuality.xsd",
>                   "metadata");
>
> Any ideas why?
>
> Sam
>
>
>
> --
> View this message in context: http://geoprocessing.forum.52north.org/Returning-XML-generated-data-tp4025739p4025740.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


--
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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Returning XML generated data

yuxiao
In reply to this post by sammeek
Hi,sammeek!
      I also have this issue,can you tell me how to find solution.
      error log:
java.lang.RuntimeException: Could not find suitable parser
        at org.n52.wps.client.ExecuteResponseAnalyser.parseProcessOutput(ExecuteResponseAnalyser.java:237)
        at org.n52.wps.client.ExecuteResponseAnalyser.getComplexDataByIndex(ExecuteResponseAnalyser.java:99)
        at yx.test.client.executeProcess(client.java:183)
        at yx.test.client.testExecute(client.java:50)
        at yx.test.client.main(client.java:193)
 thanks
      yuxiao
Loading...