Here's what my current request looks like (I shortened the base64 encoding):

<?xml version="1.0" encoding="UTF-8"?>
<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: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>gs:Import</ows:Identifier>
        <wps:DataInputs>        
                <wps:Input>
                        <ows:Identifier>features</ows:Identifier>
                        <wps:Data>
                        <wps:ComplexData  mimeType="application/zip" 
encoding="Base64"><![CDATA[UEsDBBQAAA...AAA==]]></wps:ComplexData>
                        </wps:Data>
                </wps:Input>
                <wps:Input>
                        <ows:Identifier>workspace</ows:Identifier>
                        <wps:Data>
                                <wps:LiteralData>upload</wps:LiteralData>
                        </wps:Data>
                </wps:Input>
                <wps:Input>
                        <ows:Identifier>store</ows:Identifier>
                        <wps:Data>
                                <wps:LiteralData>test</wps:LiteralData>
                        </wps:Data>
                </wps:Input>
        </wps:DataInputs>
        <wps:ResponseForm>
                <wps:ResponseDocument>
                        <wps:Output>
                                <ows:Identifier>layerName</ows:Identifier>
                        </wps:Output>
                </wps:ResponseDocument>
        </wps:ResponseForm>
</wps:Execute>

The result I see is:
<?xml version="1.0" encoding="UTF-8"?>
<ows:ExceptionReport version="1.1.0"
  xsi:schemaLocation="http://www.opengis.net/ows/1.1 
http://localhost:8081/geoserver/schemas/ows/1.1.0/owsAll.xsd";
  xmlns:ows="http://www.opengis.net/ows/1.1"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
  <ows:Exception exceptionCode="NoApplicableCode">
    <ows:ExceptionText>Process returned with an exception
                Could not convert  (encoded data block) to target type 
org.geotools.data.simple.SimpleFeatureCollection</ows:ExceptionText>
  </ows:Exception>
</ows:ExceptionReport>

The request does work when I take the file that created the base64 encoding and 
reference it like so:
<?xml version="1.0" encoding="UTF-8"?>
<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: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>gs:Import</ows:Identifier>
        <wps:DataInputs>        
                <wps:Input>
                        <ows:Identifier>features</ows:Identifier>
                        <wps:Reference 
xlink:href="///path/to/my/file/testShapes.zip" mimeType="application/zip"/>     
                 
                </wps:Input>
                <wps:Input>
                        <ows:Identifier>workspace</ows:Identifier>
                        <wps:Data>
                                <wps:LiteralData>upload</wps:LiteralData>
                        </wps:Data>
                </wps:Input>
                <wps:Input>
                        <ows:Identifier>store</ows:Identifier>
                        <wps:Data>
                                <wps:LiteralData>test</wps:LiteralData>
                        </wps:Data>
                </wps:Input>
        </wps:DataInputs>
        <wps:ResponseForm>
                <wps:ResponseDocument>
                        <wps:Output>
                                <ows:Identifier>layerName</ows:Identifier>
                        </wps:Output>
                </wps:ResponseDocument>
        </wps:ResponseForm>
</wps:Execute>

---------------------------------------------------------------------------
 Ivan Suftin - Applications Developer - isuf...@usgs.gov
 Center for Integrated Data Analytics (CIDA)
 U.S. Geological Survey
 8505 Research Way, Middleton, WI 53562
 Office: (608) 821-3825  - Cell : (608) 345-8963
 


------------------------------------------------------------------------------
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to