掲示板

SyncDeviceHeaderException while invoking add-file-entry webservice

7年前 に José de Anchieta Couto Caraciolo Netto によって更新されました。

SyncDeviceHeaderException while invoking add-file-entry webservice

New Member 投稿: 1 参加年月日: 17/01/05 最新の投稿
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
7年前 に Dennis Ju によって更新されました。

RE: SyncDeviceHeaderException while invoking add-file-entry webservice

Regular Member 投稿: 228 参加年月日: 10/09/30 最新の投稿
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
7年前 に Nelson Carnauba Tenorio によって更新されました。

RE: SyncDeviceHeaderException while invoking add-file-entry webservice

New Member 投稿: 1 参加年月日: 14/08/06 最新の投稿
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
7年前 に Dennis Ju によって更新されました。

RE: SyncDeviceHeaderException while invoking add-file-entry webservice

Regular Member 投稿: 228 参加年月日: 10/09/30 最新の投稿
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).