Hi all,
We're trying to programmatically upload completed xforms to the Aggregate
server. (We need to develop and test the data visualisation, and we have
some code to generate xforms submissions filled with random values to do
this).
We're trying to figure out how to do this. The protocol between the client
and server seems complex and arbitrary. I notice that the ODK Collect
InstanceUploaderTask contains the comment: "TODO: This method is like 350
lines long, down from 400. still. ridiculous. make it smaller."
Is there another, simpler or more standard API that we can use to upload
instance data? Is there any API to download data from Aggregate?
We've been trying to log into the Aggregate server (hosted on AppEngine)
using Basic and Digest authentication to the application root URL with
Curl. But whatever we do, we just get sent to the OpenID login page. It's
not clear to me exactly how this is different to what the phone is doing?
Is it the OpenRosa HTTP headers that make the difference?
curl -X HEAD -u htc:htc --basic https://partimob.appspot.com/submission -v
- About to connect() to partimob.appspot.com port 443 (#0)
- Trying 74.125.79.141... connected
- Connected to partimob.appspot.com (74.125.79.141) port 443 (#0)
- successfully set certificate verify locations:
- CAfile: none
CApath: /etc/ssl/certs - SSLv3...
- Server auth using Basic with user 'htc'
HEAD /submission HTTP/1.1
Authorization: Basic aHRjOmh0Yw==
User-Agent: curl/7.21.6 (i686-pc-linux-gnu) libcurl/7.21.6
OpenSSL/1.0.0e zlib/1.2.3.4 libidn/1.22 librtmp/2.3
Host: partimob.appspot.com
Accept: /
< HTTP/1.1 302 Found
< Expires: Thu, 01 Jan 1970 00:00:00 GMT
< Set-Cookie: JSESSIONID=lc5G3yIFRQZKRmMiJKyTLQ;Path=/
< Location:
https://partimob.appspot.com/openid_login.html;jsessionid=lc5G3yIFRQZKRmMiJKyTLQ
< Date: Wed, 09 Nov 2011 15:30:24 GMT
< Content-Type: text/html
< Server: Google Frontend
< Content-Length: 0
<
- Connection #0 to host partimob.appspot.com left intact
- Closing connection #0
- SSLv3, TLS alert, Client hello (1):
Cheers, Chris.
···
-- Aptivate | http://www.aptivate.org | Phone: +44 1223 760887 The Humanitarian Centre, Fenner's, Gresham Road, Cambridge CB1 2ESAptivate is a not-for-profit company registered in England and Wales
with company number 04980791.