- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Web service connection i6ws.100mega.cz - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Hello, Web service is available on distributors eshop https://i6ws.100mega.cz/ Log in to the service with the Log-in information that was sent to you The service can be communicated using SOAP. For methods with simple parameters (exports) also with GET / POST, so XML exports can be downloaded by a simple link. The service can be connected not only programmatically - it provides description of the service using WSDL, but you can also use via a browser. The service has a simple interface that displays a list of methods, a brief description, some of the test forms that can be invoked directly from the browser. The service can compress the returned XML data (gzip, deflate) if the request is sent with the headline: Accept-Encoding: gzip, deflate DATA EXPORTS --------------------------------------------------------------------- Provides service / page: Default.asmx https://i6ws.100mega.cz/Default.asmx Exports of data can be obtained using general methods: GetResult - returns all dates (or more precisely the basic set without any further specification - for the product - all, the warehouse status - all stock, orders - just opened, etc.) GetResultByCode - returns data filtered according to a unique code - typically only one line GetResultByFromTo - Returns data filtered by date from / to - typically based on registered changes A list of possible exports will be provided by the export overview page: https://i6ws.100mega.cz/ResultTypeInfo.ashx Meaning of table columns: ResultType - The name of the export (handed over as the resultType argument) Schema - Click to show simple schema => Read attributions (columns) GetResult - Information about the options / times of using the GetResult method ByCode - Information about the options / times of using the GetResultByCode method ByFromTo - Information about the options / times of using the GetResultByFromTo method => if all is grey, the method can not be implemented for the resultType (can not be used) => if they are grayed out some days in | Allowed days of week | it is not possible to call the day for a day (eg for use only on a weekend) => if they are grayed out some hours in | Allowed hours | it is not possible to call given hour (eg for use only outside the main working time) Description - Description of export Simple download using the GET method ------------------------------------ Basic Syntax URL: https://USER:PASSWORD@i6ws.100mega.cz/Default.asmx/METHOD_NAME?resultType=RESULT_NAME&PARAMETERS UCASE values in URL are replaced by: USER - LOGIN name to web service PASSWORD - PASSWORD name to web service METHOD_NAME - METHOD NAME GetResult | GetResultByCode | GetResultByFromTo PARAMETERS - parameters GetResult - resultType= GetResultByCode - resultType= &code= GetResultByFromTo - resultType= &from= &to= Note.: For syntax to work: NAME: PASSWORD @ with logging data in the link, it is necessary to explicitly allow you to use Internet Explorer in a manual attempt to use it: http://support.microsoft.com/kb/834489 Otherwise, use NO NAME: PASSWORD @ in URL, the browser will display the login dialog at the first request. URL Examples: basic features of all products: => Default.asmx/GetResult?resultType=StoItemBase basic properties of one product 600623: => Default.asmx/GetResultByCode?resultType=StoItemBase&code=600623 stock information of one product 600623: => Default.asmx/GetResultByCode?resultType=StoItemQtyFree&code=600623 info about the price of one product 600623: => Default.asmx/GetResultByCode?resultType=StoItemPriceOrd&code=600623 all products in stock: => Default.asmx/GetResult?resultType=StoItemQtyFree basic properties of more products that have changed between 13.06.2005-06.06.2079: => Default.asmx/GetResultByFromTo?resultType=StoItemBase&from=2005-06-13&to=2079-06-06 Sample download followed by saving the XML file using VBScript: -------------------------------------------------------------------- Option Explicit Main Private Sub Main Dim strUrl, strFile strUrl = "https://USER:PASSWORD@i6ws.100mega.cz/Default.asmx/GetResultByCode?resultType=StoItemBase&code=600623" strFile = "C:\StoItemBase.xml" With CreateObject("MSXML2.XMLHTTP") WScript.Echo "Opening url: " & strUrl .Open "GET", strUrl, False .Send If .Status <> 200 Then Err.Raise vbObjectError + 1, "GetResponseXml", "Bad response status: [" & .Status & "] " & .StatusText & vbCrLf & .ResponseText WScript.Echo "Saving file: " & strFile .ResponseXml.Save strFile WScript.Echo "Done." End With End Sub -------------------------------------------------------------------- If the contents of the block are saved in a text file called: i6ws_client.vbs You can then run it in the CMD.EXE command as: cscript.exe i6ws_client.vbs Script will download basic product information about 600623 and save it to a file: C:\StoItemBase.xml Description of the StoItemBase export structure ----------------------------- StoItemBase is a basic export giving information about products. Other product exports are often its subset (only prices, warehouse info, etc.) To use the URL from the above pointer: https://USER:PASSWORD@i6ws.100mega.cz/Default.asmx/GetResultByCode?resultType=StoItemBase&code=600623 the following XML structure would be downloaded: To support the size of XML, there are no attributes that contain blank texts - eg: Code2, PartNo, PartNo2, NameAdd, NameE, ManName, SisName, NoteShort, Note NULL / unmatched values - eg: PriceRef, RefProName, RefCode, PriceRef2, RefProName2, RefCode2, WeightRef, MeasureRef2 null = 0 values - eg: QtyFreeIs, QtyFree, SNTrack, ThumbnailIs, ThumbnailSize, ImgIs, ImgSize, EnlargementIs, EnlargementSize starting values - eg: QtyPack=1 More detailed comments on some attributes: QtyFreeIs | QtyFree => only one of the data is exported (based on the web service configuration at the distributor) ThumbnailIs | ThumbnailSize + ImgIs | EnlargementSize + EnlargementIs | EnlargementSize *Is The columns are left only for backward compatibility. From * Size you can detect the change of the picture (it is assumed that the image change will also change its size) WarDur + WarDurEU => The warranty is in the system as Time (2.24, ...) + Unit (Year, Month, ...). In service, it is calculated for the universality for days. From this exported value, you can make a recalculation: MAXINT=2147483647 it is a lifetime guarantee If the number is completely divisible 365 - it is to be converted to years If the number is completely divisible 31 - it is to be converted to months. Creating a link from exported data: To save space, the constant part of the link is given in attributes only once in the root element Result. The resulting link is created by concatenating the UrlBase * attribute from the Result root element and attribute Id of the element element StoItem, so: UrlBase + Id = link to the Product Details page on the Distributor's eShop UrlBaseThumbnail + Id = link to image (small), make sense only if ThumbnailSize> 0 UrlBaseImg + Id = link to image (no), make sense only if ImgSize> 0 UrlBaseEnlargement + Id = link to image (large), make sense only if EnlargementSize> 0 ORDERING -------------------------------------------------- ------------------- Provides service / page: Order.asmx https://i6ws.100mega.cz/Order.asmx The service may not be configured / enabled for all resellers. If the service is not functional, all calls to the service code service terminate: 501 Not Implemented You can easily try GET requirement: https://USER:PASSWORD@i6ws.100mega.cz/Order.asmx/GetStatus?Id=0 (query for non-existing order - returns error 500 or 501 - not known method) Custom description of ordering via web service is in a separate document: OrderReadMe.txt https://USER:PASSWORD@i6ws.100mega.cz/OrderReadMe.txt