| AddressServiceSoap.java |
1 /**
2 * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3 *
4 * This library is free software; you can redistribute it and/or modify it under
5 * the terms of the GNU Lesser General Public License as published by the Free
6 * Software Foundation; either version 2.1 of the License, or (at your option)
7 * any later version.
8 *
9 * This library is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12 * details.
13 */
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.AddressServiceUtil;
20
21 import java.rmi.RemoteException;
22
23 /**
24 * <a href="AddressServiceSoap.java.html"><b><i>View Source</i></b></a>
25 *
26 * <p>
27 * ServiceBuilder generated this class. Modifications in this class will be
28 * overwritten the next time is generated.
29 * </p>
30 *
31 * <p>
32 * This class provides a SOAP utility for the
33 * {@link com.liferay.portal.service.AddressServiceUtil} service utility. The
34 * static methods of this class calls the same methods of the service utility.
35 * However, the signatures are different because it is difficult for SOAP to
36 * support certain types.
37 * </p>
38 *
39 * <p>
40 * ServiceBuilder follows certain rules in translating the methods. For example,
41 * if the method in the service utility returns a {@link java.util.List}, that
42 * is translated to an array of {@link com.liferay.portal.model.AddressSoap}.
43 * If the method in the service utility returns a
44 * {@link com.liferay.portal.model.Address}, that is translated to a
45 * {@link com.liferay.portal.model.AddressSoap}. Methods that SOAP cannot
46 * safely wire are skipped.
47 * </p>
48 *
49 * <p>
50 * The benefits of using the SOAP utility is that it is cross platform
51 * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and
52 * even Perl, to call the generated services. One drawback of SOAP is that it is
53 * slow because it needs to serialize all calls into a text format (XML).
54 * </p>
55 *
56 * <p>
57 * You can see a list of services at
58 * http://localhost:8080/tunnel-web/secure/axis. Set the property
59 * <b>tunnel.servlet.hosts.allowed</b> in portal.properties to configure
60 * security.
61 * </p>
62 *
63 * <p>
64 * The SOAP utility is only generated for remote services.
65 * </p>
66 *
67 * @author Brian Wing Shun Chan
68 * @see AddressServiceHttp
69 * @see com.liferay.portal.model.AddressSoap
70 * @see com.liferay.portal.service.AddressServiceUtil
71 * @generated
72 */
73 public class AddressServiceSoap {
74 public static com.liferay.portal.model.AddressSoap addAddress(
75 java.lang.String className, long classPK, java.lang.String street1,
76 java.lang.String street2, java.lang.String street3,
77 java.lang.String city, java.lang.String zip, long regionId,
78 long countryId, int typeId, boolean mailing, boolean primary)
79 throws RemoteException {
80 try {
81 com.liferay.portal.model.Address returnValue = AddressServiceUtil.addAddress(className,
82 classPK, street1, street2, street3, city, zip, regionId,
83 countryId, typeId, mailing, primary);
84
85 return com.liferay.portal.model.AddressSoap.toSoapModel(returnValue);
86 }
87 catch (Exception e) {
88 _log.error(e, e);
89
90 throw new RemoteException(e.getMessage());
91 }
92 }
93
94 public static void deleteAddress(long addressId) throws RemoteException {
95 try {
96 AddressServiceUtil.deleteAddress(addressId);
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.AddressSoap getAddress(
106 long addressId) throws RemoteException {
107 try {
108 com.liferay.portal.model.Address returnValue = AddressServiceUtil.getAddress(addressId);
109
110 return com.liferay.portal.model.AddressSoap.toSoapModel(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.AddressSoap[] getAddresses(
120 java.lang.String className, long classPK) throws RemoteException {
121 try {
122 java.util.List<com.liferay.portal.model.Address> returnValue = AddressServiceUtil.getAddresses(className,
123 classPK);
124
125 return com.liferay.portal.model.AddressSoap.toSoapModels(returnValue);
126 }
127 catch (Exception e) {
128 _log.error(e, e);
129
130 throw new RemoteException(e.getMessage());
131 }
132 }
133
134 public static com.liferay.portal.model.AddressSoap updateAddress(
135 long addressId, java.lang.String street1, java.lang.String street2,
136 java.lang.String street3, java.lang.String city, java.lang.String zip,
137 long regionId, long countryId, int typeId, boolean mailing,
138 boolean primary) throws RemoteException {
139 try {
140 com.liferay.portal.model.Address returnValue = AddressServiceUtil.updateAddress(addressId,
141 street1, street2, street3, city, zip, regionId, countryId,
142 typeId, mailing, primary);
143
144 return com.liferay.portal.model.AddressSoap.toSoapModel(returnValue);
145 }
146 catch (Exception e) {
147 _log.error(e, e);
148
149 throw new RemoteException(e.getMessage());
150 }
151 }
152
153 private static Log _log = LogFactoryUtil.getLog(AddressServiceSoap.class);
154 }