001    /**
002     * Copyright (c) 2000-2013 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.service.CountryServiceUtil;
020    
021    import java.rmi.RemoteException;
022    
023    /**
024     * Provides the SOAP utility for the
025     * {@link com.liferay.portal.service.CountryServiceUtil} service utility. The
026     * static methods of this class calls the same methods of the service utility.
027     * However, the signatures are different because it is difficult for SOAP to
028     * support certain types.
029     *
030     * <p>
031     * ServiceBuilder follows certain rules in translating the methods. For example,
032     * if the method in the service utility returns a {@link java.util.List}, that
033     * is translated to an array of {@link com.liferay.portal.model.CountrySoap}.
034     * If the method in the service utility returns a
035     * {@link com.liferay.portal.model.Country}, that is translated to a
036     * {@link com.liferay.portal.model.CountrySoap}. Methods that SOAP cannot
037     * safely wire are skipped.
038     * </p>
039     *
040     * <p>
041     * The benefits of using the SOAP utility is that it is cross platform
042     * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and
043     * even Perl, to call the generated services. One drawback of SOAP is that it is
044     * slow because it needs to serialize all calls into a text format (XML).
045     * </p>
046     *
047     * <p>
048     * You can see a list of services at http://localhost:8080/api/axis. Set the
049     * property <b>axis.servlet.hosts.allowed</b> in portal.properties to configure
050     * security.
051     * </p>
052     *
053     * <p>
054     * The SOAP utility is only generated for remote services.
055     * </p>
056     *
057     * @author Brian Wing Shun Chan
058     * @see CountryServiceHttp
059     * @see com.liferay.portal.model.CountrySoap
060     * @see com.liferay.portal.service.CountryServiceUtil
061     * @generated
062     */
063    public class CountryServiceSoap {
064            public static com.liferay.portal.model.CountrySoap addCountry(
065                    java.lang.String name, java.lang.String a2, java.lang.String a3,
066                    java.lang.String number, java.lang.String idd, boolean active)
067                    throws RemoteException {
068                    try {
069                            com.liferay.portal.model.Country returnValue = CountryServiceUtil.addCountry(name,
070                                            a2, a3, number, idd, active);
071    
072                            return com.liferay.portal.model.CountrySoap.toSoapModel(returnValue);
073                    }
074                    catch (Exception e) {
075                            _log.error(e, e);
076    
077                            throw new RemoteException(e.getMessage());
078                    }
079            }
080    
081            public static com.liferay.portal.model.CountrySoap fetchCountry(
082                    long countryId) throws RemoteException {
083                    try {
084                            com.liferay.portal.model.Country returnValue = CountryServiceUtil.fetchCountry(countryId);
085    
086                            return com.liferay.portal.model.CountrySoap.toSoapModel(returnValue);
087                    }
088                    catch (Exception e) {
089                            _log.error(e, e);
090    
091                            throw new RemoteException(e.getMessage());
092                    }
093            }
094    
095            public static com.liferay.portal.model.CountrySoap fetchCountryByA2(
096                    java.lang.String a2) throws RemoteException {
097                    try {
098                            com.liferay.portal.model.Country returnValue = CountryServiceUtil.fetchCountryByA2(a2);
099    
100                            return com.liferay.portal.model.CountrySoap.toSoapModel(returnValue);
101                    }
102                    catch (Exception e) {
103                            _log.error(e, e);
104    
105                            throw new RemoteException(e.getMessage());
106                    }
107            }
108    
109            public static com.liferay.portal.model.CountrySoap fetchCountryByA3(
110                    java.lang.String a3) throws RemoteException {
111                    try {
112                            com.liferay.portal.model.Country returnValue = CountryServiceUtil.fetchCountryByA3(a3);
113    
114                            return com.liferay.portal.model.CountrySoap.toSoapModel(returnValue);
115                    }
116                    catch (Exception e) {
117                            _log.error(e, e);
118    
119                            throw new RemoteException(e.getMessage());
120                    }
121            }
122    
123            public static com.liferay.portal.model.CountrySoap[] getCountries()
124                    throws RemoteException {
125                    try {
126                            java.util.List<com.liferay.portal.model.Country> returnValue = CountryServiceUtil.getCountries();
127    
128                            return com.liferay.portal.model.CountrySoap.toSoapModels(returnValue);
129                    }
130                    catch (Exception e) {
131                            _log.error(e, e);
132    
133                            throw new RemoteException(e.getMessage());
134                    }
135            }
136    
137            public static com.liferay.portal.model.CountrySoap[] getCountries(
138                    boolean active) throws RemoteException {
139                    try {
140                            java.util.List<com.liferay.portal.model.Country> returnValue = CountryServiceUtil.getCountries(active);
141    
142                            return com.liferay.portal.model.CountrySoap.toSoapModels(returnValue);
143                    }
144                    catch (Exception e) {
145                            _log.error(e, e);
146    
147                            throw new RemoteException(e.getMessage());
148                    }
149            }
150    
151            public static com.liferay.portal.model.CountrySoap getCountry(
152                    long countryId) throws RemoteException {
153                    try {
154                            com.liferay.portal.model.Country returnValue = CountryServiceUtil.getCountry(countryId);
155    
156                            return com.liferay.portal.model.CountrySoap.toSoapModel(returnValue);
157                    }
158                    catch (Exception e) {
159                            _log.error(e, e);
160    
161                            throw new RemoteException(e.getMessage());
162                    }
163            }
164    
165            public static com.liferay.portal.model.CountrySoap getCountryByA2(
166                    java.lang.String a2) throws RemoteException {
167                    try {
168                            com.liferay.portal.model.Country returnValue = CountryServiceUtil.getCountryByA2(a2);
169    
170                            return com.liferay.portal.model.CountrySoap.toSoapModel(returnValue);
171                    }
172                    catch (Exception e) {
173                            _log.error(e, e);
174    
175                            throw new RemoteException(e.getMessage());
176                    }
177            }
178    
179            public static com.liferay.portal.model.CountrySoap getCountryByA3(
180                    java.lang.String a3) throws RemoteException {
181                    try {
182                            com.liferay.portal.model.Country returnValue = CountryServiceUtil.getCountryByA3(a3);
183    
184                            return com.liferay.portal.model.CountrySoap.toSoapModel(returnValue);
185                    }
186                    catch (Exception e) {
187                            _log.error(e, e);
188    
189                            throw new RemoteException(e.getMessage());
190                    }
191            }
192    
193            public static com.liferay.portal.model.CountrySoap getCountryByName(
194                    java.lang.String name) throws RemoteException {
195                    try {
196                            com.liferay.portal.model.Country returnValue = CountryServiceUtil.getCountryByName(name);
197    
198                            return com.liferay.portal.model.CountrySoap.toSoapModel(returnValue);
199                    }
200                    catch (Exception e) {
201                            _log.error(e, e);
202    
203                            throw new RemoteException(e.getMessage());
204                    }
205            }
206    
207            private static Log _log = LogFactoryUtil.getLog(CountryServiceSoap.class);
208    }