001: /**
002: * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
003: *
004: * Permission is hereby granted, free of charge, to any person obtaining a copy
005: * of this software and associated documentation files (the "Software"), to deal
006: * in the Software without restriction, including without limitation the rights
007: * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
008: * copies of the Software, and to permit persons to whom the Software is
009: * furnished to do so, subject to the following conditions:
010: *
011: * The above copyright notice and this permission notice shall be included in
012: * all copies or substantial portions of the Software.
013: *
014: * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
015: * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
016: * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
017: * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
018: * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
019: * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
020: * SOFTWARE.
021: */package com.liferay.portlet.tags.service.http;
022:
023: import com.liferay.portal.kernel.log.Log;
024: import com.liferay.portal.kernel.log.LogFactoryUtil;
025:
026: import com.liferay.portlet.tags.service.TagsEntryServiceUtil;
027:
028: import java.rmi.RemoteException;
029:
030: /**
031: * <a href="TagsEntryServiceSoap.java.html"><b><i>View Source</i></b></a>
032: *
033: * <p>
034: * ServiceBuilder generated this class. Modifications in this class will be
035: * overwritten the next time is generated.
036: * </p>
037: *
038: * <p>
039: * This class provides a SOAP utility for the
040: * <code>com.liferay.portlet.tags.service.TagsEntryServiceUtil</code> service
041: * utility. The static methods of this class calls the same methods of the
042: * service utility. However, the signatures are different because it is
043: * difficult for SOAP to support certain types.
044: * </p>
045: *
046: * <p>
047: * ServiceBuilder follows certain rules in translating the methods. For example,
048: * if the method in the service utility returns a <code>java.util.List</code>,
049: * that is translated to an array of
050: * <code>com.liferay.portlet.tags.model.TagsEntrySoap</code>. If the method in the
051: * service utility returns a <code>com.liferay.portlet.tags.model.TagsEntry</code>,
052: * that is translated to a <code>com.liferay.portlet.tags.model.TagsEntrySoap</code>.
053: * Methods that SOAP cannot safely wire are skipped.
054: * </p>
055: *
056: * <p>
057: * The benefits of using the SOAP utility is that it is cross platform
058: * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and
059: * even Perl, to call the generated services. One drawback of SOAP is that it is
060: * slow because it needs to serialize all calls into a text format (XML).
061: * </p>
062: *
063: * <p>
064: * You can see a list of services at
065: * http://localhost:8080/tunnel-web/secure/axis. Set the property
066: * <code>tunnel.servlet.hosts.allowed</code> in portal.properties to configure
067: * security.
068: * </p>
069: *
070: * <p>
071: * The SOAP utility is only generated for remote services.
072: * </p>
073: *
074: * @author Brian Wing Shun Chan
075: *
076: * @see com.liferay.portlet.tags.service.TagsEntryServiceUtil
077: * @see com.liferay.portlet.tags.service.http.TagsEntryServiceHttp
078: * @see com.liferay.portlet.tags.service.model.TagsEntrySoap
079: *
080: */
081: public class TagsEntryServiceSoap {
082: public static com.liferay.portlet.tags.model.TagsEntrySoap addEntry(
083: java.lang.String name) throws RemoteException {
084: try {
085: com.liferay.portlet.tags.model.TagsEntry returnValue = TagsEntryServiceUtil
086: .addEntry(name);
087:
088: return com.liferay.portlet.tags.model.TagsEntrySoap
089: .toSoapModel(returnValue);
090: } catch (Exception e) {
091: _log.error(e, e);
092:
093: throw new RemoteException(e.getMessage());
094: }
095: }
096:
097: public static com.liferay.portlet.tags.model.TagsEntrySoap addEntry(
098: java.lang.String name, java.lang.String[] properties)
099: throws RemoteException {
100: try {
101: com.liferay.portlet.tags.model.TagsEntry returnValue = TagsEntryServiceUtil
102: .addEntry(name, properties);
103:
104: return com.liferay.portlet.tags.model.TagsEntrySoap
105: .toSoapModel(returnValue);
106: } catch (Exception e) {
107: _log.error(e, e);
108:
109: throw new RemoteException(e.getMessage());
110: }
111: }
112:
113: public static void deleteEntry(long entryId) throws RemoteException {
114: try {
115: TagsEntryServiceUtil.deleteEntry(entryId);
116: } catch (Exception e) {
117: _log.error(e, e);
118:
119: throw new RemoteException(e.getMessage());
120: }
121: }
122:
123: public static com.liferay.portlet.tags.model.TagsEntrySoap[] getEntries(
124: java.lang.String className, long classPK)
125: throws RemoteException {
126: try {
127: java.util.List returnValue = TagsEntryServiceUtil
128: .getEntries(className, classPK);
129:
130: return com.liferay.portlet.tags.model.TagsEntrySoap
131: .toSoapModels(returnValue);
132: } catch (Exception e) {
133: _log.error(e, e);
134:
135: throw new RemoteException(e.getMessage());
136: }
137: }
138:
139: public static com.liferay.portlet.tags.model.TagsEntrySoap[] search(
140: long companyId, java.lang.String name,
141: java.lang.String[] properties) throws RemoteException {
142: try {
143: java.util.List returnValue = TagsEntryServiceUtil.search(
144: companyId, name, properties);
145:
146: return com.liferay.portlet.tags.model.TagsEntrySoap
147: .toSoapModels(returnValue);
148: } catch (Exception e) {
149: _log.error(e, e);
150:
151: throw new RemoteException(e.getMessage());
152: }
153: }
154:
155: public static com.liferay.portlet.tags.model.TagsEntrySoap[] search(
156: long companyId, java.lang.String name,
157: java.lang.String[] properties, int begin, int end)
158: throws RemoteException {
159: try {
160: java.util.List returnValue = TagsEntryServiceUtil.search(
161: companyId, name, properties, begin, end);
162:
163: return com.liferay.portlet.tags.model.TagsEntrySoap
164: .toSoapModels(returnValue);
165: } catch (Exception e) {
166: _log.error(e, e);
167:
168: throw new RemoteException(e.getMessage());
169: }
170: }
171:
172: public static com.liferay.portal.kernel.json.JSONArrayWrapper searchAutocomplete(
173: long companyId, java.lang.String name,
174: java.lang.String[] properties, int begin, int end)
175: throws RemoteException {
176: try {
177: com.liferay.portal.kernel.json.JSONArrayWrapper returnValue = TagsEntryServiceUtil
178: .searchAutocomplete(companyId, name, properties,
179: begin, end);
180:
181: return returnValue;
182: } catch (Exception e) {
183: _log.error(e, e);
184:
185: throw new RemoteException(e.getMessage());
186: }
187: }
188:
189: public static int searchCount(long companyId,
190: java.lang.String name, java.lang.String[] properties)
191: throws RemoteException {
192: try {
193: int returnValue = TagsEntryServiceUtil.searchCount(
194: companyId, name, properties);
195:
196: return returnValue;
197: } catch (Exception e) {
198: _log.error(e, e);
199:
200: throw new RemoteException(e.getMessage());
201: }
202: }
203:
204: public static com.liferay.portlet.tags.model.TagsEntrySoap updateEntry(
205: long entryId, java.lang.String name) throws RemoteException {
206: try {
207: com.liferay.portlet.tags.model.TagsEntry returnValue = TagsEntryServiceUtil
208: .updateEntry(entryId, name);
209:
210: return com.liferay.portlet.tags.model.TagsEntrySoap
211: .toSoapModel(returnValue);
212: } catch (Exception e) {
213: _log.error(e, e);
214:
215: throw new RemoteException(e.getMessage());
216: }
217: }
218:
219: public static com.liferay.portlet.tags.model.TagsEntrySoap updateEntry(
220: long entryId, java.lang.String name,
221: java.lang.String[] properties) throws RemoteException {
222: try {
223: com.liferay.portlet.tags.model.TagsEntry returnValue = TagsEntryServiceUtil
224: .updateEntry(entryId, name, properties);
225:
226: return com.liferay.portlet.tags.model.TagsEntrySoap
227: .toSoapModel(returnValue);
228: } catch (Exception e) {
229: _log.error(e, e);
230:
231: throw new RemoteException(e.getMessage());
232: }
233: }
234:
235: private static Log _log = LogFactoryUtil
236: .getLog(TagsEntryServiceSoap.class);
237: }
|