getodk / central-backend

Node.js based backend for ODK Central
https://docs.getodk.org/central-intro/
Apache License 2.0
50 stars 75 forks source link

How to configure XLSForm conversion service with central-backend #267

Closed drkatz closed 4 years ago

drkatz commented 4 years ago

I'm trying to connect the ODK central backend to a XLSForm conversion server (https://github.com/getodk/xlsform-online) to allow upload of XLSForm formatted forms.

When I enter the corresponding localhost server and port in the configuration at config/default.json and try to submit a form through the frontend I encounter an error SyntaxError: Unexpected token < in JSON at position 1 on the backend thrown by lib/util/xlsform.js.

In debugging the response body further it looks like the conversion server is returning an HTML error page mentioning the resource cannot be found: <h1>Not Found</h1><p>The requested resource was not found on this server.</p>

How can I successfully configure central-backend to work with a conversion service? Am I just missing something big and using the wrong project to try to integrate conversions?

matthew-white commented 4 years ago

Hi @drkatz! I believe that https://github.com/getodk/xlsform-online is for XLSForm Online, which is a standalone web app. ODK Central uses https://github.com/yanokwa/pyxform-http as an XLSForm-to-XForm conversion API. Let us know if you have trouble with pyxform-http!

@issa-tseng, how about we link to pyxform-http from the readme?

drkatz commented 4 years ago

Thanks @matthew-white! This pointed me in the right direction and things are working as they should now.

A link to the repository in the readme would definitely be helpful so users like myself can find the project as it's one of @yanokwa's personal repos (I was searching around the getodk organization)

issa-tseng commented 4 years ago

@matthew-white yeah that makes sense. probably we can add an external interfacing section with the additions coming for block 9

yanokwa commented 4 years ago

I think pyxform-http should officially join the ODK organization and I've asked the TSC to consider this in our next meeting. https://forum.getodk.org/t/requesting-for-pyxform-http-to-become-an-odk-tool/26237.