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