001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.service.http;
016    
017    import com.liferay.portal.kernel.log.Log;
018    import com.liferay.portal.kernel.log.LogFactoryUtil;
019    import com.liferay.portal.kernel.util.MethodHandler;
020    import com.liferay.portal.kernel.util.MethodKey;
021    import com.liferay.portal.security.auth.HttpPrincipal;
022    import com.liferay.portal.service.CompanyServiceUtil;
023    
024    /**
025     * <p>
026     * This class provides a HTTP utility for the
027     * {@link com.liferay.portal.service.CompanyServiceUtil} service utility. The
028     * static methods of this class calls the same methods of the service utility.
029     * However, the signatures are different because it requires an additional
030     * {@link com.liferay.portal.security.auth.HttpPrincipal} parameter.
031     * </p>
032     *
033     * <p>
034     * The benefits of using the HTTP utility is that it is fast and allows for
035     * tunneling without the cost of serializing to text. The drawback is that it
036     * only works with Java.
037     * </p>
038     *
039     * <p>
040     * Set the property <b>tunnel.servlet.hosts.allowed</b> in portal.properties to
041     * configure security.
042     * </p>
043     *
044     * <p>
045     * The HTTP utility is only generated for remote services.
046     * </p>
047     *
048     * @author    Brian Wing Shun Chan
049     * @see       CompanyServiceSoap
050     * @see       com.liferay.portal.security.auth.HttpPrincipal
051     * @see       com.liferay.portal.service.CompanyServiceUtil
052     * @generated
053     */
054    public class CompanyServiceHttp {
055            public static com.liferay.portal.model.Company addCompany(
056                    HttpPrincipal httpPrincipal, java.lang.String webId,
057                    java.lang.String virtualHost, java.lang.String mx,
058                    java.lang.String shardName, boolean system, int maxUsers)
059                    throws com.liferay.portal.kernel.exception.PortalException,
060                            com.liferay.portal.kernel.exception.SystemException {
061                    try {
062                            MethodKey methodKey = new MethodKey(CompanyServiceUtil.class.getName(),
063                                            "addCompany", java.lang.String.class,
064                                            java.lang.String.class, java.lang.String.class,
065                                            java.lang.String.class, boolean.class, int.class);
066    
067                            MethodHandler methodHandler = new MethodHandler(methodKey, webId,
068                                            virtualHost, mx, shardName, system, maxUsers);
069    
070                            Object returnObj = null;
071    
072                            try {
073                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
074                            }
075                            catch (Exception e) {
076                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
077                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
078                                    }
079    
080                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
081                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
082                                    }
083    
084                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
085                            }
086    
087                            return (com.liferay.portal.model.Company)returnObj;
088                    }
089                    catch (com.liferay.portal.kernel.exception.SystemException se) {
090                            _log.error(se, se);
091    
092                            throw se;
093                    }
094            }
095    
096            public static void deleteLogo(HttpPrincipal httpPrincipal, long companyId)
097                    throws com.liferay.portal.kernel.exception.PortalException,
098                            com.liferay.portal.kernel.exception.SystemException {
099                    try {
100                            MethodKey methodKey = new MethodKey(CompanyServiceUtil.class.getName(),
101                                            "deleteLogo", long.class);
102    
103                            MethodHandler methodHandler = new MethodHandler(methodKey, companyId);
104    
105                            try {
106                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
107                            }
108                            catch (Exception e) {
109                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
110                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
111                                    }
112    
113                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
114                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
115                                    }
116    
117                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
118                            }
119                    }
120                    catch (com.liferay.portal.kernel.exception.SystemException se) {
121                            _log.error(se, se);
122    
123                            throw se;
124                    }
125            }
126    
127            public static com.liferay.portal.model.Company getCompanyById(
128                    HttpPrincipal httpPrincipal, long companyId)
129                    throws com.liferay.portal.kernel.exception.PortalException,
130                            com.liferay.portal.kernel.exception.SystemException {
131                    try {
132                            MethodKey methodKey = new MethodKey(CompanyServiceUtil.class.getName(),
133                                            "getCompanyById", long.class);
134    
135                            MethodHandler methodHandler = new MethodHandler(methodKey, companyId);
136    
137                            Object returnObj = null;
138    
139                            try {
140                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
141                            }
142                            catch (Exception e) {
143                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
144                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
145                                    }
146    
147                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
148                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
149                                    }
150    
151                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
152                            }
153    
154                            return (com.liferay.portal.model.Company)returnObj;
155                    }
156                    catch (com.liferay.portal.kernel.exception.SystemException se) {
157                            _log.error(se, se);
158    
159                            throw se;
160                    }
161            }
162    
163            public static com.liferay.portal.model.Company getCompanyByLogoId(
164                    HttpPrincipal httpPrincipal, long logoId)
165                    throws com.liferay.portal.kernel.exception.PortalException,
166                            com.liferay.portal.kernel.exception.SystemException {
167                    try {
168                            MethodKey methodKey = new MethodKey(CompanyServiceUtil.class.getName(),
169                                            "getCompanyByLogoId", long.class);
170    
171                            MethodHandler methodHandler = new MethodHandler(methodKey, logoId);
172    
173                            Object returnObj = null;
174    
175                            try {
176                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
177                            }
178                            catch (Exception e) {
179                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
180                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
181                                    }
182    
183                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
184                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
185                                    }
186    
187                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
188                            }
189    
190                            return (com.liferay.portal.model.Company)returnObj;
191                    }
192                    catch (com.liferay.portal.kernel.exception.SystemException se) {
193                            _log.error(se, se);
194    
195                            throw se;
196                    }
197            }
198    
199            public static com.liferay.portal.model.Company getCompanyByMx(
200                    HttpPrincipal httpPrincipal, java.lang.String mx)
201                    throws com.liferay.portal.kernel.exception.PortalException,
202                            com.liferay.portal.kernel.exception.SystemException {
203                    try {
204                            MethodKey methodKey = new MethodKey(CompanyServiceUtil.class.getName(),
205                                            "getCompanyByMx", java.lang.String.class);
206    
207                            MethodHandler methodHandler = new MethodHandler(methodKey, mx);
208    
209                            Object returnObj = null;
210    
211                            try {
212                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
213                            }
214                            catch (Exception e) {
215                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
216                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
217                                    }
218    
219                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
220                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
221                                    }
222    
223                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
224                            }
225    
226                            return (com.liferay.portal.model.Company)returnObj;
227                    }
228                    catch (com.liferay.portal.kernel.exception.SystemException se) {
229                            _log.error(se, se);
230    
231                            throw se;
232                    }
233            }
234    
235            public static com.liferay.portal.model.Company getCompanyByVirtualHost(
236                    HttpPrincipal httpPrincipal, java.lang.String virtualHost)
237                    throws com.liferay.portal.kernel.exception.PortalException,
238                            com.liferay.portal.kernel.exception.SystemException {
239                    try {
240                            MethodKey methodKey = new MethodKey(CompanyServiceUtil.class.getName(),
241                                            "getCompanyByVirtualHost", java.lang.String.class);
242    
243                            MethodHandler methodHandler = new MethodHandler(methodKey,
244                                            virtualHost);
245    
246                            Object returnObj = null;
247    
248                            try {
249                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
250                            }
251                            catch (Exception e) {
252                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
253                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
254                                    }
255    
256                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
257                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
258                                    }
259    
260                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
261                            }
262    
263                            return (com.liferay.portal.model.Company)returnObj;
264                    }
265                    catch (com.liferay.portal.kernel.exception.SystemException se) {
266                            _log.error(se, se);
267    
268                            throw se;
269                    }
270            }
271    
272            public static com.liferay.portal.model.Company getCompanyByWebId(
273                    HttpPrincipal httpPrincipal, java.lang.String webId)
274                    throws com.liferay.portal.kernel.exception.PortalException,
275                            com.liferay.portal.kernel.exception.SystemException {
276                    try {
277                            MethodKey methodKey = new MethodKey(CompanyServiceUtil.class.getName(),
278                                            "getCompanyByWebId", java.lang.String.class);
279    
280                            MethodHandler methodHandler = new MethodHandler(methodKey, webId);
281    
282                            Object returnObj = null;
283    
284                            try {
285                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
286                            }
287                            catch (Exception e) {
288                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
289                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
290                                    }
291    
292                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
293                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
294                                    }
295    
296                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
297                            }
298    
299                            return (com.liferay.portal.model.Company)returnObj;
300                    }
301                    catch (com.liferay.portal.kernel.exception.SystemException se) {
302                            _log.error(se, se);
303    
304                            throw se;
305                    }
306            }
307    
308            public static void removePreferences(HttpPrincipal httpPrincipal,
309                    long companyId, java.lang.String[] keys)
310                    throws com.liferay.portal.kernel.exception.PortalException,
311                            com.liferay.portal.kernel.exception.SystemException {
312                    try {
313                            MethodKey methodKey = new MethodKey(CompanyServiceUtil.class.getName(),
314                                            "removePreferences", long.class, java.lang.String[].class);
315    
316                            MethodHandler methodHandler = new MethodHandler(methodKey,
317                                            companyId, keys);
318    
319                            try {
320                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
321                            }
322                            catch (Exception e) {
323                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
324                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
325                                    }
326    
327                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
328                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
329                                    }
330    
331                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
332                            }
333                    }
334                    catch (com.liferay.portal.kernel.exception.SystemException se) {
335                            _log.error(se, se);
336    
337                            throw se;
338                    }
339            }
340    
341            public static com.liferay.portal.model.Company updateCompany(
342                    HttpPrincipal httpPrincipal, long companyId,
343                    java.lang.String virtualHost, java.lang.String mx, int maxUsers)
344                    throws com.liferay.portal.kernel.exception.PortalException,
345                            com.liferay.portal.kernel.exception.SystemException {
346                    try {
347                            MethodKey methodKey = new MethodKey(CompanyServiceUtil.class.getName(),
348                                            "updateCompany", long.class, java.lang.String.class,
349                                            java.lang.String.class, int.class);
350    
351                            MethodHandler methodHandler = new MethodHandler(methodKey,
352                                            companyId, virtualHost, mx, maxUsers);
353    
354                            Object returnObj = null;
355    
356                            try {
357                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
358                            }
359                            catch (Exception e) {
360                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
361                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
362                                    }
363    
364                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
365                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
366                                    }
367    
368                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
369                            }
370    
371                            return (com.liferay.portal.model.Company)returnObj;
372                    }
373                    catch (com.liferay.portal.kernel.exception.SystemException se) {
374                            _log.error(se, se);
375    
376                            throw se;
377                    }
378            }
379    
380            public static com.liferay.portal.model.Company updateCompany(
381                    HttpPrincipal httpPrincipal, long companyId,
382                    java.lang.String virtualHost, java.lang.String mx,
383                    java.lang.String homeURL, java.lang.String name,
384                    java.lang.String legalName, java.lang.String legalId,
385                    java.lang.String legalType, java.lang.String sicCode,
386                    java.lang.String tickerSymbol, java.lang.String industry,
387                    java.lang.String type, java.lang.String size)
388                    throws com.liferay.portal.kernel.exception.PortalException,
389                            com.liferay.portal.kernel.exception.SystemException {
390                    try {
391                            MethodKey methodKey = new MethodKey(CompanyServiceUtil.class.getName(),
392                                            "updateCompany", long.class, java.lang.String.class,
393                                            java.lang.String.class, java.lang.String.class,
394                                            java.lang.String.class, java.lang.String.class,
395                                            java.lang.String.class, java.lang.String.class,
396                                            java.lang.String.class, java.lang.String.class,
397                                            java.lang.String.class, java.lang.String.class,
398                                            java.lang.String.class);
399    
400                            MethodHandler methodHandler = new MethodHandler(methodKey,
401                                            companyId, virtualHost, mx, homeURL, name, legalName,
402                                            legalId, legalType, sicCode, tickerSymbol, industry, type,
403                                            size);
404    
405                            Object returnObj = null;
406    
407                            try {
408                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
409                            }
410                            catch (Exception e) {
411                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
412                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
413                                    }
414    
415                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
416                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
417                                    }
418    
419                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
420                            }
421    
422                            return (com.liferay.portal.model.Company)returnObj;
423                    }
424                    catch (com.liferay.portal.kernel.exception.SystemException se) {
425                            _log.error(se, se);
426    
427                            throw se;
428                    }
429            }
430    
431            public static com.liferay.portal.model.Company updateCompany(
432                    HttpPrincipal httpPrincipal, long companyId,
433                    java.lang.String virtualHost, java.lang.String mx,
434                    java.lang.String homeURL, java.lang.String name,
435                    java.lang.String legalName, java.lang.String legalId,
436                    java.lang.String legalType, java.lang.String sicCode,
437                    java.lang.String tickerSymbol, java.lang.String industry,
438                    java.lang.String type, java.lang.String size,
439                    java.lang.String languageId, java.lang.String timeZoneId,
440                    java.util.List<com.liferay.portal.model.Address> addresses,
441                    java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses,
442                    java.util.List<com.liferay.portal.model.Phone> phones,
443                    java.util.List<com.liferay.portal.model.Website> websites,
444                    com.liferay.portal.kernel.util.UnicodeProperties properties)
445                    throws com.liferay.portal.kernel.exception.PortalException,
446                            com.liferay.portal.kernel.exception.SystemException {
447                    try {
448                            MethodKey methodKey = new MethodKey(CompanyServiceUtil.class.getName(),
449                                            "updateCompany", long.class, java.lang.String.class,
450                                            java.lang.String.class, java.lang.String.class,
451                                            java.lang.String.class, java.lang.String.class,
452                                            java.lang.String.class, java.lang.String.class,
453                                            java.lang.String.class, java.lang.String.class,
454                                            java.lang.String.class, java.lang.String.class,
455                                            java.lang.String.class, java.lang.String.class,
456                                            java.lang.String.class, java.util.List.class,
457                                            java.util.List.class, java.util.List.class,
458                                            java.util.List.class,
459                                            com.liferay.portal.kernel.util.UnicodeProperties.class);
460    
461                            MethodHandler methodHandler = new MethodHandler(methodKey,
462                                            companyId, virtualHost, mx, homeURL, name, legalName,
463                                            legalId, legalType, sicCode, tickerSymbol, industry, type,
464                                            size, languageId, timeZoneId, addresses, emailAddresses,
465                                            phones, websites, properties);
466    
467                            Object returnObj = null;
468    
469                            try {
470                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
471                            }
472                            catch (Exception e) {
473                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
474                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
475                                    }
476    
477                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
478                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
479                                    }
480    
481                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
482                            }
483    
484                            return (com.liferay.portal.model.Company)returnObj;
485                    }
486                    catch (com.liferay.portal.kernel.exception.SystemException se) {
487                            _log.error(se, se);
488    
489                            throw se;
490                    }
491            }
492    
493            public static void updateDisplay(HttpPrincipal httpPrincipal,
494                    long companyId, java.lang.String languageId, java.lang.String timeZoneId)
495                    throws com.liferay.portal.kernel.exception.PortalException,
496                            com.liferay.portal.kernel.exception.SystemException {
497                    try {
498                            MethodKey methodKey = new MethodKey(CompanyServiceUtil.class.getName(),
499                                            "updateDisplay", long.class, java.lang.String.class,
500                                            java.lang.String.class);
501    
502                            MethodHandler methodHandler = new MethodHandler(methodKey,
503                                            companyId, languageId, timeZoneId);
504    
505                            try {
506                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
507                            }
508                            catch (Exception e) {
509                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
510                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
511                                    }
512    
513                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
514                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
515                                    }
516    
517                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
518                            }
519                    }
520                    catch (com.liferay.portal.kernel.exception.SystemException se) {
521                            _log.error(se, se);
522    
523                            throw se;
524                    }
525            }
526    
527            public static void updateLogo(HttpPrincipal httpPrincipal, long companyId,
528                    java.io.File file)
529                    throws com.liferay.portal.kernel.exception.PortalException,
530                            com.liferay.portal.kernel.exception.SystemException {
531                    try {
532                            MethodKey methodKey = new MethodKey(CompanyServiceUtil.class.getName(),
533                                            "updateLogo", long.class, java.io.File.class);
534    
535                            MethodHandler methodHandler = new MethodHandler(methodKey,
536                                            companyId, file);
537    
538                            try {
539                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
540                            }
541                            catch (Exception e) {
542                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
543                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
544                                    }
545    
546                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
547                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
548                                    }
549    
550                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
551                            }
552                    }
553                    catch (com.liferay.portal.kernel.exception.SystemException se) {
554                            _log.error(se, se);
555    
556                            throw se;
557                    }
558            }
559    
560            public static void updatePreferences(HttpPrincipal httpPrincipal,
561                    long companyId,
562                    com.liferay.portal.kernel.util.UnicodeProperties properties)
563                    throws com.liferay.portal.kernel.exception.PortalException,
564                            com.liferay.portal.kernel.exception.SystemException {
565                    try {
566                            MethodKey methodKey = new MethodKey(CompanyServiceUtil.class.getName(),
567                                            "updatePreferences", long.class,
568                                            com.liferay.portal.kernel.util.UnicodeProperties.class);
569    
570                            MethodHandler methodHandler = new MethodHandler(methodKey,
571                                            companyId, properties);
572    
573                            try {
574                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
575                            }
576                            catch (Exception e) {
577                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
578                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
579                                    }
580    
581                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
582                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
583                                    }
584    
585                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
586                            }
587                    }
588                    catch (com.liferay.portal.kernel.exception.SystemException se) {
589                            _log.error(se, se);
590    
591                            throw se;
592                    }
593            }
594    
595            public static void updateSecurity(HttpPrincipal httpPrincipal,
596                    long companyId, java.lang.String authType, boolean autoLogin,
597                    boolean sendPassword, boolean strangers, boolean strangersWithMx,
598                    boolean strangersVerify, boolean communityLogo)
599                    throws com.liferay.portal.kernel.exception.PortalException,
600                            com.liferay.portal.kernel.exception.SystemException {
601                    try {
602                            MethodKey methodKey = new MethodKey(CompanyServiceUtil.class.getName(),
603                                            "updateSecurity", long.class, java.lang.String.class,
604                                            boolean.class, boolean.class, boolean.class, boolean.class,
605                                            boolean.class, boolean.class);
606    
607                            MethodHandler methodHandler = new MethodHandler(methodKey,
608                                            companyId, authType, autoLogin, sendPassword, strangers,
609                                            strangersWithMx, strangersVerify, communityLogo);
610    
611                            try {
612                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
613                            }
614                            catch (Exception e) {
615                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
616                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
617                                    }
618    
619                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
620                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
621                                    }
622    
623                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
624                            }
625                    }
626                    catch (com.liferay.portal.kernel.exception.SystemException se) {
627                            _log.error(se, se);
628    
629                            throw se;
630                    }
631            }
632    
633            private static Log _log = LogFactoryUtil.getLog(CompanyServiceHttp.class);
634    }