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.portlet.shopping.service.http;
016    
017    import com.liferay.portal.kernel.log.Log;
018    import com.liferay.portal.kernel.log.LogFactoryUtil;
019    
020    import com.liferay.portlet.shopping.service.ShoppingOrderServiceUtil;
021    
022    import java.rmi.RemoteException;
023    
024    /**
025     * Provides the SOAP utility for the
026     * {@link com.liferay.portlet.shopping.service.ShoppingOrderServiceUtil} service utility. The
027     * static methods of this class calls the same methods of the service utility.
028     * However, the signatures are different because it is difficult for SOAP to
029     * support certain types.
030     *
031     * <p>
032     * ServiceBuilder follows certain rules in translating the methods. For example,
033     * if the method in the service utility returns a {@link java.util.List}, that
034     * is translated to an array of {@link com.liferay.portlet.shopping.model.ShoppingOrderSoap}.
035     * If the method in the service utility returns a
036     * {@link com.liferay.portlet.shopping.model.ShoppingOrder}, that is translated to a
037     * {@link com.liferay.portlet.shopping.model.ShoppingOrderSoap}. Methods that SOAP cannot
038     * safely wire are skipped.
039     * </p>
040     *
041     * <p>
042     * The benefits of using the SOAP utility is that it is cross platform
043     * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and
044     * even Perl, to call the generated services. One drawback of SOAP is that it is
045     * slow because it needs to serialize all calls into a text format (XML).
046     * </p>
047     *
048     * <p>
049     * You can see a list of services at http://localhost:8080/api/axis. Set the
050     * property <b>axis.servlet.hosts.allowed</b> in portal.properties to configure
051     * security.
052     * </p>
053     *
054     * <p>
055     * The SOAP utility is only generated for remote services.
056     * </p>
057     *
058     * @author Brian Wing Shun Chan
059     * @see ShoppingOrderServiceHttp
060     * @see com.liferay.portlet.shopping.model.ShoppingOrderSoap
061     * @see com.liferay.portlet.shopping.service.ShoppingOrderServiceUtil
062     * @generated
063     */
064    public class ShoppingOrderServiceSoap {
065            public static void completeOrder(long groupId, java.lang.String number,
066                    java.lang.String ppTxnId, java.lang.String ppPaymentStatus,
067                    double ppPaymentGross, java.lang.String ppReceiverEmail,
068                    java.lang.String ppPayerEmail,
069                    com.liferay.portal.service.ServiceContext serviceContext)
070                    throws RemoteException {
071                    try {
072                            ShoppingOrderServiceUtil.completeOrder(groupId, number, ppTxnId,
073                                    ppPaymentStatus, ppPaymentGross, ppReceiverEmail, ppPayerEmail,
074                                    serviceContext);
075                    }
076                    catch (Exception e) {
077                            _log.error(e, e);
078    
079                            throw new RemoteException(e.getMessage());
080                    }
081            }
082    
083            public static void deleteOrder(long groupId, long orderId)
084                    throws RemoteException {
085                    try {
086                            ShoppingOrderServiceUtil.deleteOrder(groupId, orderId);
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.portlet.shopping.model.ShoppingOrderSoap getOrder(
096                    long groupId, long orderId) throws RemoteException {
097                    try {
098                            com.liferay.portlet.shopping.model.ShoppingOrder returnValue = ShoppingOrderServiceUtil.getOrder(groupId,
099                                            orderId);
100    
101                            return com.liferay.portlet.shopping.model.ShoppingOrderSoap.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 sendEmail(long groupId, long orderId,
111                    java.lang.String emailType,
112                    com.liferay.portal.service.ServiceContext serviceContext)
113                    throws RemoteException {
114                    try {
115                            ShoppingOrderServiceUtil.sendEmail(groupId, orderId, emailType,
116                                    serviceContext);
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.portlet.shopping.model.ShoppingOrderSoap updateOrder(
126                    long groupId, long orderId, java.lang.String ppTxnId,
127                    java.lang.String ppPaymentStatus, double ppPaymentGross,
128                    java.lang.String ppReceiverEmail, java.lang.String ppPayerEmail)
129                    throws RemoteException {
130                    try {
131                            com.liferay.portlet.shopping.model.ShoppingOrder returnValue = ShoppingOrderServiceUtil.updateOrder(groupId,
132                                            orderId, ppTxnId, ppPaymentStatus, ppPaymentGross,
133                                            ppReceiverEmail, ppPayerEmail);
134    
135                            return com.liferay.portlet.shopping.model.ShoppingOrderSoap.toSoapModel(returnValue);
136                    }
137                    catch (Exception e) {
138                            _log.error(e, e);
139    
140                            throw new RemoteException(e.getMessage());
141                    }
142            }
143    
144            public static com.liferay.portlet.shopping.model.ShoppingOrderSoap updateOrder(
145                    long groupId, long orderId, java.lang.String billingFirstName,
146                    java.lang.String billingLastName, java.lang.String billingEmailAddress,
147                    java.lang.String billingCompany, java.lang.String billingStreet,
148                    java.lang.String billingCity, java.lang.String billingState,
149                    java.lang.String billingZip, java.lang.String billingCountry,
150                    java.lang.String billingPhone, boolean shipToBilling,
151                    java.lang.String shippingFirstName, java.lang.String shippingLastName,
152                    java.lang.String shippingEmailAddress,
153                    java.lang.String shippingCompany, java.lang.String shippingStreet,
154                    java.lang.String shippingCity, java.lang.String shippingState,
155                    java.lang.String shippingZip, java.lang.String shippingCountry,
156                    java.lang.String shippingPhone, java.lang.String ccName,
157                    java.lang.String ccType, java.lang.String ccNumber, int ccExpMonth,
158                    int ccExpYear, java.lang.String ccVerNumber, java.lang.String comments)
159                    throws RemoteException {
160                    try {
161                            com.liferay.portlet.shopping.model.ShoppingOrder returnValue = ShoppingOrderServiceUtil.updateOrder(groupId,
162                                            orderId, billingFirstName, billingLastName,
163                                            billingEmailAddress, billingCompany, billingStreet,
164                                            billingCity, billingState, billingZip, billingCountry,
165                                            billingPhone, shipToBilling, shippingFirstName,
166                                            shippingLastName, shippingEmailAddress, shippingCompany,
167                                            shippingStreet, shippingCity, shippingState, shippingZip,
168                                            shippingCountry, shippingPhone, ccName, ccType, ccNumber,
169                                            ccExpMonth, ccExpYear, ccVerNumber, comments);
170    
171                            return com.liferay.portlet.shopping.model.ShoppingOrderSoap.toSoapModel(returnValue);
172                    }
173                    catch (Exception e) {
174                            _log.error(e, e);
175    
176                            throw new RemoteException(e.getMessage());
177                    }
178            }
179    
180            private static Log _log = LogFactoryUtil.getLog(ShoppingOrderServiceSoap.class);
181    }