On Mon, Mar 16, 2015 at 2:21 AM, 博凱 Kevin <kevin@anonymised.com> wrote:
Hello everyone,
I have a problem that I’m want to implement a capability of WFS-T, which
can let other sources(for instance, mobile apps) send image files back(in
base64 formate) to WFS server.
But, when GeoServer receives a XML request, normally it can find the
most appropriate XML reader to parse request content automatically,
however, I cant find an appropriate approach to parse my customize XML
schema(extend WFS and GML).
Is there any possibilities that I can *mount my XML reader* onto
GeoServer and use it, if so, how to do it? (In the Line 1247 of
Dispatcher.java, it find all readers like magic).
XML readers are not really meant to be replaced, and I don't think this was
done before, but there is something you might try:
* locate in the wfs applicationContex.xml the xml reader you want to replace
* if you are working in a fork, just remove it, and declare your
replacement xml reader in its place
* if you are trying to do this with a plugin instead, in your plugin
applicationContex.xml declare a black listing bean that would kill the
normal reader, and then declare your reader in the same app context file.
Here is an example I have in a geoserver customization, removing the normal
format options kvp parser by name:
<bean id="wmsFormatOptionsBlackLister"
class="org.geoserver.platform.NameExclusionFilter">
<property name="beanId" value="wmsFormatOptionsKvpParser"/>
</bean>
That said... if I were in your position, I'd try to send GeoServer an
normal WFS-T request, with the image base64 encoded as one of the feature
fields, and fix the gt-xsd-gml module that does the parsing to also parse
the base64 field (assuming this is the problem of course)
Hope this helps
Cheers
Andrea
--
GeoServer Professional Services from the experts! Visit
http://goo.gl/NWWaa2 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
*AVVERTENZE AI SENSI DEL D.Lgs. 196/2003*
Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
loro utilizzo è consentito esclusivamente al destinatario del messaggio,
per le finalità indicate nel messaggio stesso. Qualora riceviate questo
messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
darcene notizia via e-mail e di procedere alla distruzione del messaggio
stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
utilizzarlo per finalità diverse, costituisce comportamento contrario ai
principi dettati dal D.Lgs. 196/2003.
The information in this message and/or attachments, is intended solely for
the attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act
(Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
Code).Any use not in accord with its purpose, any disclosure, reproduction,
copying, distribution, or either dissemination, either whole or partial, is
strictly forbidden except previous formal approval of the named
addressee(s). If you are not the intended recipient, please contact
immediately the sender by telephone, fax or e-mail and delete the
information in this message that has been received in error. The sender
does not give any warranty or accept liability as the content, accuracy or
completeness of sent messages and accepts no responsibility for changes
made after they were sent or for other risks which arise as a result of
e-mail transmission, viruses, etc.
-------------------------------------------------------