1
19
20 package com.liferay.portal.service.http;
21
22 import com.liferay.portal.kernel.log.Log;
23 import com.liferay.portal.kernel.log.LogFactoryUtil;
24 import com.liferay.portal.service.CountryServiceUtil;
25
26 import java.rmi.RemoteException;
27
28
79 public class CountryServiceSoap {
80 public static com.liferay.portal.model.CountrySoap addCountry(
81 java.lang.String name, java.lang.String a2, java.lang.String a3,
82 java.lang.String number, java.lang.String idd, boolean active)
83 throws RemoteException {
84 try {
85 com.liferay.portal.model.Country returnValue = CountryServiceUtil.addCountry(name,
86 a2, a3, number, idd, active);
87
88 return com.liferay.portal.model.CountrySoap.toSoapModel(returnValue);
89 }
90 catch (Exception e) {
91 _log.error(e, e);
92
93 throw new RemoteException(e.getMessage());
94 }
95 }
96
97 public static com.liferay.portal.model.CountrySoap[] getCountries()
98 throws RemoteException {
99 try {
100 java.util.List<com.liferay.portal.model.Country> returnValue = CountryServiceUtil.getCountries();
101
102 return com.liferay.portal.model.CountrySoap.toSoapModels(returnValue);
103 }
104 catch (Exception e) {
105 _log.error(e, e);
106
107 throw new RemoteException(e.getMessage());
108 }
109 }
110
111 public static com.liferay.portal.model.CountrySoap[] getCountries(
112 boolean active) throws RemoteException {
113 try {
114 java.util.List<com.liferay.portal.model.Country> returnValue = CountryServiceUtil.getCountries(active);
115
116 return com.liferay.portal.model.CountrySoap.toSoapModels(returnValue);
117 }
118 catch (Exception e) {
119 _log.error(e, e);
120
121 throw new RemoteException(e.getMessage());
122 }
123 }
124
125 public static com.liferay.portal.model.CountrySoap getCountry(
126 long countryId) throws RemoteException {
127 try {
128 com.liferay.portal.model.Country returnValue = CountryServiceUtil.getCountry(countryId);
129
130 return com.liferay.portal.model.CountrySoap.toSoapModel(returnValue);
131 }
132 catch (Exception e) {
133 _log.error(e, e);
134
135 throw new RemoteException(e.getMessage());
136 }
137 }
138
139 public static com.liferay.portal.model.CountrySoap getCountryByA2(
140 java.lang.String a2) throws RemoteException {
141 try {
142 com.liferay.portal.model.Country returnValue = CountryServiceUtil.getCountryByA2(a2);
143
144 return com.liferay.portal.model.CountrySoap.toSoapModel(returnValue);
145 }
146 catch (Exception e) {
147 _log.error(e, e);
148
149 throw new RemoteException(e.getMessage());
150 }
151 }
152
153 public static com.liferay.portal.model.CountrySoap getCountryByA3(
154 java.lang.String a3) throws RemoteException {
155 try {
156 com.liferay.portal.model.Country returnValue = CountryServiceUtil.getCountryByA3(a3);
157
158 return com.liferay.portal.model.CountrySoap.toSoapModel(returnValue);
159 }
160 catch (Exception e) {
161 _log.error(e, e);
162
163 throw new RemoteException(e.getMessage());
164 }
165 }
166
167 public static com.liferay.portal.model.CountrySoap getCountryByName(
168 java.lang.String name) throws RemoteException {
169 try {
170 com.liferay.portal.model.Country returnValue = CountryServiceUtil.getCountryByName(name);
171
172 return com.liferay.portal.model.CountrySoap.toSoapModel(returnValue);
173 }
174 catch (Exception e) {
175 _log.error(e, e);
176
177 throw new RemoteException(e.getMessage());
178 }
179 }
180
181 private static Log _log = LogFactoryUtil.getLog(CountryServiceSoap.class);
182 }