Author: ashish
Date: Thu May 28 09:53:06 2009
New Revision: 779514
URL:
http://svn.apache.org/viewvc?rev=779514&view=revLog:
Added new service connectToGoogleCheckoutServer.
For more details please see jira issue: OFBIZ-2538 (Create a service to establish a connection with Google Checkout server)
Thanks Anurag for your contribution.
Modified:
ofbiz/trunk/specialpurpose/googlecheckout/script/org/ofbiz/googleCheckout/PrepareXMLTemplate.xml
ofbiz/trunk/specialpurpose/googlecheckout/servicedef/services.xml
Modified: ofbiz/trunk/specialpurpose/googlecheckout/script/org/ofbiz/googleCheckout/PrepareXMLTemplate.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/googlecheckout/script/org/ofbiz/googleCheckout/PrepareXMLTemplate.xml?rev=779514&r1=779513&r2=779514&view=diff==============================================================================
--- ofbiz/trunk/specialpurpose/googlecheckout/script/org/ofbiz/googleCheckout/PrepareXMLTemplate.xml (original)
+++ ofbiz/trunk/specialpurpose/googlecheckout/script/org/ofbiz/googleCheckout/PrepareXMLTemplate.xml Thu May 28 09:53:06 2009
@@ -24,7 +24,9 @@
<simple-method method-name="transmitRequest" short-description="">
<!-- Connect, there may be ofbiz HttpClient.java that may handle this well -->
- <call-simple-method method-name="connectWithRedirectHack"/>
+ <call-service service-name="connectToGoogleCheckoutServer">
+ <result-to-field result-name="conn"/>
+ </call-service>
<log level="info" message="step 1 done"/>
<!-- Get the Content -->
<call-simple-method method-name="createXMLOutput"/>
@@ -42,7 +44,7 @@
<field-to-result field="redirect"/>
</simple-method>
<!-- Step 1 -->
- <simple-method method-name="connectWithRedirectHack" short-description="">
+ <simple-method method-name="connectToGoogleCheckoutServer" short-description="create connection to Google Checkout server">
<call-simple-method method-name="createRequestUrl"/>
<call-simple-method method-name="getHttpAuth"/>
<call-bsh><![CDATA[
@@ -60,6 +62,7 @@
conn.connect();
return org.ofbiz.base.util.UtilMisc.toMap("conn", conn);
]]></call-bsh>
+ <field-to-result field="conn"/>
</simple-method>
<simple-method method-name="createRequestUrl" short-description="">
<!-- Setup Url spec -->
Modified: ofbiz/trunk/specialpurpose/googlecheckout/servicedef/services.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/googlecheckout/servicedef/services.xml?rev=779514&r1=779513&r2=779514&view=diff==============================================================================
--- ofbiz/trunk/specialpurpose/googlecheckout/servicedef/services.xml (original)
+++ ofbiz/trunk/specialpurpose/googlecheckout/servicedef/services.xml Thu May 28 09:53:06 2009
@@ -37,4 +37,8 @@
<attribute name="shoppingCart" type="org.ofbiz.order.shoppingcart.ShoppingCart" mode="IN" optional="false"/>
<attribute name="redirect" mode="OUT" type="String" optional="false"/>
</service>
+ <service name="connectToGoogleCheckoutServer" engine="simple" invoke="connectToGoogleCheckoutServer"
+ location="component://googlecheckout/script/org/ofbiz/googleCheckout/PrepareXMLTemplate.xml">
+ <attribute name="conn" mode="OUT" type="java.net.HttpURLConnection" optional="false"/>
+ </service>
</services>