掲示板

How to set status to approved for Web Service loaded items?

thumbnail
10年前 に Dave Weitzel によって更新されました。

How to set status to approved for Web Service loaded items?

Regular Member 投稿: 208 参加年月日: 09/11/18 最新の投稿
Hi,
I am writing a java client in eclipse to migrate data from an old web site to new Liferay 6.1 based system
I am using portal-client.jar and associated SOAP services and models to upload images and documents to the DocmentLibrary as well as JournalArticles and Users.

Having now got most calls I need working (at least creating the new objects in Liferay) I find that they are all "Draft" in status.

In Document Library I have the portal property dl.file.entry.drafts.enabled=false and no workflow setup. I am using DLAppServiceSoap to upload the bytes even tried updating (yes copying the file twice) to no avail.

In JournalArticle I do not have access to the updateStatus() method through SOAP even though it is in the ServiceUtil code on the server it isn't available for web service calls.

Is there a serviceContext property to be set to achieve this?

Is there a way to call the Service methods not in the portal-client jar file or wsdl?

For users I would like to be able to update them simply as we have a listener to monitor custom fields and move users into the right user groups.

Help/pointers much appreciated

Dave

.
thumbnail
10年前 に Ahmed Hasan によって更新されました。

RE: How to set status to approved for Web Service loaded items?

Expert 投稿: 306 参加年月日: 07/04/13 最新の投稿
Hi Dave,

For the methods that are required, you can write your own service layer and expose them. Once they are exposed, you can consume through the Java client that you've written to perform the additional functionality. How to create those remote API's through Liferay's Service Layer is covered in my book (chapter 8). You can download a free copy and refer there. For any more queries you can get in touch with me.

Yours Truly,
Ahmed Hasan
Author, Liferay Portlet Cookbook
thumbnail
10年前 に Dave Weitzel によって更新されました。

RE: How to set status to approved for Web Service loaded items?

Regular Member 投稿: 208 参加年月日: 09/11/18 最新の投稿
Thanks Ahmed
I have your book and we already have our own service builder objects exposed so I guess I can try to add something f necessary.
I cannot believe though that there is no simple way (through serviceContext settings perhaps) to achieve this.
I imagine that web services are used quite a lot for these sort of tasks.

It isnt directly obvious how to change the draft status on documentLibrary objects as the property has been set to not allow them!

Dave
10年前 に Lan Zhang によって更新されました。

RE: How to set status to approved for Web Service loaded items?

New Member 投稿: 21 参加年月日: 11/05/16 最新の投稿
try to set
serviceContext.setWorkflowAction(1)
thumbnail
10年前 に Dave Weitzel によって更新されました。

RE: How to set status to approved for Web Service loaded items?

Regular Member 投稿: 208 参加年月日: 09/11/18 最新の投稿
Thanks, that worked

I wasn't sure it would work for Document Library items as well as journal content but it seems to.

Dave
See other posts for new issues!