Foren

SyncDeviceHeaderException while invoking add-file-entry webservice

José de Anchieta Couto Caraciolo Netto, geändert vor 7 Jahren.

SyncDeviceHeaderException while invoking add-file-entry webservice

New Member Beitrag: 1 Beitrittsdatum: 05.01.17 Neueste Beiträge
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, geändert vor 7 Jahren.

RE: SyncDeviceHeaderException while invoking add-file-entry webservice

Regular Member Beiträge: 228 Beitrittsdatum: 30.09.10 Neueste Beiträge
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, geändert vor 7 Jahren.

RE: SyncDeviceHeaderException while invoking add-file-entry webservice

New Member Beitrag: 1 Beitrittsdatum: 06.08.14 Neueste Beiträge
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, geändert vor 7 Jahren.

RE: SyncDeviceHeaderException while invoking add-file-entry webservice

Regular Member Beiträge: 228 Beitrittsdatum: 30.09.10 Neueste Beiträge
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).