1   /**
2    * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portlet.expando.service.http;
24  
25  import com.liferay.portal.kernel.log.Log;
26  import com.liferay.portal.kernel.log.LogFactoryUtil;
27  
28  import com.liferay.portlet.expando.service.ExpandoTableServiceUtil;
29  
30  import java.rmi.RemoteException;
31  
32  /**
33   * <a href="ExpandoTableServiceSoap.java.html"><b><i>View Source</i></b></a>
34   *
35   * <p>
36   * ServiceBuilder generated this class. Modifications in this class will be
37   * overwritten the next time is generated.
38   * </p>
39   *
40   * <p>
41   * This class provides a SOAP utility for the
42   * <code>com.liferay.portlet.expando.service.ExpandoTableServiceUtil</code> service
43   * utility. The static methods of this class calls the same methods of the
44   * service utility. However, the signatures are different because it is
45   * difficult for SOAP to support certain types.
46   * </p>
47   *
48   * <p>
49   * ServiceBuilder follows certain rules in translating the methods. For example,
50   * if the method in the service utility returns a <code>java.util.List</code>,
51   * that is translated to an array of
52   * <code>com.liferay.portlet.expando.model.ExpandoTableSoap</code>. If the method in the
53   * service utility returns a <code>com.liferay.portlet.expando.model.ExpandoTable</code>,
54   * that is translated to a <code>com.liferay.portlet.expando.model.ExpandoTableSoap</code>.
55   * Methods that SOAP cannot safely wire are skipped.
56   * </p>
57   *
58   * <p>
59   * The benefits of using the SOAP utility is that it is cross platform
60   * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and
61   * even Perl, to call the generated services. One drawback of SOAP is that it is
62   * slow because it needs to serialize all calls into a text format (XML).
63   * </p>
64   *
65   * <p>
66   * You can see a list of services at
67   * http://localhost:8080/tunnel-web/secure/axis. Set the property
68   * <code>tunnel.servlet.hosts.allowed</code> in portal.properties to configure
69   * security.
70   * </p>
71   *
72   * <p>
73   * The SOAP utility is only generated for remote services.
74   * </p>
75   *
76   * @author Brian Wing Shun Chan
77   *
78   * @see com.liferay.portlet.expando.service.ExpandoTableServiceUtil
79   * @see com.liferay.portlet.expando.service.http.ExpandoTableServiceHttp
80   * @see com.liferay.portlet.expando.service.model.ExpandoTableSoap
81   *
82   */
83  public class ExpandoTableServiceSoap {
84      public static com.liferay.portlet.expando.model.ExpandoTableSoap addDefaultTable(
85          java.lang.String className) throws RemoteException {
86          try {
87              com.liferay.portlet.expando.model.ExpandoTable returnValue = ExpandoTableServiceUtil.addDefaultTable(className);
88  
89              return com.liferay.portlet.expando.model.ExpandoTableSoap.toSoapModel(returnValue);
90          }
91          catch (Exception e) {
92              _log.error(e, e);
93  
94              throw new RemoteException(e.getMessage());
95          }
96      }
97  
98      public static com.liferay.portlet.expando.model.ExpandoTableSoap addDefaultTable(
99          long classNameId) throws RemoteException {
100         try {
101             com.liferay.portlet.expando.model.ExpandoTable returnValue = ExpandoTableServiceUtil.addDefaultTable(classNameId);
102 
103             return com.liferay.portlet.expando.model.ExpandoTableSoap.toSoapModel(returnValue);
104         }
105         catch (Exception e) {
106             _log.error(e, e);
107 
108             throw new RemoteException(e.getMessage());
109         }
110     }
111 
112     public static com.liferay.portlet.expando.model.ExpandoTableSoap addTable(
113         java.lang.String className, java.lang.String name)
114         throws RemoteException {
115         try {
116             com.liferay.portlet.expando.model.ExpandoTable returnValue = ExpandoTableServiceUtil.addTable(className,
117                     name);
118 
119             return com.liferay.portlet.expando.model.ExpandoTableSoap.toSoapModel(returnValue);
120         }
121         catch (Exception e) {
122             _log.error(e, e);
123 
124             throw new RemoteException(e.getMessage());
125         }
126     }
127 
128     public static com.liferay.portlet.expando.model.ExpandoTableSoap addTable(
129         long classNameId, java.lang.String name) throws RemoteException {
130         try {
131             com.liferay.portlet.expando.model.ExpandoTable returnValue = ExpandoTableServiceUtil.addTable(classNameId,
132                     name);
133 
134             return com.liferay.portlet.expando.model.ExpandoTableSoap.toSoapModel(returnValue);
135         }
136         catch (Exception e) {
137             _log.error(e, e);
138 
139             throw new RemoteException(e.getMessage());
140         }
141     }
142 
143     public static void deleteTable(long tableId) throws RemoteException {
144         try {
145             ExpandoTableServiceUtil.deleteTable(tableId);
146         }
147         catch (Exception e) {
148             _log.error(e, e);
149 
150             throw new RemoteException(e.getMessage());
151         }
152     }
153 
154     public static void deleteTable(java.lang.String className,
155         java.lang.String name) throws RemoteException {
156         try {
157             ExpandoTableServiceUtil.deleteTable(className, name);
158         }
159         catch (Exception e) {
160             _log.error(e, e);
161 
162             throw new RemoteException(e.getMessage());
163         }
164     }
165 
166     public static void deleteTable(long classNameId, java.lang.String name)
167         throws RemoteException {
168         try {
169             ExpandoTableServiceUtil.deleteTable(classNameId, name);
170         }
171         catch (Exception e) {
172             _log.error(e, e);
173 
174             throw new RemoteException(e.getMessage());
175         }
176     }
177 
178     public static void deleteTables(java.lang.String className)
179         throws RemoteException {
180         try {
181             ExpandoTableServiceUtil.deleteTables(className);
182         }
183         catch (Exception e) {
184             _log.error(e, e);
185 
186             throw new RemoteException(e.getMessage());
187         }
188     }
189 
190     public static void deleteTables(long classNameId) throws RemoteException {
191         try {
192             ExpandoTableServiceUtil.deleteTables(classNameId);
193         }
194         catch (Exception e) {
195             _log.error(e, e);
196 
197             throw new RemoteException(e.getMessage());
198         }
199     }
200 
201     public static com.liferay.portlet.expando.model.ExpandoTableSoap getDefaultTable(
202         java.lang.String className) throws RemoteException {
203         try {
204             com.liferay.portlet.expando.model.ExpandoTable returnValue = ExpandoTableServiceUtil.getDefaultTable(className);
205 
206             return com.liferay.portlet.expando.model.ExpandoTableSoap.toSoapModel(returnValue);
207         }
208         catch (Exception e) {
209             _log.error(e, e);
210 
211             throw new RemoteException(e.getMessage());
212         }
213     }
214 
215     public static com.liferay.portlet.expando.model.ExpandoTableSoap getDefaultTable(
216         long classNameId) throws RemoteException {
217         try {
218             com.liferay.portlet.expando.model.ExpandoTable returnValue = ExpandoTableServiceUtil.getDefaultTable(classNameId);
219 
220             return com.liferay.portlet.expando.model.ExpandoTableSoap.toSoapModel(returnValue);
221         }
222         catch (Exception e) {
223             _log.error(e, e);
224 
225             throw new RemoteException(e.getMessage());
226         }
227     }
228 
229     public static com.liferay.portlet.expando.model.ExpandoTableSoap getTable(
230         long tableId) throws RemoteException {
231         try {
232             com.liferay.portlet.expando.model.ExpandoTable returnValue = ExpandoTableServiceUtil.getTable(tableId);
233 
234             return com.liferay.portlet.expando.model.ExpandoTableSoap.toSoapModel(returnValue);
235         }
236         catch (Exception e) {
237             _log.error(e, e);
238 
239             throw new RemoteException(e.getMessage());
240         }
241     }
242 
243     public static com.liferay.portlet.expando.model.ExpandoTableSoap getTable(
244         java.lang.String className, java.lang.String name)
245         throws RemoteException {
246         try {
247             com.liferay.portlet.expando.model.ExpandoTable returnValue = ExpandoTableServiceUtil.getTable(className,
248                     name);
249 
250             return com.liferay.portlet.expando.model.ExpandoTableSoap.toSoapModel(returnValue);
251         }
252         catch (Exception e) {
253             _log.error(e, e);
254 
255             throw new RemoteException(e.getMessage());
256         }
257     }
258 
259     public static com.liferay.portlet.expando.model.ExpandoTableSoap getTable(
260         long classNameId, java.lang.String name) throws RemoteException {
261         try {
262             com.liferay.portlet.expando.model.ExpandoTable returnValue = ExpandoTableServiceUtil.getTable(classNameId,
263                     name);
264 
265             return com.liferay.portlet.expando.model.ExpandoTableSoap.toSoapModel(returnValue);
266         }
267         catch (Exception e) {
268             _log.error(e, e);
269 
270             throw new RemoteException(e.getMessage());
271         }
272     }
273 
274     public static com.liferay.portlet.expando.model.ExpandoTableSoap[] getTables(
275         java.lang.String className) throws RemoteException {
276         try {
277             java.util.List<com.liferay.portlet.expando.model.ExpandoTable> returnValue =
278                 ExpandoTableServiceUtil.getTables(className);
279 
280             return com.liferay.portlet.expando.model.ExpandoTableSoap.toSoapModels(returnValue);
281         }
282         catch (Exception e) {
283             _log.error(e, e);
284 
285             throw new RemoteException(e.getMessage());
286         }
287     }
288 
289     public static com.liferay.portlet.expando.model.ExpandoTableSoap[] getTables(
290         long classNameId) throws RemoteException {
291         try {
292             java.util.List<com.liferay.portlet.expando.model.ExpandoTable> returnValue =
293                 ExpandoTableServiceUtil.getTables(classNameId);
294 
295             return com.liferay.portlet.expando.model.ExpandoTableSoap.toSoapModels(returnValue);
296         }
297         catch (Exception e) {
298             _log.error(e, e);
299 
300             throw new RemoteException(e.getMessage());
301         }
302     }
303 
304     public static com.liferay.portlet.expando.model.ExpandoTableSoap updateTable(
305         long tableId, java.lang.String name) throws RemoteException {
306         try {
307             com.liferay.portlet.expando.model.ExpandoTable returnValue = ExpandoTableServiceUtil.updateTable(tableId,
308                     name);
309 
310             return com.liferay.portlet.expando.model.ExpandoTableSoap.toSoapModel(returnValue);
311         }
312         catch (Exception e) {
313             _log.error(e, e);
314 
315             throw new RemoteException(e.getMessage());
316         }
317     }
318 
319     private static Log _log = LogFactoryUtil.getLog(ExpandoTableServiceSoap.class);
320 }