[Geoserver-devel] Problem of mount an customize XML request reader

-----Disclaimer-----

本郵件含有逢甲大學地理資訊系統研究中心機密資訊、或受法律保護之資料,唯有原發信人指定之收信人得閱讀或使用本郵件之內容。如您並非被指定之收信人,請立即將本郵件及所有附件予以刪除;請勿揭露、儲存或使用本郵件之任何資訊,並請您立即告知原發信人kevin@anonymised.com本郵件的傳遞錯誤。謝謝您的合作。

This e-mail transmission and any attachments contain information from Geographic Information Systems Research Center of Feng Chia University. The information is confidential and/or privileged and intended to be solely for the use of the individuals or entity named in this e-mail transmission. If you are not the intended recipient, be aware that any disclosure, saving or use of the contents of this e-mail transmission and attachments is strictly prohibited. If you have received this email transmission in error, please notify us immediately, and delete the e-mail and attachments. We greatly appreciate your cooperation.

GIS RESEARCH CENTER, FCU http://www.gis.tw .Tel: 886-4-24516669

(attachments)

image001.jpg

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.

-------------------------------------------------------