留言板

SyncDeviceHeaderException while invoking add-file-entry webservice

José de Anchieta Couto Caraciolo Netto,修改在7 年前。

SyncDeviceHeaderException while invoking add-file-entry webservice

New Member 发布: 1 加入日期: 17-1-5 最近的帖子
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,修改在7 年前。

RE: SyncDeviceHeaderException while invoking add-file-entry webservice

Regular Member 帖子: 228 加入日期: 10-9-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
Nelson Carnauba Tenorio,修改在7 年前。

RE: SyncDeviceHeaderException while invoking add-file-entry webservice

New Member 发布: 1 加入日期: 14-8-6 最近的帖子
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,修改在7 年前。

RE: SyncDeviceHeaderException while invoking add-file-entry webservice

Regular Member 帖子: 228 加入日期: 10-9-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).