Vous êtes sur la page 1sur 65

SOA For Virtuemart Component Mickael Cabanas http://www.virtuemart-datamanager.

com

User Manual 30/11/2010

TITRE :

User Manual Interfaces Documentation SOA For Virtuemart 1.5.3

REF

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 f the License, or (at your option) any later version. GPL License

-1-

SOA For Virtuemart Component Mickael Cabanas http://www.virtuemart-datamanager.com

User Manual 30/11/2010

CREATION / UPDATE
Version 0.7 0.8 0.9 RC1.0 Date Origin TAGS Creation Update : Add Interfaces documentations Update : Add DeleteUser/AddUser /AddCategory / DeleteCategory Interfaces documentations Update : Add DeleteProduct/ AddProduct /UpdateProduct / SQLServices Interfaces documentations Update : Add Product Fields Update : Add SendMail Update : New Back Office config Update : Add CreateOrder / GetUserFromEmailOrUsername - Add GetAllCurrency - Add GetAllCountryCode - Add GettAllCouponCode - Add AddCouponCode - Add DeleteCouponCode - Add GetAllShippingRate - Add GetAllShippingCarrier - Add AddShippingRate - Add AddShippingCarrier - Add DeleteShippingCarrier - Add DeleteShippingRate - Add GetAllPaymentMethod - Add AddPaymentMethod - Add UpdatePaymentMethod - Add DeletePaymentMethod - Add GetAuthGroup - Add AddAuthGroup - Add DeleteAuthGroup - Add getAllStates - Add addStates - Add deleteStates - Add GetAllTax - Add AddTax - Add UpdateTax 2

25/03/2010 MCA 13/05/2010 MCA 16/05/2010 MCA 17/05/2010 MCA

RC1.0.1 RC1.0.2 RC1.0.3 RC1.0.4 1.5

21/05/2010 22/05/2010 26/05/2010 30/05/2010

MCA MCA MCA MCA

06/06/2010 MCA

COM_VM_SOA : User Manual Created 25/03/2010

SOA For Virtuemart Component Mickael Cabanas http://www.virtuemart-datamanager.com - Add DeleteTax - Add GetShopperGroup - Add AddShopperGroup - Add UpdateShopperGroup - Add DeleteShopperGroup - Add GetAllProducts - Add GetAvailableImages (products) - Add GetAvailableImages (categories) - Add UpdateCategory - Add GetOrderFromDate - add product_sales to product object - Correction Limite GetAllProduct - Change SQL Return - Correct Getusers(add username) - Change name gettAllCouponCode to getAllCouponCode - Add GetAllCreditCard - Add AddCreditCard - Add UpdateCreditCard - Add DeleteCreditCard - Add UpdateUser - Add AddOrderStatusCode - Add UpdateOrderStatusCode - Add DeleteOrderStatusCode - Modify UdpatusOrder (massUpdate) - Modify getOrderStatus - Add GetAllVendor - Add AddVendor - Add UpdateVendor - Add DeleteVendor - Add GetAllVendorCategory - Add AddVendorCategory - Add UpdateVendorCategory - Add DeleteVendorCategory - Add GetAllManufacturer - Add AddManufacturer - Add UpdateManufacturer - Add DeleteManufacturer - Add GetAllManufacturerCat

User Manual 30/11/2010

1.5.1

13/06/2010 MCA

COM_VM_SOA : User Manual Created 25/03/2010

SOA For Virtuemart Component Mickael Cabanas http://www.virtuemart-datamanager.com - Add AddManufacturerCat - Add UpdateManufacturerCat - Add DeleteManufacturerCat - Add GetAvailableVendorImages - CreateOrder (rename fields, add vendor_id) - User (Add bank account information, shopper_group_id) - Add GetVersions - Add VM_Upload - Add UpdateShippingCarrier - Add UpdateShippingRate - Update GetUserFromEmailOrUsername - Update GetUsers (add limite_start, limite_end) - Update Product (add manufacturer_id, vendor_id)

User Manual 30/11/2010

1.5.2

13/07/2010 MCA

1.5.3

30/11/2010 MCA

- Fix wsdl HTTP header 'Content-type: text/xml; charset=UTF-8', and length - add customer_number, groupe_id (gid) user_info_id,address_type,address_type_name,compa ny,middle_name, phone_2,extra_field_1,extra_field_2,extra_field_3,ext ra_field_4,extrtra_field_5 in addUser, updateuser - add shopper_group_id in product wsdl (VM_ProductService.php) for addProduct updateProduct - Fix bug when base url is empty - fix bug when product price is 0 - add <product_publish> <with_childs> to GetProductsFromCategory - fix bug in addCategory when image is not null and is not URL - fix bug in addProduct when image is not null and is not URL - add publishProduct in category, products

COM_VM_SOA : User Manual Created 25/03/2010

SOA For Virtuemart Component Mickael Cabanas http://www.virtuemart-datamanager.com

User Manual 30/11/2010

SUMMARY
1. 2. 3. 4. Introduction ................................................................................................................... 1 Requierement ................................................................................................................ 1 Architecture ................................................................................................................... 2 Installation ..................................................................................................................... 2 4.1. Download component .............................................................................................................. 2 4.2. Install component on Joomla ................................................................................................... 3 5. Component settings ...................................................................................................... 3 5.1. Settings :................................................................................................................................... 3 6. WebServices Access .................................................................................................... 7 6.1. WSDL Access : ........................................................................................................................ 7 6.2. WSDL Test : ............................................................................................................................ 7 6.3. WebServices Test : .................................................................................................................. 8 6.4. SOAP fault Exeption : ........................................................................................................... 10 6.5. Sample Client Code : ............................................................................................................. 10 7. WebServices Interfaces documentation ................................................................... 13 7.1. Categories Service.................................................................................................................. 13 7.2. Products Service..................................................................................................................... 17 7.3. Orders Service ........................................................................................................................ 32 7.4. Users Service ......................................................................................................................... 44 7.5. SQLQueries Service ............................................................................................................... 59 7.6. Upload Service ....................................................................................................................... 60

COM_VM_SOA : User Manual Created 25/03/2010

SOA For Virtuemart Component Mickael Cabanas http://www.virtuemart-datamanager.com

User Manual 30/11/2010

1.Introduction
This document is a User Manual for Joomla/Virtuemart component COM_VM_SOA (SOA For Virtuemart). This component provides WebServices to connect to Virtuemart functions. With com_vm_soa component you could connect to Virtuemart with many languages : C++, Java/J2ee, PHP, Flash/Flex, Javascript, VB, .Net ... You can manage your Categories, Products, Customers, Orders and execute SQL queries.

2.Requierement
Joomla 1.5.x Virtuemart 1.1.x PHP 5.2.x PHP SOAP module activated on apache

COM_VM_SOA : User Manual Created 25/03/2010

SOA For Virtuemart Component Mickael Cabanas http://www.virtuemart-datamanager.com

User Manual 30/11/2010

3.Architecture
The component expose Virtuemart functions as Webservices. Client requests have to be in SOAP format. The component call internals Virtuemart functions or database directly.

4.Installation
4.1. Download component Download SOA For Virtuemart Component on Source Forge: http://sourceforge.net/projects/soa-virtuemart/

COM_VM_SOA : User Manual Created 25/03/2010

SOA For Virtuemart Component Mickael Cabanas http://www.virtuemart-datamanager.com 4.2. Install component on Joomla Go to Joomla administration -> Extensions - > Install Select zip file from your desk (click upload & install)

User Manual 30/11/2010

5.Component settings
5.1. Settings : Go to COM_VM_SOA component (component -> WebServices Virtuemart) :

COM_VM_SOA : User Manual Created 25/03/2010

SOA For Virtuemart Component Mickael Cabanas http://www.virtuemart-datamanager.com

User Manual 30/11/2010

Then modify fields: Hostname : IP or Hostname to Joomla install (ex: www.mywebsite.com ) WARNING !! without HTTP:// Base : Joomla install directory. (ex : shop if your website is accessible at www.mywebsite.com/shop ) SOAP Version : 1.2 by default

COM_VM_SOA : User Manual Created 25/03/2010

SOA For Virtuemart Component Mickael Cabanas http://www.virtuemart-datamanager.com

User Manual 30/11/2010

You can manage Categories, Products, Orders, Customer, SQL Webservices by clicking on category.

To Enable/Disable Webservices : Tick "Enable Webservice" WSDLs filename and Services filename dont need to be modified. But if you want to change it, change the name on the server before. You can tick "Enable WSDL cache" to enable WSDL cache.

COM_VM_SOA : User Manual Created 25/03/2010

SOA For Virtuemart Component Mickael Cabanas http://www.virtuemart-datamanager.com

User Manual 30/11/2010

To enable authentication on each functions , tick authentication. Click on save button to save the config. Your Virtuemart is open to SOA Architecture !!!

COM_VM_SOA : User Manual Created 25/03/2010

SOA For Virtuemart Component Mickael Cabanas http://www.virtuemart-datamanager.com

User Manual 30/11/2010

6.WebServices Access

6.1. WSDL Access : VM_Categories


http://<host>/<base>/administrator/components/com_vm_soa/services/VM_CategoriesWSDL.php

VM_Orders
http://<host>/<base>/administrator/components/com_vm_soa/services/VM_OrderWSDL.php

VM_Products
http://<host>/<base>/administrator/components/com_vm_soa/services/VM_ProductWSDL.php

VM_Users
http://<host>/<base>/administrator/components/com_vm_soa/services/VM_UsersWSDL.php VM_SQLQueries http://<host>/<base>/administrator/components/com_vm_soa/services/VM_SQLQueriesWSDL.php
VM_ Upload (not a soap service) http://<host>/<base>/administrator/components/com_vm_soa/services/VM_Upload.php

6.2. WSDL Test : Go to Webservice URL If Webservice is deactivated youll have this message :

If Webservice is activated youll see WSDL file structure like below

COM_VM_SOA : User Manual Created 25/03/2010

SOA For Virtuemart Component Mickael Cabanas http://www.virtuemart-datamanager.com

User Manual 30/11/2010

6.3. WebServices Test : To test WebService you can use tools like SOAPui. Create new project with URL to WSDL. ex: For Orders Management WebService :
http://<host>/<base>/administrator/components/com_vm_soa/services/VM_OrderWSDL.php

You will see All Methods available in this service

If you want to try GetOrder method : click right -> new request and fill in XML SOAP request. You have to fill: LoginInfo (USER and Password) NOTE : Only super Administrator user can use WebServices Order_id : (Id of order) Limite Start and Limite End are used to limit received data (For example if you use GetAllOrders methods you may want only just 500 first and not All. After fill in XML SOAP request press Start button (green button : see picture below )

COM_VM_SOA : User Manual Created 25/03/2010

SOA For Virtuemart Component Mickael Cabanas http://www.virtuemart-datamanager.com

User Manual 30/11/2010

Then youll see soap result in right windows

COM_VM_SOA : User Manual Created 25/03/2010

SOA For Virtuemart Component Mickael Cabanas http://www.virtuemart-datamanager.com 6.4. SOAP fault Exeption :

User Manual 30/11/2010

If user doesnt exist or if is not super administrator, Webservice well generate JoomlaServerAuthFault Exeption:

If you have an exception like : SOAP-ERROR: Parsing WSDL: Couldn't load from . In many case hostname configuration is not good (check if there is no http:// before or base) It may be PHP soap version. (PHP 5.2 is required)

6.5. Sample Client Code : PHP


$client = new SoapClient("http://<host>/<base>/administrator/components/com_vm_soa /services/VM_CategoriesWSDL.php"); $catarray = array($client->GetChildsCategories($params));

($params is a structure with loginInfo, categoryId, Limits)

C++ You can use GSOAP

COM_VM_SOA : User Manual Created 25/03/2010

10

SOA For Virtuemart Component Mickael Cabanas http://www.virtuemart-datamanager.com Flash/Flex You can use Webservices Tools in Flex 3, Flash builder4

User Manual 30/11/2010

<mx:WebService id="webServiceVM_Product" wsdl="http://<host>/<base>/administrator/components/com_vm_soa /services/VM_CategoriesWSDL.php" > <!-- Declaration de la fonction a appeler dans le webservice --> <mx:operation name="GetProductsFromCategory" resultFormat="object" result="GetProductsFromCategoryResult(event)" fault="showErrorDialog(event)" /> <mx:operation name="GetChildsProduct" resultFormat="object" result="GetProductsFromCategoryResult(event)" fault="showErrorDialog(event)" /> </mx:WebService>

Javascript
<SCRIPT language='javascript' src='http://YOUR_URL/administrator/components/com_vm_soa/js/soapclient.js'> </SCRIPT> <SCRIPT language=javascript> var url = "http://YOUR_URL/administrator/components/com_vm_soa/services/VM_UsersWSDL.php"; function GetVersions() { var method = "GetVersions"; // Method name to Call var pl = new SOAPClientParameters(); pl.add("login", login); pl.add("password", password); SOAPClient.invoke(url, method, pl, true, GetVersions_callBack); } /* WebService CallBack*/ function GetVersions_callBack(r,soapResponse) { if(soapResponse.xml) // IE alert(soapResponse.xml); else // MOZ alert((new XMLSerializer()).serializeToString(soapResponse)); //print Object result alert("Author : "+r.Author+"\nSOA_For_Virtuemart_Version : "+r.SOA_For_Virtuemart_Version+ "\nVirtuemart_Version : "+r.Virtuemart_Version+"\nDatabase_Version : "+r.Database_Version); }

COM_VM_SOA : User Manual Created 25/03/2010

11

SOA For Virtuemart Component Mickael Cabanas http://www.virtuemart-datamanager.com


</script>

User Manual 30/11/2010

Java 5 You can use Java SOAP Client Library for Virtuemart here :
http://www.virtuemart-datamanager.com/index.php?option=com_content&view=article&id=64&Itemid=96 //import import import import import import import //code VM_WebServicesClient virtuemartServices = new VM_WebServicesClient(); //get service for categories management VMCategories_Service catService = virtuemartServices.getCategoriesService(); //input parameters GetAllCategoriesInput input = new GetAllCategoriesInput(); LoginInfo login= new LoginInfo(); login.setLogin(Global.LOGIN); login.setPassword(Global.PASSWORD); input.setLoginInfo(login); //call WebService CategorieArray catColl = catService.getVMCategoriesSOAP().getAllCategories(input); //print response for (Categorie cat : catColl.getCategorie()){ System.out.println("category : "+cat.getName()+" | id : "+cat.getId()); } net.virtuemart.soapclient.VM_WebServicesClient; net.virtuemart.vm_categories.Categorie; net.virtuemart.vm_categories.CategorieArray; net.virtuemart.vm_categories.GetAllCategoriesInput; net.virtuemart.vm_categories.LoginInfo; net.virtuemart.vm_categories.VMCategories_Service;

COM_VM_SOA : User Manual Created 25/03/2010

12

SOA For Virtuemart Component Mickael Cabanas http://www.virtuemart-datamanager.com

User Manual 30/11/2010

7.WebServices Interfaces documentation


7.1. Categories Service

VM_Categories Service
Access : http://<host>/<base>/administrator/components/com_vm_soa/services/VM_CategoriesWSDL.php

Functions : GetAllCategories

Input: LoginInfo

Output: Array of Categories

Comments: Return an array of

COM_VM_SOA : User Manual Created 25/03/2010

13

SOA For Virtuemart Component Mickael Cabanas http://www.virtuemart-datamanager.com LoginInfo: Login password Categorie : id name description parentcat image fullimage numberofproducts category_publish category_browsepage category_flypage products_per_row Output: Array of Categories Categorie : id name description parentcat image fullimage numberofproducts category_publish category_browsepage category_flypage products_per_row Output: result

User Manual 30/11/2010

all categories Virtuemart

in

Functions : GetChildsCategories

Input: LoginInfo categoryId categoryId

Comments: Return an array of all Childs categories in Virtuemart

Functions : AddCategory

Input: LoginInfo Category

Comments: Add Category in virtuemart with all

COM_VM_SOA : User Manual Created 25/03/2010

14

SOA For Virtuemart Component Mickael Cabanas http://www.virtuemart-datamanager.com Category: id name description parentcat image fullimage numberofproducts category_publish category_browsepage category_flypage products_per_row Functions : DeleteCategory Input: LoginInfo Category_id Output: result

User Manual 30/11/2010

informations

Functions : UpdateCategory

Input: Output: LoginInfo result Category Category: id name description parentcat image fullimage numberofproducts category_publish category_browsepage category_flypage products_per_row Input: LoginInfo Output: Array image_name image_url

Comments: Delete a category in virtuemart from id Comments: Update a category

Functions : GetAvailableImages

Comments: Get All images available in Components /com_virtuemart/ shop_image/ category 15

COM_VM_SOA : User Manual Created 25/03/2010

SOA For Virtuemart Component Mickael Cabanas http://www.virtuemart-datamanager.com

User Manual 30/11/2010

COM_VM_SOA : User Manual Created 25/03/2010

16

SOA For Virtuemart Component Mickael Cabanas http://www.virtuemart-datamanager.com 7.2. Products Service

User Manual 30/11/2010

COM_VM_SOA : User Manual Created 25/03/2010

17

SOA For Virtuemart Component Mickael Cabanas http://www.virtuemart-datamanager.com

User Manual 30/11/2010

VM_Products Service
Access : http://<host>/<base>/administrator/components/com_vm_soa/services/VM_ProductWSDL.php

Functions :

Input:

Output:

Comments

COM_VM_SOA : User Manual Created 25/03/2010

18

SOA For Virtuemart Component Mickael Cabanas http://www.virtuemart-datamanager.com GetProductFromId LoginInfo Product_id Product

User Manual 30/11/2010

Return a product details from an product ID

COM_VM_SOA : User Manual Created 25/03/2010

19

SOA For Virtuemart Component Mickael Cabanas http://www.virtuemart-datamanager.com Product_id Product: id name price discount discount_is_percent description bigdescription image fullimage quantity parent_produit_id has_childs childs_id atribute atribute_value product_sku product_publish product_weight product_weight_uom product_length product_width product_height product_lwh_uom product_unit product_packaging product_url custom_attribute product_available_dat e product_availability product_special child_options quantity_options product_discount_id product_tax_id child_option_ids product_order_levels manufacturer_id vendor_id shopper_group_id

User Manual 30/11/2010

COM_VM_SOA : User Manual Created 25/03/2010

20

SOA For Virtuemart Component Mickael Cabanas http://www.virtuemart-datamanager.com Functions : GetChildsProduct Input: LoginInfo Product_id Output: Array of Products

User Manual 30/11/2010

Comments: Return an array of all Childs

COM_VM_SOA : User Manual Created 25/03/2010

21

SOA For Virtuemart Component Mickael Cabanas http://www.virtuemart-datamanager.com Product_id Product: id name price discount discount_is_percent description bigdescription image fullimage quantity parent_produit_id has_childs childs_id atribute atribute_value product_sku product_publish product_weight product_weight_uom product_length product_width product_height product_lwh_uom product_unit product_packaging product_url custom_attribute product_available_dat e product_availability product_special child_options quantity_options product_discount_id product_tax_id child_option_ids product_order_levels manufacturer_id vendor_id shopper_group_id

User Manual 30/11/2010

products

COM_VM_SOA : User Manual Created 25/03/2010

22

SOA For Virtuemart Component Mickael Cabanas http://www.virtuemart-datamanager.com Functions : Input: GetProductsFromCategory LoginInfo category_id Output: Array of Products

User Manual 30/11/2010

Comments: Return an array of all

COM_VM_SOA : User Manual Created 25/03/2010

23

SOA For Virtuemart Component Mickael Cabanas http://www.virtuemart-datamanager.com category_id Product: id name price discount discount_is_percent description bigdescription image fullimage quantity parent_produit_id has_childs childs_id atribute atribute_value product_sku product_publish product_weight product_weight_uom product_length product_width product_height product_lwh_uom product_unit product_packaging product_url custom_attribute product_available_dat e product_availability product_special child_options quantity_options product_discount_id product_tax_id child_option_ids product_order_levels manufacturer_id vendor_id shopper_group_id

User Manual 30/11/2010

products category

in

COM_VM_SOA : User Manual Created 25/03/2010

24

SOA For Virtuemart Component Mickael Cabanas http://www.virtuemart-datamanager.com Functions : GetProductsFromOrderId Input: LoginInfo order_id Output: Array of Products

User Manual 30/11/2010

Comments: Return an array of all products in order

COM_VM_SOA : User Manual Created 25/03/2010

25

SOA For Virtuemart Component Mickael Cabanas http://www.virtuemart-datamanager.com category_id Product: id name price discount discount_is_percent description bigdescription image fullimage quantity parent_produit_id has_childs childs_id atribute atribute_value product_sku product_publish product_weight product_weight_uom product_length product_width product_height product_lwh_uom product_unit product_packaging product_url custom_attribute product_available_dat e product_availability product_special child_options quantity_options product_discount_id product_tax_id child_option_ids product_order_levels manufacturer_id vendor_id shopper_group_id

User Manual 30/11/2010

COM_VM_SOA : User Manual Created 25/03/2010

26

SOA For Virtuemart Component Mickael Cabanas http://www.virtuemart-datamanager.com Functions : UpdateProduct Input: LoginInfo Product Output: result

User Manual 30/11/2010

Comments: Update Product information

COM_VM_SOA : User Manual Created 25/03/2010

27

SOA For Virtuemart Component Mickael Cabanas http://www.virtuemart-datamanager.com Product: id name price discount discount_is_percent description bigdescription image fullimage quantity parent_produit_id has_childs childs_id atribute atribute_value product_sku product_publish product_weight product_weight_uom product_length product_width product_height product_lwh_uom product_unit product_packaging product_url custom_attribute product_available_dat e product_availability product_special child_options quantity_options product_discount_id product_tax_id child_option_ids product_order_levels manufacturer_id vendor_id COM_VM_SOA : User Manual shopper_group_id Created 25/03/2010 result

User Manual 30/11/2010

28

SOA For Virtuemart Component Mickael Cabanas http://www.virtuemart-datamanager.com Functions : AddProduct Input: LoginInfo Product Output: result

User Manual 30/11/2010

Comments: Add a product in Virtuemart

COM_VM_SOA : User Manual Created 25/03/2010

29

SOA For Virtuemart Component Mickael Cabanas http://www.virtuemart-datamanager.com Product: id name price discount discount_is_percent description bigdescription image fullimage quantity parent_produit_id has_childs childs_id atribute atribute_value product_sku product_publish product_weight product_weight_uom product_length product_width product_height product_lwh_uom product_unit product_packaging product_url custom_attribute product_available_dat e product_availability product_special child_options quantity_options product_discount_id product_tax_id child_option_ids product_order_levels manufacturer_id vendor_id COM_VM_SOA : User Manual shopper_group_id Created 25/03/2010 result

User Manual 30/11/2010

30

SOA For Virtuemart Component Mickael Cabanas http://www.virtuemart-datamanager.com Functions : DeleteProduct Input: LoginInfo Product_id Product_id Input: LoginInfo Input: LoginInfo Input: tax_rate_id vendor_id tax_state tax_country mdate tax_rate Input: tax_rate_id vendor_id tax_state tax_country mdate tax_rate Input: Array of id Input: product_publish with_childs limite_start limite_end Input: loginInfo Output: result result Output: result Output: result Output: result

User Manual 30/11/2010

Comments: Delete a product in Virtuemart Comments Comments Comments

Functions : GetAllCurrency Functions : GetAllTax Functions : AddTax

Functions : UpdateTax

Output: result

Comments

Functions : DeleteTax Functions : GetAllProducts

Output: result Output: result

Comments Comments

Functions : GetAvailableImages

Output: Array image_name image_url

Comments Get All images available in Components /com_virtuemart / shop_image/ product

COM_VM_SOA : User Manual Created 25/03/2010

31

SOA For Virtuemart Component Mickael Cabanas http://www.virtuemart-datamanager.com 7.3. Orders Service

User Manual 30/11/2010

COM_VM_SOA : User Manual Created 25/03/2010

32

SOA For Virtuemart Component Mickael Cabanas http://www.virtuemart-datamanager.com

User Manual 30/11/2010

VM_Orders Service
Access : http://<host>/<base>/administrator/components/com_vm_soa/services/VM_OrderWSDL.php

Functions : GetOrder

Input: LoginInfo Order_Id

Output: Order

Comments: Return order

COM_VM_SOA : User Manual Created 25/03/2010

33

SOA For Virtuemart Component Mickael Cabanas http://www.virtuemart-datamanager.com Order_id Order : id user_id vendor_id order_number user_info_id order_total order_subtotal order_tax_details order_shipping order_shipping_tax coupon_discount coupon_code order_discount order_currency order_status cdate mdate ship_method_id customer_note ip_address Output: Array of orders

User Manual 30/11/2010

information s from an orderId

Functions : GetAllOrders

Input: LoginInfo limits

Comments: Return an array of all

COM_VM_SOA : User Manual Created 25/03/2010

34

SOA For Virtuemart Component Mickael Cabanas http://www.virtuemart-datamanager.com Limits: limite_start limite_end Order : id user_id vendor_id order_number user_info_id order_total order_subtotal order_tax_details order_shipping order_shipping_tax coupon_discount coupon_code order_discount order_currency order_status cdate mdate ship_method_id customer_note ip_address Output: OrderStatus OrderStatus: order_status_id order_status_code order_status_name order_status_description list_order vendor_id Output: Array of orders

User Manual 30/11/2010

orders

Functions : getOrderStatus

Input: LoginInfo

Comments: Return all status

Functions : getOrdersFromStatus

Input: LoginInfo Limits Status

Comments: Return all orders with a status (P, C, X

COM_VM_SOA : User Manual Created 25/03/2010

35

SOA For Virtuemart Component Mickael Cabanas http://www.virtuemart-datamanager.com Order : id user_id vendor_id order_number user_info_id order_total order_subtotal order_tax_details order_shipping order_shipping_tax coupon_discount coupon_code order_discount order_currency order_status cdate mdate ship_method_id customer_note ip_address Output: String

User Manual 30/11/2010

Functions : UpdateOrderStatus

Functions : CreateOrder

Input: loginInfo statusInfo statusInfo: order_id status notify comment Input: loginInfo orderInput

Comments: Update status of an order and notify customer with comment Comments: Create an order

Output: result

COM_VM_SOA : User Manual Created 25/03/2010

36

SOA For Virtuemart Component Mickael Cabanas http://www.virtuemart-datamanager.com orderInput user_id shipping_method shipping_carrier_name shipping_rate_name shipping_price shipping_rate_id price_including_tax product_currency customer_note payment_method_id coupon_code vendor_id products (array) product_id description quantity Input: loginInfo Input: loginInfo coupon_id coupon_code percent_or_total (values : percent / total) coupon_type (values : gift / permanent ) coupon_value Input: loginInfo Array of id Input: LoginInfo Input: LoginInfo Input:

User Manual 30/11/2010

Functions : GettAllCouponCode Functions : AddCouponCode

Output: result Output: result

Comments: Comments:

Functions : DeleteCouponCode Functions : GetAllShippingRate Functions : GetAllShippingCarrier Functions :

Output: result Output: result Output: result Output:

Comments:

Comments: Comments: Comments:

COM_VM_SOA : User Manual Created 25/03/2010

37

SOA For Virtuemart Component Mickael Cabanas http://www.virtuemart-datamanager.com AddShippingRate AddShippingRate loginInfo Array of ShippingRate result ShippingRate: shipping_rate_name shipping_rate_carrier_id shipping_rate_country shipping_rate_zip_start shipping_rate_zip_end shipping_rate_weight_st art shipping_rate_weight_en d shipping_rate_value shipping_rate_package_ fee shipping_rate_currency_ id shipping_rate_vat_id shipping_rate_list_order Input: Output: loginInfo Array of ShippingRate ShippingRate: shipping_rate_name shipping_rate_carrier_id shipping_rate_country shipping_rate_zip_start shipping_rate_zip_end shipping_rate_weight_st art shipping_rate_weight_en d shipping_rate_value shipping_rate_package_ fee shipping_rate_currency_ id shipping_rate_vat_id shipping_rate_list_order Input: Output:

User Manual 30/11/2010

Functions : UpdateShippingRate

Comments:

Functions :

Comments: 38

COM_VM_SOA : User Manual Created 25/03/2010

SOA For Virtuemart Component Mickael Cabanas http://www.virtuemart-datamanager.com AddShippingCarrier loginInfo Array of ShippingCarrier ShippingCarrier shipping_carrier_id shipping_carrier_name shipping_carrier_list_ord er Input: loginInfo Array of ShippingCarrier Input: loginInfo Array of ShippingCarrier ShippingCarrier shipping_carrier_id shipping_carrier_name shipping_carrier_list_ord er loginInfo Array of id Input: loginInfo Array of id Input: LoginInfo Input: loginInfo PaymentMethod

User Manual 30/11/2010

result

Functions : AddShippingCarrier Functions : UpdateShippingCarrier

Output:

Comments:

Output:

Comments:

DeleteShippingRate Functions : DeleteShippingCarrier Functions : GetAllPaymentMethod Functions : AddPaymentMethod

result Output: result Output: PaymentMethod Output: result Comments:

Comments: Comments:

COM_VM_SOA : User Manual Created 25/03/2010

39

SOA For Virtuemart Component Mickael Cabanas http://www.virtuemart-datamanager.com PaymentMethod payment_method_id vendor_id payment_method_name payment_class shopper_group_id payment_method_disco unt payment_method_disco unt_is_percent payment_method_disco unt _max_amount payment_method_disco unt _min_amount list_order payment_method_code enable_processor is_creditcard payment_enabled accepted_creditcards payment_extrainfo Functions : Input: UpdatePaymentMethod loginInfo PaymentMethod

User Manual 30/11/2010

Output: result

Comments:

COM_VM_SOA : User Manual Created 25/03/2010

40

SOA For Virtuemart Component Mickael Cabanas http://www.virtuemart-datamanager.com PaymentMethod payment_method_id vendor_id payment_method_name payment_class shopper_group_id payment_method_disco unt payment_method_disco unt _is_percent payment_method_disco unt _max_amount payment_method_disco unt _min_amount list_order payment_method_code enable_processor is_creditcard payment_enabled accepted_creditcards payment_extrainfo Input: loginInfo Array of id Input: loginInfo order_status date_start (format YYYY-MM-DD) date_end (format YYYY-MM-DD) Input: loginInfo

User Manual 30/11/2010

Functions : DeletePaymentMethod Functions : GetOrderFromDate

Output: result Output: result

Comments:

Comments:

Functions : GetAllCreditCard

Functions :

Input:

Output: Array of CreditCard CreditCard: creditcard_id vendor_id creditcard_name creditcard_code Output:

Comments:

Comments: 41

COM_VM_SOA : User Manual Created 25/03/2010

SOA For Virtuemart Component Mickael Cabanas http://www.virtuemart-datamanager.com AddCreditCard loginInfo CreditCard CreditCard: creditcard_id vendor_id creditcard_name creditcard_code Input: loginInfo CreditCard CreditCard: creditcard_id vendor_id creditcard_name creditcard_code Input: loginInfo id Input: loginInfo OrderStatus OrderStatus: order_status_id order_status_code order_status_name order_status_description list_order vendor_id Input: loginInfo OrderStatus result

User Manual 30/11/2010

Functions : UpdateCreditCard

Output: result

Comments:

Functions : DeleteCreditCard Functions : AddOrderStatusCode

Output: result Output: result

Comments:

Comments:

Functions : UpdateOrderStatusCo de

Output: result

Comments:

COM_VM_SOA : User Manual Created 25/03/2010

42

SOA For Virtuemart Component Mickael Cabanas http://www.virtuemart-datamanager.com OrderStatus: order_status_id order_status_code order_status_name order_status_description list_order vendor_id

User Manual 30/11/2010

Functions : DeleteOrderStatusCod e

Input: loginInfo id

Output:

Comments:

COM_VM_SOA : User Manual Created 25/03/2010

43

SOA For Virtuemart Component Mickael Cabanas http://www.virtuemart-datamanager.com 7.4. Users Service

User Manual 30/11/2010

COM_VM_SOA : User Manual Created 25/03/2010

44

SOA For Virtuemart Component Mickael Cabanas http://www.virtuemart-datamanager.com

User Manual 30/11/2010

VM_Users Service
Access : http://<host>/<base>/administrator/components/com_vm_soa/services/VM_UsersWSDL.php

Functions : Authentification

Functions : GetUsers

Input: LoginInfo LoginInfo: Login password Input: LoginInfo

Output: result String result

Comments: Authenticate a user

Output: Array of Users

Comments: Return an array of

COM_VM_SOA : User Manual Created 25/03/2010

45

SOA For Virtuemart Component Mickael Cabanas http://www.virtuemart-datamanager.com limite_start Users : limite_end id (if empty, default 0- login 50) password email firstname lastname description address title city zipcode phone fax mobile cdate mdate perms bank_account_nr bank_name bank_sort_code bank_iban bank_account_holder bank_account_type shopper_group_id (not implemented) customer_number groupe_id (gid) user_info_id address_type address_type_name company middle_name phone_2 extra_field_1 extra_field_2 extra_field_3 extra_field_4 extrtra_field_5 COM_VM_SOA : User Manual Created 25/03/2010

User Manual 30/11/2010

all Users informations

46

SOA For Virtuemart Component Mickael Cabanas http://www.virtuemart-datamanager.com Functions : AddUser Input: LoginInfo User Output: result

User Manual 30/11/2010

Comments: Create a (Customer)

user in

COM_VM_SOA : User Manual Created 25/03/2010

47

SOA For Virtuemart Component Mickael Cabanas http://www.virtuemart-datamanager.com Users : id login password email firstname lastname description address title city zipcode phone fax mobile cdate mdate perms bank_account_nr bank_name bank_sort_code bank_iban bank_account_holder bank_account_type shopper_group_id (not implemented) customer_number groupe_id (gid) user_info_id address_type address_type_name company middle_name phone_2 extra_field_1 extra_field_2 extra_field_3 extra_field_4 extrtra_field_5 COM_VM_SOA : User Manual Created 25/03/2010 String result

User Manual 30/11/2010

Joomla and Virtuemart with all details

48

SOA For Virtuemart Component Mickael Cabanas http://www.virtuemart-datamanager.com Functions : DeleteUser Input: LoginInfo User_id User_id Output: result String result

User Manual 30/11/2010

Comments: Delete a user from User_id

Functions : sendMail

Input: LoginInfo EmailParams EmailParams: from_mail from_name recipient subject body altbody Input: LoginInfo SearchParams

Output: result

Comments: Send email

Functions : GetUserFromEmailOrUsernam e

Output: User

Comments: Search user

COM_VM_SOA : User Manual Created 25/03/2010

49

SOA For Virtuemart Component Mickael Cabanas http://www.virtuemart-datamanager.com SearchParams Email Username Searchtype (VALUE : user_id, email , username) Users : id login password email firstname lastname description address title city zipcode phone fax mobile cdate mdate perms bank_account_nr bank_name bank_sort_code bank_iban bank_account_holder bank_account_type shopper_group_id (not implemented) customer_number groupe_id (gid) user_info_id address_type address_type_name company middle_name phone_2 extra_field_1 extra_field_2 extra_field_3 extra_field_4 extrtra_field_5

User Manual 30/11/2010

COM_VM_SOA : User Manual Created 25/03/2010

50

SOA For Virtuemart Component Mickael Cabanas http://www.virtuemart-datamanager.com Functions : getAllCountryCode Functions : getAuthGroup Input: LoginInfo Input: LoginInfo Output: result Output: group_id group_name group_level Output:

User Manual 30/11/2010

Comments:

Comments:

Functions : AddAuthGroup

Functions : deleteAuthGroup Functions : getAllStates Functions : addStates

Input: loginInfo group_id group_name group_level Input: loginInfo group_id Input: loginInfo country_id Input: loginInfo country_id Array of States State: state_id country_id state_name state_3_code state_2_code Input: loginInfo Array of id Input:

Comments:

Output: result Output: Array of State Output: result

Comments:

Comments:

Comments:

Functions : deleteStates Functions :

Output: Array ShopperGroup Output:

Comments: of Comments:

COM_VM_SOA : User Manual Created 25/03/2010

51

SOA For Virtuemart Component Mickael Cabanas http://www.virtuemart-datamanager.com getShopperGroup loginInfo ShopperGroup: shopper_group_id vendor_id shopper_group_nam e shopper_group_desc shopper_group_disco un show_price_including _tax default Output: result

User Manual 30/11/2010

Functions : addShopperGroup

Functions : updateShopperGroup

Input: loginInfo Array of ShopperGroup ShopperGroup: shopper_group_id vendor_id shopper_group_nam e shopper_group_desc shopper_group_disco un show_price_including _tax default Input: Output: loginInfo result Array of ShopperGroup ShopperGroup: shopper_group_id vendor_id shopper_group_nam e shopper_group_desc shopper_group_disco un show_price_including _tax default

Comments:

Comments:

COM_VM_SOA : User Manual Created 25/03/2010

52

SOA For Virtuemart Component Mickael Cabanas http://www.virtuemart-datamanager.com Functions : deleteShopperGroup Functions : updateUser Input: loginInfo Array of id Input: loginInfo User Output:

User Manual 30/11/2010

Comments:

Output:

Comments:

COM_VM_SOA : User Manual Created 25/03/2010

53

SOA For Virtuemart Component Mickael Cabanas http://www.virtuemart-datamanager.com Users : id login password email firstname lastname description address title city zipcode phone fax mobile cdate mdate perms bank_account_nr bank_name bank_sort_code bank_iban bank_account_holder bank_account_type shopper_group_id (not implemented) customer_number groupe_id (gid) user_info_id address_type address_type_name company middle_name phone_2 extra_field_1 extra_field_2 extra_field_3 extra_field_4 extrtra_field_5 COM_VM_SOA : User Manual Created 25/03/2010

User Manual 30/11/2010

54

SOA For Virtuemart Component Mickael Cabanas http://www.virtuemart-datamanager.com Functions : getAllVendor Input: loginInfo Output: Array of Vendor

User Manual 30/11/2010

Comments:

COM_VM_SOA : User Manual Created 25/03/2010

55

SOA For Virtuemart Component Mickael Cabanas http://www.virtuemart-datamanager.com Vendor: vendor_id vendor_name contact_last_name contact_first_name contact_middle_nam e contact_title contact_phone_1 contact_phone_2 contact_fax contact_email vendor_phone vendor_address_1 vendor_address_2 vendor_city vendor_state vendor_country vendor_zip vendor_store_name vendor_store_desc vendor_category_id vendor_thumb_image vendor_full_image vendor_currency cdate mdate vendor_image_path vendor_terms_of_ser vice vendor_url vendor_min_pov vendor_freeshipping vendor_currency_dis play_style vendor_accepted_cur rencies vendor_address_for mat vendor_date_format COM_VM_SOA : User Manual Created 25/03/2010

User Manual 30/11/2010

56

SOA For Virtuemart Component Mickael Cabanas http://www.virtuemart-datamanager.com Functions : AddVendor Functions : UpdateVendor Functions : DeleteVendor Functions : GetAllVendorCategory Input: loginInfo Vendor Input: loginInfo Vendor Input: loginInfo Id Input: loginInfo Output: result Output: result Output: result Output: Array of VendorCategory VendorCategory: vendor_category_id vendor_category_na me vendor_category_des c Output: result Output: result Output: result

User Manual 30/11/2010

Comments:

Comments:

Comments:

Comments:

Functions : AddVendorCategory Functions : UpdateVendorCategory Functions : DeleteVendorCategory Functions : GetAllManufacturer

Input: loginInfo VendorCategory Input: loginInfo VendorCategory Input: loginInfo Id Input: loginInfo

Comments:

Comments:

Comments:

Output: Comments: Array of Manufacturer VendorCategory: manufacturer_id mf_name mf_email mf_desc mf_category_id mf_url Output:

Functions :

Input:

Comments: 57

COM_VM_SOA : User Manual Created 25/03/2010

SOA For Virtuemart Component Mickael Cabanas http://www.virtuemart-datamanager.com AddManufacturer Functions : UpdateManufacturer Functions : DeleteManufacturer Functions : GetAllManufacturerCat loginInfo Manufacturer Input: loginInfo Manufacturer Input: loginInfo Id Input: loginInfo result Output: result Output: result Output: Array of ManufacturerCat VendorCategoryCat: mf_category_id mf_category_name mf_category_desc Output: result Output: result Output: result Output: Array of imageAvailable imageAvailable: image_name image_url Output: SOA_For_Virtuemart _Version Joomla_Version Virtuemart_Version Database_Version Author

User Manual 30/11/2010

Comments:

Comments:

Comments:

Functions : AddManufacturerCat Functions : UpdateManufacturerCat Functions : DeleteManufacturerCat Functions : GetAvailableVendorImages

Input: loginInfo Manufacturer Input: loginInfo Manufacturer Input: loginInfo Id Input: loginInfo

Comments:

Comments:

Comments:

Comments:

Functions : GetVersions

Input: loginInfo

Comments:

COM_VM_SOA : User Manual Created 25/03/2010

58

SOA For Virtuemart Component Mickael Cabanas http://www.virtuemart-datamanager.com

User Manual 30/11/2010

7.5. SQLQueries Service

VM_SQLQueries Service
Access : http://<host>/<base>/administrator/components/com_vm_soa/services/VM_SQLQueriesWSDL.php

Functions : ExecuteSQLQuery

Input: LoginInfo sqlRequest Input: LoginInfo QueryInfo QueryInfo: Table WhereClause Columns: Column

Output: result String Output: Result String result

Comments: Execute a generic result SQL Query Comments: Execute Select query

Functions : ExecuteSQLSelectQuery

SQL

Functions : ExecuteSQLInsertQuery

Input: LoginInfo QueryInfo

Output: Result

Comments: Execute SQL Insert query 59

COM_VM_SOA : User Manual Created 25/03/2010

SOA For Virtuemart Component Mickael Cabanas http://www.virtuemart-datamanager.com QueryInfo: Table WhereClause Columns: Column Values Value Functions : Input: ExecuteSQLUdpateQuery LoginInfo QueryInfo QueryInfo: Table WhereClause Columns: Column Values Value String result

User Manual 30/11/2010

Output: Result String result

Comments: Execute SQL Update query

7.6. Upload Service This service is disabled by default : Go to SOA For Virtuemart component settings to enable. This service allow upload picture file on VM directories: Product : components/com_virtuemart/shop_image/product Category : components/com_virtuemart/shop_image/category Vendor : components/com_virtuemart/shop_image/vendor HTTP POST Params : "dir" : Possible value (category, product, vendor) "login" : (Admin login) "pass" : (Admin pass) Return code : If upload ok return : <result> upload OK </result> else return a 404 HTTP Status COM_VM_SOA : User Manual Created 25/03/2010 60

Vous aimerez peut-être aussi