سؤال

When user completed form (on Form Runner) and push "send" dates are sent to web service and web service save as xml (or to the database). I have a problem with files uploaded by users. In sample xml:

                <?xml version="1.0" ...>
                    <section-1>
                        <control-1>user1 test</control-1>
                        <control-3>user1 test</control-3>
                         <control-4 filename="cbsidlm-cbsi134-Quick_HTML_Color_Picker-ORG-10400979.exe" mediatype="application/octet-stream" size="894600">/fr/service/persistence/crud/UFWoD/Test1/data/e619cbc6a5f015c17bb29d79c232115e5bbb107f/21c63e421691466124b54fbbba687f48f401eb59.bin</control-4>                           
                    </section-1>
                </form>

How can i get this file and save it (it`s different server with web service, Orbeon has own separated serwer).

هل كانت مفيدة؟

المحلول

As mentioned in the XML snippet you quote, your service receives a URL, which has the form (actual ids in the URL are longer, and I shortened them below to make this more readable):

/fr/service/persistence/crud/UFWoD/Test1/data/e619/21c6.bin

Your service can retrieve the file by making a call to the Orbeon Forms persistence API, which means making an HTTP GET to:

http://server.com/orbeon/fr/service/persistence/crud/UFWoD/Test1/data/e619/21c6.bin

In the above URL, replace http://server.com/orbeon by the actual URL on which your Orbeon Forms is deployed. Also, note that since version 4.0, access to services is protected by default. For more on this, see Authorization of pages and services.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top