Forums de discussion

SyncDeviceHeaderException while invoking add-file-entry webservice

José de Anchieta Couto Caraciolo Netto, modifié il y a 7 années.

SyncDeviceHeaderException while invoking add-file-entry webservice

New Member Envoyer: 1 Date d'inscription: 05/01/17 Publications récentes
I keep getting the error message:

"exception: "com.liferay.sync.SyncDeviceHeaderException", error: message:"com.liferay.sync.SyncDeviceHeaderException", type:"com.liferay.sync.SyncDeviceHeaderException", throwable: "com.liferay.sync.SyncDeviceHeaderException"

This occurs when I try to invoque this JSON Webservice on browser or use "url = "https://[server]:[port]/api/jsonws/sync-web.syncdlobject/add-file-entry" on code line.

Can anyone explain what the issue is and how to solve it?
thumbnail
Dennis Ju, modifié il y a 7 années.

RE: SyncDeviceHeaderException while invoking add-file-entry webservice

Regular Member Publications: 228 Date d'inscription: 30/09/10 Publications récentes
Is there a reason you're programmatically calling sync-web's "add-file-entry"? These API's are made specifically for usage with Liferay Sync, thus there's special validation for these requests.
thumbnail
Nelson Carnauba Tenorio, modifié il y a 7 années.

RE: SyncDeviceHeaderException while invoking add-file-entry webservice

New Member Envoyer: 1 Date d'inscription: 06/08/14 Publications récentes
Hi, Dennis,
Thanks for your message. We'd like to build some customizations not supported in Liferay sync like job file distribution.
Is there any place where we could get documentation about those valitations?
Regards,
Nelson
thumbnail
Dennis Ju, modifié il y a 7 années.

RE: SyncDeviceHeaderException while invoking add-file-entry webservice

Regular Member Publications: 228 Date d'inscription: 30/09/10 Publications récentes
Hi Nelson,

There is no documentation as the sync-web API is only intended for use by the Liferay Sync client. We do want to implement a public-facing API to integrate with third party apps at some point, but that feature's not even on the roadmap yet. You'll have to look at the source to understand Sync's behavior.

Do address your original question, at least for testing sake, you can bypass the SyncDevice header validation by appending the parameter ?debug=true to the jsonws request (example: /api/jsonws/sync-web.syncdlobject/add-file-entry?debug=true).