2 * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
4 * This library is free software; you can redistribute it and/or modify it under
5 * the terms of the GNU Lesser General Public License as published by the Free
6 * Software Foundation; either version 2.1 of the License, or (at your option)
9 * This library is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
15 package com.liferay.portal.service.http;
17 import com.liferay.portal.kernel.log.Log;
18 import com.liferay.portal.kernel.log.LogFactoryUtil;
19 import com.liferay.portal.service.MembershipRequestServiceUtil;
21 import java.rmi.RemoteException;
25 * This class provides a SOAP utility for the
26 * {@link com.liferay.portal.service.MembershipRequestServiceUtil} service utility. The
27 * static methods of this class calls the same methods of the service utility.
28 * However, the signatures are different because it is difficult for SOAP to
29 * support certain types.
33 * ServiceBuilder follows certain rules in translating the methods. For example,
34 * if the method in the service utility returns a {@link java.util.List}, that
35 * is translated to an array of {@link com.liferay.portal.model.MembershipRequestSoap}.
36 * If the method in the service utility returns a
37 * {@link com.liferay.portal.model.MembershipRequest}, that is translated to a
38 * {@link com.liferay.portal.model.MembershipRequestSoap}. Methods that SOAP cannot
39 * safely wire are skipped.
43 * The benefits of using the SOAP utility is that it is cross platform
44 * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and
45 * even Perl, to call the generated services. One drawback of SOAP is that it is
46 * slow because it needs to serialize all calls into a text format (XML).
50 * You can see a list of services at
51 * http://localhost:8080/api/secure/axis. Set the property
52 * <b>axis.servlet.hosts.allowed</b> in portal.properties to configure
57 * The SOAP utility is only generated for remote services.
60 * @author Brian Wing Shun Chan
61 * @see MembershipRequestServiceHttp
62 * @see com.liferay.portal.model.MembershipRequestSoap
63 * @see com.liferay.portal.service.MembershipRequestServiceUtil
66 public class MembershipRequestServiceSoap {
67 public static com.liferay.portal.model.MembershipRequestSoap addMembershipRequest(
68 long groupId, java.lang.String comments,
69 com.liferay.portal.service.ServiceContext serviceContext)
70 throws RemoteException {
72 com.liferay.portal.model.MembershipRequest returnValue = MembershipRequestServiceUtil.addMembershipRequest(groupId,
73 comments, serviceContext);
75 return com.liferay.portal.model.MembershipRequestSoap.toSoapModel(returnValue);
80 throw new RemoteException(e.getMessage());
84 public static void deleteMembershipRequests(long groupId, int statusId)
85 throws RemoteException {
87 MembershipRequestServiceUtil.deleteMembershipRequests(groupId,
93 throw new RemoteException(e.getMessage());
97 public static com.liferay.portal.model.MembershipRequestSoap[] getMembershipRequestByUserId(
98 long userId) throws RemoteException {
100 java.util.List<com.liferay.portal.model.MembershipRequest> returnValue = MembershipRequestServiceUtil.getMembershipRequestByUserId(userId);
102 return com.liferay.portal.model.MembershipRequestSoap.toSoapModels(returnValue);
104 catch (Exception e) {
107 throw new RemoteException(e.getMessage());
111 public static com.liferay.portal.model.MembershipRequestSoap getMembershipRequest(
112 long membershipRequestId) throws RemoteException {
114 com.liferay.portal.model.MembershipRequest returnValue = MembershipRequestServiceUtil.getMembershipRequest(membershipRequestId);
116 return com.liferay.portal.model.MembershipRequestSoap.toSoapModel(returnValue);
118 catch (Exception e) {
121 throw new RemoteException(e.getMessage());
125 public static void updateStatus(long membershipRequestId,
126 java.lang.String reviewComments, int statusId,
127 com.liferay.portal.service.ServiceContext serviceContext)
128 throws RemoteException {
130 MembershipRequestServiceUtil.updateStatus(membershipRequestId,
131 reviewComments, statusId, serviceContext);
133 catch (Exception e) {
136 throw new RemoteException(e.getMessage());
140 private static Log _log = LogFactoryUtil.getLog(MembershipRequestServiceSoap.class);