Foros de discusión

SyncDeviceHeaderException while invoking add-file-entry webservice

José de Anchieta Couto Caraciolo Netto, modificado hace 6 años.

SyncDeviceHeaderException while invoking add-file-entry webservice

New Member Mensaje: 1 Fecha de incorporación: 5/01/17 Mensajes recientes
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, modificado hace 6 años.

RE: SyncDeviceHeaderException while invoking add-file-entry webservice

Regular Member Mensajes: 228 Fecha de incorporación: 30/09/10 Mensajes recientes
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, modificado hace 6 años.

RE: SyncDeviceHeaderException while invoking add-file-entry webservice

New Member Mensaje: 1 Fecha de incorporación: 6/08/14 Mensajes recientes
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, modificado hace 6 años.

RE: SyncDeviceHeaderException while invoking add-file-entry webservice

Regular Member Mensajes: 228 Fecha de incorporación: 30/09/10 Mensajes recientes
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).