001
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.AddressServiceUtil;
020
021 import java.rmi.RemoteException;
022
023
063 public class AddressServiceSoap {
064
069 public static com.liferay.portal.model.AddressSoap addAddress(
070 java.lang.String className, long classPK, java.lang.String street1,
071 java.lang.String street2, java.lang.String street3,
072 java.lang.String city, java.lang.String zip, long regionId,
073 long countryId, int typeId, boolean mailing, boolean primary)
074 throws RemoteException {
075 try {
076 com.liferay.portal.model.Address returnValue = AddressServiceUtil.addAddress(className,
077 classPK, street1, street2, street3, city, zip, regionId,
078 countryId, typeId, mailing, primary);
079
080 return com.liferay.portal.model.AddressSoap.toSoapModel(returnValue);
081 }
082 catch (Exception e) {
083 _log.error(e, e);
084
085 throw new RemoteException(e.getMessage());
086 }
087 }
088
089 public static com.liferay.portal.model.AddressSoap addAddress(
090 java.lang.String className, long classPK, java.lang.String street1,
091 java.lang.String street2, java.lang.String street3,
092 java.lang.String city, java.lang.String zip, long regionId,
093 long countryId, int typeId, boolean mailing, boolean primary,
094 com.liferay.portal.service.ServiceContext serviceContext)
095 throws RemoteException {
096 try {
097 com.liferay.portal.model.Address returnValue = AddressServiceUtil.addAddress(className,
098 classPK, street1, street2, street3, city, zip, regionId,
099 countryId, typeId, mailing, primary, serviceContext);
100
101 return com.liferay.portal.model.AddressSoap.toSoapModel(returnValue);
102 }
103 catch (Exception e) {
104 _log.error(e, e);
105
106 throw new RemoteException(e.getMessage());
107 }
108 }
109
110 public static void deleteAddress(long addressId) throws RemoteException {
111 try {
112 AddressServiceUtil.deleteAddress(addressId);
113 }
114 catch (Exception e) {
115 _log.error(e, e);
116
117 throw new RemoteException(e.getMessage());
118 }
119 }
120
121 public static com.liferay.portal.model.AddressSoap getAddress(
122 long addressId) throws RemoteException {
123 try {
124 com.liferay.portal.model.Address returnValue = AddressServiceUtil.getAddress(addressId);
125
126 return com.liferay.portal.model.AddressSoap.toSoapModel(returnValue);
127 }
128 catch (Exception e) {
129 _log.error(e, e);
130
131 throw new RemoteException(e.getMessage());
132 }
133 }
134
135 public static com.liferay.portal.model.AddressSoap[] getAddresses(
136 java.lang.String className, long classPK) throws RemoteException {
137 try {
138 java.util.List<com.liferay.portal.model.Address> returnValue = AddressServiceUtil.getAddresses(className,
139 classPK);
140
141 return com.liferay.portal.model.AddressSoap.toSoapModels(returnValue);
142 }
143 catch (Exception e) {
144 _log.error(e, e);
145
146 throw new RemoteException(e.getMessage());
147 }
148 }
149
150 public static com.liferay.portal.model.AddressSoap updateAddress(
151 long addressId, java.lang.String street1, java.lang.String street2,
152 java.lang.String street3, java.lang.String city, java.lang.String zip,
153 long regionId, long countryId, int typeId, boolean mailing,
154 boolean primary) throws RemoteException {
155 try {
156 com.liferay.portal.model.Address returnValue = AddressServiceUtil.updateAddress(addressId,
157 street1, street2, street3, city, zip, regionId, countryId,
158 typeId, mailing, primary);
159
160 return com.liferay.portal.model.AddressSoap.toSoapModel(returnValue);
161 }
162 catch (Exception e) {
163 _log.error(e, e);
164
165 throw new RemoteException(e.getMessage());
166 }
167 }
168
169 private static Log _log = LogFactoryUtil.getLog(AddressServiceSoap.class);
170 }