Hi,
I'm looking into having the binary outputs get encoded in the WPS document
response and
failing to get a grip on how that would be done with the current Encoder
architecture.

When binary data needs to be encoded inside the WPS response XML document,
we basically
need to put it as the content of a ComplexData element, as base64 encoded
data.

Now, to do that the code is using EncoderDelegate instances, and there are
a few in use,
but only XMLEncoderDelegate actually works.
The ComplexDataTypeBinding code in the wps-core module has this code:

@Override
    public List getProperties(Object object) throws Exception {
        ComplexDataType complex = (ComplexDataType) object;
        if ( !complex.getData().isEmpty() && complex.getData().get( 0 )
instanceof XMLEncoderDelegate ) {
            XMLEncoderDelegate delegate = (XMLEncoderDelegate)
complex.getData().get( 0 );
            List properties = new ArrayList();
            properties.add( new Object[]{
                delegate.getProcessParameterIO().getElement(), delegate } );

            return properties;
        }

        return null;
    }

Which makes sense, as the XML encoder delegate will generate a XML subtree
under
the ComplexData element.

But... what about the existing CDATAEncoderDelegate and
BinaryEncoderDelegate, if one
of those is used, nothing will be generated in the output.

I guess the biggest difficulty here is that the EncoderDelegate in this
case will not generate
a sub-element, it will generate the body of the ComplexData element instead.
Is this supported by the Encoder, and if so, what would be the name of the
property to be used?

Or if not, do you have some rough indications on how to modify the GeoTools
xsd Encoder to handle that case?

Cheers
Andrea

-- 
==
Meet us at GEO Business 2014! in London! Visit http://goo.gl/fES3aK
for more information.
==

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39  339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their 
applications. Written by three acclaimed leaders in the field, 
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to