com vm soa user manual ws interfaces 1.5.3
Post on 10-Oct-2014
136 Views
Preview:
TRANSCRIPT
SOA For Virtuemart Component User Manual
Mickael Cabanas
http://www.virtuemart-datamanager.com
30/11/2010
- 1 -
TITRE :
User Manual
Interfaces Documentation
REF SOA For Virtuemart 1.5.3
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
SOA For Virtuemart Component User Manual
Mickael Cabanas
http://www.virtuemart-datamanager.com
30/11/2010
COM_VM_SOA : User Manual Created 25/03/2010
2
CREATION / UPDATE
Version Date Origin TAGS
0.7 25/03/2010 MCA Creation
0.8 13/05/2010 MCA Update : Add Interfaces documentations
0.9 16/05/2010 MCA Update : Add DeleteUser/AddUser /AddCategory /
DeleteCategory Interfaces documentations
RC1.0 17/05/2010 MCA Update : Add DeleteProduct/ AddProduct
/UpdateProduct / SQLServices Interfaces
documentations
RC1.0.1 21/05/2010 MCA Update : Add Product Fields
RC1.0.2 22/05/2010 MCA Update : Add SendMail
RC1.0.3 26/05/2010 MCA Update : New Back Office config
RC1.0.4 30/05/2010 MCA Update : Add CreateOrder /
GetUserFromEmailOrUsername
1.5 06/06/2010 MCA - 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
SOA For Virtuemart Component User Manual
Mickael Cabanas
http://www.virtuemart-datamanager.com
30/11/2010
COM_VM_SOA : User Manual Created 25/03/2010
3
- Add DeleteTax
- Add GetShopperGroup
- Add AddShopperGroup
- Add UpdateShopperGroup
- Add DeleteShopperGroup
- Add GetAllProducts
- Add GetAvailableImages (products)
- Add GetAvailableImages (categories)
- Add UpdateCategory
- Add GetOrderFromDate
1.5.1 13/06/2010 MCA - 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
SOA For Virtuemart Component User Manual
Mickael Cabanas
http://www.virtuemart-datamanager.com
30/11/2010
COM_VM_SOA : User Manual Created 25/03/2010
4
- Add AddManufacturerCat
- Add UpdateManufacturerCat
- Add DeleteManufacturerCat
- Add GetAvailableVendorImages
1.5.2 13/07/2010 MCA - 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)
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
SOA For Virtuemart Component User Manual
Mickael Cabanas
http://www.virtuemart-datamanager.com
30/11/2010
COM_VM_SOA : User Manual Created 25/03/2010
5
SUMMARY
1. Introduction ................................................................................................................... 1
2. Requierement ................................................................................................................ 1
3. Architecture ................................................................................................................... 2
4. 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
SOA For Virtuemart Component User Manual
Mickael Cabanas
http://www.virtuemart-datamanager.com
30/11/2010
COM_VM_SOA : User Manual Created 25/03/2010
1
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
SOA For Virtuemart Component User Manual
Mickael Cabanas
http://www.virtuemart-datamanager.com
30/11/2010
COM_VM_SOA : User Manual Created 25/03/2010
2
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/
SOA For Virtuemart Component User Manual
Mickael Cabanas
http://www.virtuemart-datamanager.com
30/11/2010
COM_VM_SOA : User Manual Created 25/03/2010
3
4.2. Install component on Joomla
Go to Joomla administration -> Extensions - > Install
Select zip file from your desk (click upload & install)
5.Component settings
5.1. Settings :
Go to COM_VM_SOA component (component -> WebServices Virtuemart) :
SOA For Virtuemart Component User Manual
Mickael Cabanas
http://www.virtuemart-datamanager.com
30/11/2010
COM_VM_SOA : User Manual Created 25/03/2010
4
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
SOA For Virtuemart Component User Manual
Mickael Cabanas
http://www.virtuemart-datamanager.com
30/11/2010
COM_VM_SOA : User Manual Created 25/03/2010
5
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 don’t 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.
SOA For Virtuemart Component User Manual
Mickael Cabanas
http://www.virtuemart-datamanager.com
30/11/2010
COM_VM_SOA : User Manual Created 25/03/2010
6
To enable authentication on each functions , tick authentication.
Click on save button to save the config.
Your Virtuemart is open to SOA Architecture !!!
SOA For Virtuemart Component User Manual
Mickael Cabanas
http://www.virtuemart-datamanager.com
30/11/2010
COM_VM_SOA : User Manual Created 25/03/2010
7
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 you‘ll have this message :
If Webservice is activated you‘ll see WSDL file structure like below
SOA For Virtuemart Component User Manual
Mickael Cabanas
http://www.virtuemart-datamanager.com
30/11/2010
COM_VM_SOA : User Manual Created 25/03/2010
8
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 )
SOA For Virtuemart Component User Manual
Mickael Cabanas
http://www.virtuemart-datamanager.com
30/11/2010
COM_VM_SOA : User Manual Created 25/03/2010
9
Then you’ll see soap result in right windows
SOA For Virtuemart Component User Manual
Mickael Cabanas
http://www.virtuemart-datamanager.com
30/11/2010
COM_VM_SOA : User Manual Created 25/03/2010
10
6.4. SOAP fault Exeption :
If user doesn’t exist or if is not super administrator, Webservice we’ll 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
SOA For Virtuemart Component User Manual
Mickael Cabanas
http://www.virtuemart-datamanager.com
30/11/2010
COM_VM_SOA : User Manual Created 25/03/2010
11
Flash/Flex
You can use Webservices Tools in Flex 3, Flash builder4
<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);
}
SOA For Virtuemart Component User Manual
Mickael Cabanas
http://www.virtuemart-datamanager.com
30/11/2010
COM_VM_SOA : User Manual Created 25/03/2010
12
</script>
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 net.virtuemart.soapclient.VM_WebServicesClient;
import net.virtuemart.vm_categories.Categorie;
import net.virtuemart.vm_categories.CategorieArray;
import net.virtuemart.vm_categories.GetAllCategoriesInput;
import net.virtuemart.vm_categories.LoginInfo;
import net.virtuemart.vm_categories.VMCategories_Service;
//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());
}
SOA For Virtuemart Component User Manual
Mickael Cabanas
http://www.virtuemart-datamanager.com
30/11/2010
COM_VM_SOA : User Manual Created 25/03/2010
13
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 : Input: Output: Comments:
GetAllCategories LoginInfo Array of Categories Return an array of
SOA For Virtuemart Component User Manual
Mickael Cabanas
http://www.virtuemart-datamanager.com
30/11/2010
COM_VM_SOA : User Manual Created 25/03/2010
14
LoginInfo:
Login
password
Categorie :
id
name
description
parentcat
image
fullimage numberofproducts
category_publish
category_browsepage
category_flypage
products_per_row
all categories in Virtuemart
Functions : Input: Output: Comments:
GetChildsCategories LoginInfo
categoryId
Array of Categories Return an array of all Childs categories in Virtuemart
categoryId Categorie :
id
name
description
parentcat
image
fullimage numberofproducts
category_publish
category_browsepage
category_flypage
products_per_row
Functions : Input: Output: Comments:
AddCategory LoginInfo
Category
result Add Category in virtuemart with all
SOA For Virtuemart Component User Manual
Mickael Cabanas
http://www.virtuemart-datamanager.com
30/11/2010
COM_VM_SOA : User Manual Created 25/03/2010
15
Category:
id
name
description
parentcat
image
fullimage numberofproducts
category_publish
category_browsepage
category_flypage
products_per_row
informations
Functions : Input: Output: Comments:
DeleteCategory LoginInfo
Category_id
result Delete a category in virtuemart from id
Functions : Input: Output: Comments:
UpdateCategory LoginInfo
Category
result Update a category
Category:
id
name
description
parentcat
image
fullimage numberofproducts
category_publish
category_browsepage
category_flypage
products_per_row
Functions : Input: Output: Comments:
GetAvailableImages LoginInfo
Array Get All images available in
Components /com_virtuemart/ shop_image/ category
image_name
image_url
SOA For Virtuemart Component User Manual
Mickael Cabanas
http://www.virtuemart-datamanager.com
30/11/2010
COM_VM_SOA : User Manual Created 25/03/2010
16
SOA For Virtuemart Component User Manual
Mickael Cabanas
http://www.virtuemart-datamanager.com
30/11/2010
COM_VM_SOA : User Manual Created 25/03/2010
17
7.2. Products Service
SOA For Virtuemart Component User Manual
Mickael Cabanas
http://www.virtuemart-datamanager.com
30/11/2010
COM_VM_SOA : User Manual Created 25/03/2010
18
VM_Products Service
Access :
http://<host>/<base>/administrator/components/com_vm_soa/services/VM_ProductWSDL.php
Functions : Input: Output: Comments
SOA For Virtuemart Component User Manual
Mickael Cabanas
http://www.virtuemart-datamanager.com
30/11/2010
COM_VM_SOA : User Manual Created 25/03/2010
19
GetProductFromId LoginInfo
Product_id
Product Return a product details from an product ID
SOA For Virtuemart Component User Manual
Mickael Cabanas
http://www.virtuemart-datamanager.com
30/11/2010
COM_VM_SOA : User Manual Created 25/03/2010
20
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_date
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
SOA For Virtuemart Component User Manual
Mickael Cabanas
http://www.virtuemart-datamanager.com
30/11/2010
COM_VM_SOA : User Manual Created 25/03/2010
21
Functions : Input: Output: Comments:
GetChildsProduct LoginInfo
Product_id
Array of Products Return an array of all Childs
SOA For Virtuemart Component User Manual
Mickael Cabanas
http://www.virtuemart-datamanager.com
30/11/2010
COM_VM_SOA : User Manual Created 25/03/2010
22
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_date
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
products
SOA For Virtuemart Component User Manual
Mickael Cabanas
http://www.virtuemart-datamanager.com
30/11/2010
COM_VM_SOA : User Manual Created 25/03/2010
23
Functions : Input: Output: Comments:
GetProductsFromCategory LoginInfo
category_id
Array of Products Return an array of all
SOA For Virtuemart Component User Manual
Mickael Cabanas
http://www.virtuemart-datamanager.com
30/11/2010
COM_VM_SOA : User Manual Created 25/03/2010
24
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_date
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
products in category
SOA For Virtuemart Component User Manual
Mickael Cabanas
http://www.virtuemart-datamanager.com
30/11/2010
COM_VM_SOA : User Manual Created 25/03/2010
25
Functions : Input: Output: Comments:
GetProductsFromOrderId LoginInfo
order_id
Array of Products Return an array of all products in order
SOA For Virtuemart Component User Manual
Mickael Cabanas
http://www.virtuemart-datamanager.com
30/11/2010
COM_VM_SOA : User Manual Created 25/03/2010
26
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_date
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
SOA For Virtuemart Component User Manual
Mickael Cabanas
http://www.virtuemart-datamanager.com
30/11/2010
COM_VM_SOA : User Manual Created 25/03/2010
27
Functions : Input: Output: Comments:
UpdateProduct LoginInfo
Product
result Update Product information
SOA For Virtuemart Component User Manual
Mickael Cabanas
http://www.virtuemart-datamanager.com
30/11/2010
COM_VM_SOA : User Manual Created 25/03/2010
28
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_date
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
result
SOA For Virtuemart Component User Manual
Mickael Cabanas
http://www.virtuemart-datamanager.com
30/11/2010
COM_VM_SOA : User Manual Created 25/03/2010
29
Functions : Input: Output: Comments:
AddProduct LoginInfo
Product
result Add a product in Virtuemart
SOA For Virtuemart Component User Manual
Mickael Cabanas
http://www.virtuemart-datamanager.com
30/11/2010
COM_VM_SOA : User Manual Created 25/03/2010
30
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_date
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
result
SOA For Virtuemart Component User Manual
Mickael Cabanas
http://www.virtuemart-datamanager.com
30/11/2010
COM_VM_SOA : User Manual Created 25/03/2010
31
Functions : Input: Output: Comments:
DeleteProduct LoginInfo
Product_id
result Delete a product in Virtuemart
Product_id result
Functions : Input: Output: Comments
GetAllCurrency LoginInfo result
Functions : Input: Output: Comments
GetAllTax LoginInfo result
Functions : Input: Output: Comments
AddTax tax_rate_id
vendor_id
tax_state
tax_country
mdate
tax_rate
result
Functions : Input: Output: Comments
UpdateTax tax_rate_id
vendor_id
tax_state
tax_country
mdate
tax_rate
result
Functions : Input: Output: Comments
DeleteTax Array of id result
Functions : Input: Output: Comments
GetAllProducts product_publish
with_childs
limite_start
limite_end
result
Functions : Input: Output: Comments
GetAvailableImages loginInfo Array Get All images available in
Components /com_virtuemart/ shop_image/ product
image_name
image_url
SOA For Virtuemart Component User Manual
Mickael Cabanas
http://www.virtuemart-datamanager.com
30/11/2010
COM_VM_SOA : User Manual Created 25/03/2010
32
7.3. Orders Service
SOA For Virtuemart Component User Manual
Mickael Cabanas
http://www.virtuemart-datamanager.com
30/11/2010
COM_VM_SOA : User Manual Created 25/03/2010
33
VM_Orders Service
Access :
http://<host>/<base>/administrator/components/com_vm_soa/services/VM_OrderWSDL.php
Functions : Input: Output: Comments:
GetOrder LoginInfo
Order_Id
Order Return order
SOA For Virtuemart Component User Manual
Mickael Cabanas
http://www.virtuemart-datamanager.com
30/11/2010
COM_VM_SOA : User Manual Created 25/03/2010
34
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
informations from an orderId
Functions : Input: Output: Comments:
GetAllOrders LoginInfo
limits
Array of orders Return an array of all
SOA For Virtuemart Component User Manual
Mickael Cabanas
http://www.virtuemart-datamanager.com
30/11/2010
COM_VM_SOA : User Manual Created 25/03/2010
35
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
orders
Functions : Input: Output: Comments:
getOrderStatus LoginInfo OrderStatus Return all status OrderStatus:
order_status_id
order_status_code
order_status_name
order_status_description
list_order
vendor_id
Functions : Input: Output: Comments:
getOrdersFromStatus LoginInfo
Limits
Status
Array of orders Return all orders with a status (P, C, X
SOA For Virtuemart Component User Manual
Mickael Cabanas
http://www.virtuemart-datamanager.com
30/11/2010
COM_VM_SOA : User Manual Created 25/03/2010
36
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
Functions : Input: Output: Comments:
UpdateOrderStatus loginInfo
statusInfo
String Update status of an order and notify customer with comment
statusInfo:
order_id
status
notify
comment
Functions : Input: Output: Comments:
CreateOrder loginInfo
orderInput
result Create an order
SOA For Virtuemart Component User Manual
Mickael Cabanas
http://www.virtuemart-datamanager.com
30/11/2010
COM_VM_SOA : User Manual Created 25/03/2010
37
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
Functions : Input: Output: Comments:
GettAllCouponCode loginInfo result
Functions : Input: Output: Comments:
AddCouponCode loginInfo
coupon_id
coupon_code
percent_or_total
(values : percent / total)
coupon_type
(values : gift / permanent )
coupon_value
result
Functions : Input: Output: Comments:
DeleteCouponCode loginInfo
Array of id
result
Functions : Input: Output: Comments:
GetAllShippingRate LoginInfo result
Functions : Input: Output: Comments:
GetAllShippingCarrier LoginInfo result
Functions : Input: Output: Comments:
SOA For Virtuemart Component User Manual
Mickael Cabanas
http://www.virtuemart-datamanager.com
30/11/2010
COM_VM_SOA : User Manual Created 25/03/2010
38
AddShippingRate loginInfo
Array of ShippingRate
AddShippingRate ShippingRate:
shipping_rate_name
shipping_rate_carrier_id
shipping_rate_country
shipping_rate_zip_start
shipping_rate_zip_end
shipping_rate_weight_start
shipping_rate_weight_end
shipping_rate_value
shipping_rate_package_fee
shipping_rate_currency_id
shipping_rate_vat_id
shipping_rate_list_order
result
Functions : Input: Output: Comments:
UpdateShippingRate 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_start
shipping_rate_weight_end
shipping_rate_value
shipping_rate_package_fee
shipping_rate_currency_id
shipping_rate_vat_id
shipping_rate_list_order
Functions : Input: Output: Comments:
SOA For Virtuemart Component User Manual
Mickael Cabanas
http://www.virtuemart-datamanager.com
30/11/2010
COM_VM_SOA : User Manual Created 25/03/2010
39
AddShippingCarrier loginInfo
Array of ShippingCarrier
ShippingCarrier
shipping_carrier_id
shipping_carrier_name
shipping_carrier_list_order
result
Functions : Input: Output: Comments:
AddShippingCarrier loginInfo
Array of ShippingCarrier
Functions : Input: Output: Comments:
UpdateShippingCarrier loginInfo
Array of ShippingCarrier
ShippingCarrier
shipping_carrier_id
shipping_carrier_name
shipping_carrier_list_order
DeleteShippingRate loginInfo
Array of id
result
Functions : Input: Output: Comments:
DeleteShippingCarrier loginInfo
Array of id
result
Functions : Input: Output: Comments:
GetAllPaymentMethod LoginInfo PaymentMethod
Functions : Input: Output: Comments:
AddPaymentMethod loginInfo
PaymentMethod
result
SOA For Virtuemart Component User Manual
Mickael Cabanas
http://www.virtuemart-datamanager.com
30/11/2010
COM_VM_SOA : User Manual Created 25/03/2010
40
PaymentMethod
payment_method_id
vendor_id
payment_method_name
payment_class
shopper_group_id
payment_method_discount
payment_method_discount_is_percent payment_method_discount _max_amount
payment_method_discount _min_amount
list_order
payment_method_code
enable_processor
is_creditcard
payment_enabled
accepted_creditcards
payment_extrainfo
Functions : Input: Output: Comments:
UpdatePaymentMethod loginInfo
PaymentMethod
result
SOA For Virtuemart Component User Manual
Mickael Cabanas
http://www.virtuemart-datamanager.com
30/11/2010
COM_VM_SOA : User Manual Created 25/03/2010
41
PaymentMethod
payment_method_id
vendor_id
payment_method_name
payment_class
shopper_group_id
payment_method_discount
payment_method_discount _is_percent payment_method_discount _max_amount
payment_method_discount _min_amount
list_order
payment_method_code
enable_processor
is_creditcard
payment_enabled
accepted_creditcards
payment_extrainfo
Functions : Input: Output: Comments:
DeletePaymentMethod loginInfo
Array of id
result
Functions : Input: Output: Comments:
GetOrderFromDate loginInfo
order_status
date_start
(format YYYY-MM-DD)
date_end
(format YYYY-MM-DD)
result
Functions : Input: Output: Comments:
GetAllCreditCard loginInfo Array of CreditCard
CreditCard:
creditcard_id
vendor_id
creditcard_name
creditcard_code
Functions : Input: Output: Comments:
SOA For Virtuemart Component User Manual
Mickael Cabanas
http://www.virtuemart-datamanager.com
30/11/2010
COM_VM_SOA : User Manual Created 25/03/2010
42
AddCreditCard loginInfo
CreditCard
result
CreditCard:
creditcard_id
vendor_id
creditcard_name
creditcard_code
Functions : Input: Output: Comments:
UpdateCreditCard loginInfo
CreditCard
result
CreditCard:
creditcard_id
vendor_id
creditcard_name
creditcard_code
Functions : Input: Output: Comments:
DeleteCreditCard loginInfo
id
result
Functions : Input: Output: Comments:
AddOrderStatusCode loginInfo
OrderStatus
result
OrderStatus:
order_status_id
order_status_code
order_status_name
order_status_description
list_order
vendor_id
Functions : Input: Output: Comments:
UpdateOrderStatusCo
de
loginInfo
OrderStatus
result
SOA For Virtuemart Component User Manual
Mickael Cabanas
http://www.virtuemart-datamanager.com
30/11/2010
COM_VM_SOA : User Manual Created 25/03/2010
43
OrderStatus:
order_status_id
order_status_code
order_status_name
order_status_description
list_order
vendor_id
Functions : Input: Output: Comments:
DeleteOrderStatusCod
e
loginInfo
id
SOA For Virtuemart Component User Manual
Mickael Cabanas
http://www.virtuemart-datamanager.com
30/11/2010
COM_VM_SOA : User Manual Created 25/03/2010
44
7.4. Users Service
SOA For Virtuemart Component User Manual
Mickael Cabanas
http://www.virtuemart-datamanager.com
30/11/2010
COM_VM_SOA : User Manual Created 25/03/2010
45
VM_Users Service
Access :
http://<host>/<base>/administrator/components/com_vm_soa/services/VM_UsersWSDL.php
Functions : Input: Output: Comments:
Authentification LoginInfo result Authenticate a user
LoginInfo:
Login
password
String result
Functions : Input: Output: Comments:
GetUsers LoginInfo Array of Users Return an array of
SOA For Virtuemart Component User Manual
Mickael Cabanas
http://www.virtuemart-datamanager.com
30/11/2010
COM_VM_SOA : User Manual Created 25/03/2010
46
limite_start
limite_end
(if empty, default 0-50)
Users :
id
login
password
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
all Users informations
SOA For Virtuemart Component User Manual
Mickael Cabanas
http://www.virtuemart-datamanager.com
30/11/2010
COM_VM_SOA : User Manual Created 25/03/2010
47
Functions : Input: Output: Comments:
AddUser LoginInfo
User
result Create a user (Customer) in
SOA For Virtuemart Component User Manual
Mickael Cabanas
http://www.virtuemart-datamanager.com
30/11/2010
COM_VM_SOA : User Manual Created 25/03/2010
48
Users :
id
login
password
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
String result Joomla and Virtuemart with all details
SOA For Virtuemart Component User Manual
Mickael Cabanas
http://www.virtuemart-datamanager.com
30/11/2010
COM_VM_SOA : User Manual Created 25/03/2010
49
Functions : Input: Output: Comments:
DeleteUser LoginInfo
User_id
result Delete a user from User_id
User_id String result
Functions : Input: Output: Comments:
sendMail LoginInfo
EmailParams
result Send email
EmailParams:
from_mail
from_name
recipient
subject
body
altbody
Functions : Input: Output: Comments:
GetUserFromEmailOrUsernam
e
LoginInfo
SearchParams
User Search user
SOA For Virtuemart Component User Manual
Mickael Cabanas
http://www.virtuemart-datamanager.com
30/11/2010
COM_VM_SOA : User Manual Created 25/03/2010
50
SearchParams
Username
Searchtype
(VALUE : user_id, email , username)
Users :
id
login
password
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
SOA For Virtuemart Component User Manual
Mickael Cabanas
http://www.virtuemart-datamanager.com
30/11/2010
COM_VM_SOA : User Manual Created 25/03/2010
51
Functions : Input: Output: Comments:
getAllCountryCode LoginInfo
result
Functions : Input: Output: Comments:
getAuthGroup LoginInfo
group_id
group_name
group_level
Functions : Input: Output: Comments:
AddAuthGroup loginInfo
group_id
group_name
group_level
Functions : Input: Output: Comments:
deleteAuthGroup loginInfo
group_id
result
Functions : Input: Output: Comments:
getAllStates loginInfo
country_id
Array of State
Functions : Input: Output: Comments:
addStates loginInfo
country_id
Array of States
result
State:
state_id
country_id
state_name
state_3_code
state_2_code
Functions : Input: Output: Comments:
deleteStates loginInfo
Array of id
Array of ShopperGroup
Functions : Input: Output: Comments:
SOA For Virtuemart Component User Manual
Mickael Cabanas
http://www.virtuemart-datamanager.com
30/11/2010
COM_VM_SOA : User Manual Created 25/03/2010
52
getShopperGroup loginInfo ShopperGroup:
shopper_group_id
vendor_id
shopper_group_name
shopper_group_desc
shopper_group_discoun
show_price_including_tax
default
Functions : Input: Output: Comments:
addShopperGroup loginInfo
Array of ShopperGroup
result
ShopperGroup:
shopper_group_id
vendor_id
shopper_group_name
shopper_group_desc
shopper_group_discoun
show_price_including_tax
default
Functions : Input: Output: Comments:
updateShopperGroup loginInfo
Array of ShopperGroup
result
ShopperGroup:
shopper_group_id
vendor_id
shopper_group_name
shopper_group_desc
shopper_group_discoun
show_price_including_tax
default
SOA For Virtuemart Component User Manual
Mickael Cabanas
http://www.virtuemart-datamanager.com
30/11/2010
COM_VM_SOA : User Manual Created 25/03/2010
53
Functions : Input: Output: Comments:
deleteShopperGroup loginInfo
Array of id
Functions : Input: Output: Comments:
updateUser loginInfo
User
SOA For Virtuemart Component User Manual
Mickael Cabanas
http://www.virtuemart-datamanager.com
30/11/2010
COM_VM_SOA : User Manual Created 25/03/2010
54
Users :
id
login
password
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
SOA For Virtuemart Component User Manual
Mickael Cabanas
http://www.virtuemart-datamanager.com
30/11/2010
COM_VM_SOA : User Manual Created 25/03/2010
55
Functions : Input: Output: Comments:
getAllVendor loginInfo
Array of Vendor
SOA For Virtuemart Component User Manual
Mickael Cabanas
http://www.virtuemart-datamanager.com
30/11/2010
COM_VM_SOA : User Manual Created 25/03/2010
56
Vendor:
vendor_id
vendor_name
contact_last_name
contact_first_name
contact_middle_name
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_service
vendor_url
vendor_min_pov
vendor_freeshipping
vendor_currency_display_style
vendor_accepted_currencies
vendor_address_format
vendor_date_format
SOA For Virtuemart Component User Manual
Mickael Cabanas
http://www.virtuemart-datamanager.com
30/11/2010
COM_VM_SOA : User Manual Created 25/03/2010
57
Functions : Input: Output: Comments:
AddVendor loginInfo
Vendor
result
Functions : Input: Output: Comments:
UpdateVendor loginInfo
Vendor
result
Functions : Input: Output: Comments:
DeleteVendor loginInfo
Id
result
Functions : Input: Output: Comments:
GetAllVendorCategory loginInfo
Array of VendorCategory
VendorCategory:
vendor_category_id
vendor_category_name
vendor_category_desc
Functions : Input: Output: Comments:
AddVendorCategory loginInfo
VendorCategory
result
Functions : Input: Output: Comments:
UpdateVendorCategory loginInfo
VendorCategory
result
Functions : Input: Output: Comments:
DeleteVendorCategory loginInfo
Id
result
Functions : Input: Output: Comments:
GetAllManufacturer loginInfo
Array of Manufacturer
VendorCategory:
manufacturer_id
mf_name
mf_email
mf_desc
mf_category_id
mf_url
Functions : Input: Output: Comments:
SOA For Virtuemart Component User Manual
Mickael Cabanas
http://www.virtuemart-datamanager.com
30/11/2010
COM_VM_SOA : User Manual Created 25/03/2010
58
AddManufacturer loginInfo
Manufacturer
result
Functions : Input: Output: Comments:
UpdateManufacturer loginInfo
Manufacturer
result
Functions : Input: Output: Comments:
DeleteManufacturer loginInfo
Id
result
Functions : Input: Output: Comments:
GetAllManufacturerCat loginInfo
Array of ManufacturerCat
VendorCategoryCat:
mf_category_id
mf_category_name
mf_category_desc
Functions : Input: Output: Comments:
AddManufacturerCat loginInfo
Manufacturer
result
Functions : Input: Output: Comments:
UpdateManufacturerCat loginInfo
Manufacturer
result
Functions : Input: Output: Comments:
DeleteManufacturerCat loginInfo
Id
result
Functions : Input: Output: Comments:
GetAvailableVendorImages loginInfo
Array of imageAvailable
imageAvailable:
image_name
image_url
Functions : Input: Output: Comments:
GetVersions loginInfo
SOA_For_Virtuemart_Version
Joomla_Version
Virtuemart_Version
Database_Version
Author
SOA For Virtuemart Component User Manual
Mickael Cabanas
http://www.virtuemart-datamanager.com
30/11/2010
COM_VM_SOA : User Manual Created 25/03/2010
59
7.5. SQLQueries Service
VM_SQLQueries Service
Access :
http://<host>/<base>/administrator/components/com_vm_soa/services/VM_SQLQueriesWSDL.php
Functions : Input: Output: Comments:
ExecuteSQLQuery LoginInfo result Execute a generic SQL Query sqlRequest String result
Functions : Input: Output: Comments:
ExecuteSQLSelectQuery LoginInfo
QueryInfo
Result Execute SQL Select query
QueryInfo:
Table
WhereClause
Columns:
Column
String result
Functions : Input: Output: Comments:
ExecuteSQLInsertQuery LoginInfo
QueryInfo
Result Execute SQL Insert query
SOA For Virtuemart Component User Manual
Mickael Cabanas
http://www.virtuemart-datamanager.com
30/11/2010
COM_VM_SOA : User Manual Created 25/03/2010
60
QueryInfo:
Table
WhereClause
Columns:
Column
Values
Value
String result
Functions : Input: Output: Comments:
ExecuteSQLUdpateQuery LoginInfo
QueryInfo
Result Execute SQL Update query
QueryInfo:
Table
WhereClause
Columns:
Column
Values
Value
String result
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
top related