StorageService::InsertJsonDocument not working in Marmalade

0 votes

Whenever I try to add a JSON object to the DB by calling InsertJsonDocument it fails.  This happens in both the example that came with APP42 and with my own project.  Here is the output window.

 

07/08/14 01:17:19.737: [0xfa0] Body for insertJsonDocuments is {"app42":{"storage":{"jsonDoc":"{\"employeeName\":\"Nick\"}"}}}
07/08/14 01:17:19.747: [0xfa0] HTTP: (Cancel)
07/08/14 01:17:19.754: [0xfa0] HTTP: (Fetching https://api.shephertz.com/cloud/1.0/storage/insert/dbName/WORBLE/collectionName/New Collection?apiKey=685f5994607d26b2a3cd88f7ff3e23a33c0cfaaa83921eca77c9c73d71377544&timeStamp=2014-08-07T8:17:19.000Z&version=1.0&signature=OKQ79KEMcrx8boDleCK2zEyGis0%3D)
07/08/14 01:17:19.784: [0xfa0] SOCKET: s3eInetLookup: 'api.shephertz.com'
The thread 0x23f14 has exited with code 0 (0x0).
07/08/14 01:17:19.811: [0xfa0] SOCKET: s3eInetLookup (asynschronous): done DNS: '50.112.252.24:0'
07/08/14 01:17:19.818: [0xfa0] HTTP: (DNS OK)
07/08/14 01:17:19.823: [0xfa0] IWCRT: open 100
07/08/14 01:17:19.829: [0xfa0] SOCKET: s3eSocketCreate -> p=0x58ec3970 id=3001
07/08/14 01:17:19.835: [0xfa0] SOCKET: s3eSocketConnect: 0x58ec3970 -> 50.112.252.24:443
ERROR: S3E_SOCKET_ERR_INPROGRESS in s3eSocketConnect
07/08/14 01:17:19.846: [0xfa0] SOCKET: TryConnect error: 10036
07/08/14 01:17:19.852: [0xfa0] SOCKET: Connect: FAILED (1001: S3E_SOCKET_ERR_INPROGRESS in s3eSocketConnect)
07/08/14 01:17:19.857: [0xfa0] HTTP: (Connecting...)
07/08/14 01:17:19.903: [0xfa0] SOCKET: TryConnect error: 10056
07/08/14 01:17:19.909: [0xfa0] SOCKET: NotifyConnect: 3001 0x58ec3970
07/08/14 01:17:19.915: [0xfa0] HTTP: (Connected)
07/08/14 01:17:19.922: [0xfa0] HTTP: ContinueSSLHandshake:0
07/08/14 01:17:19.928: [0xfa0] HTTP: ContinueSSLHandshake
07/08/14 01:17:19.934: [0xfa0] HTTP: Waiting until Readable
07/08/14 01:17:19.997: [0xfa0] HTTP: ContinueSSLHandshake:0
07/08/14 01:17:20.263: [0xfa0] HTTP: ContinueSSLHandshake
07/08/14 01:17:20.265: [0xfa0] HTTP: Waiting until Readable
07/08/14 01:17:20.412: [0xfa0] HTTP: ContinueSSLHandshake:0
07/08/14 01:17:20.415: [0xfa0] HTTP: Handshake Done
07/08/14 01:17:20.417: [0xfa0] HTTP: (SendRequest [0->462])
07/08/14 01:17:20.419: [0xfa0] HTTP: SSL_write returns 399
07/08/14 01:17:20.446: [0xfa0] HTTP: (SendRequest [399->462])
07/08/14 01:17:20.449: [0xfa0] HTTP: SSL_write returns 65
07/08/14 01:17:20.480: [0xfa0] HTTP: HTTP/1.1 400 BAD_REQUEST
07/08/14 01:17:20.482: [0xfa0] HTTP: Got headers
07/08/14 01:17:20.484: [0xfa0] HTTP: Remote side has closed
07/08/14 01:17:20.486: [0xfa0] HTTP: (Cancel)
07/08/14 01:17:20.488: [0xfa0] IWCRT: close 100
07/08/14 01:17:20.490: [0xfa0] SOCKET: s3eSocketClose: 0x58ec3970 open=1
ERROR *(MAJOR)*: S3E_SOCKET_ERR_PARAM in s3eSocketReadable - Invalid s3eSocket descriptor 0
07/08/14 01:17:20.513: [0xfa0] GotData::Status is -1442840576
07/08/14 01:17:20.515: [0xfa0] GotData::ContentReceived is ªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªª
07/08/14 01:17:20.517: [0xfa0] GotData::ContentReceived data len is 1024
07/08/14 01:17:20.520: [0xfa0] App42StorageResult failed result is 400
asked Aug 7, 2014 in App42PaaS & BPaaS by sawaydastudios (16 points)

1 Answer

0 votes

Hello,

Can you please let us know what exception message are you getting while calling App42 function. Because the exception 400 error code occur in multiple cases like:

  • Either your json string is not valid, Kindly verify it through json validator
  • Or you have already one data base in your app and you are going to create a new one

Kindly share the exception message with us.

Thanks

answered Aug 10, 2014 by hs00105 (2,005 points)
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com