BASIC DESCRIPTION --------------------------------------------------------------------- The web service is launched on the distributor's eShop as an application directory /i6ws/ https://WWW.CYBERSOFT.CZ/i6ws/ (WWW.CYBERSOFT.CZ replace the domain of the distributor) Access to the web service does not have to be the same as eShop. Often a separate access is issued for web services, so that any password changes on the eShop, etc. do not interfere with the operation of automated data processing from the service, etc. It is possible to communicate with the service using the SOAP protocol. For methods with simple parameters (exports) also using GET / POST, so XML exports can be downloaded / obtained with a regular link. The service can be connected not only programmatically - it provides a description of the service using WSDL, but it can also be used / tested with a browser. The service simply has an interface where it displays a list of methods, a brief description, and for some test forms, which can be used to invoke methods directly from the browser. The service can compress the returned XML data (gzip, deflate) if the request is sent with the header: Accept-Encoding: gzip, deflate DATA EXPORT --------------------------------------------------------------------- Provided by / page: Default.asmx http: //WWW.CYBERSOFT.CZ/i6ws/Default.asmx Data exports can be obtained using general methods: GetResult - returns all data (or more precisely the basic set without further specification - for product - everything, for stock status - all in stock, for orders - only open, etc.) GetResultByCode - returns data filtered by unambiguous code - typically only one line (for product exports it is possible to query via PartNo, when the search string starts with {PartNo}) GetResultByFromTo - returns data filtered by date from / to - typically based on registered changes The list of exports that can be obtained is provided by the page with the export overview: https://WWW.CYBERSOFT.CZ/i6ws/ResultTypeInfo.ashx Meaning of the table column: ResultType - Name of the export (sold as an argument of the resultType methods) Schema - Click to display simple schema => It is possible to clear the returned attributes (columns) GetResult - Information about the possibilities / times of using the GetResult ByCode method - Information about the possibilities / times of using the GetResult ByCode method ByFromTo - Information about the possibilities / times of using the GetResultByFromTo method => if v not implemented for the given resultType (cannot be used) => if there are any days in | Allowed days of week | it is not possible to call the method on a given day (eg for use only on weekends) => if there are hours in | Allowed hours | the method cannot be called for a given hour (eg for use only outside the main working hours) Description - Export description Easy download using the GET method ----------------------------- Basic syntax URL: http: // NAME: PASSWORD@WWW.CYBERSOFT.CZ/i6ws/Default.asmx/METOD_NAME?resultType=RESULT_NAME&PARAMETERS UCASE values ​​in the URL are replaced: NAME - Login name to the web service PASSWORD - Login password to the web service METHOD_NAME - GetResult | GetResultByCode | GetResultByFromTo PARAMETERS GetResult - resultType= GetResultByCode - resultType= &code= GetResultByFromTo - resultType= &from= &to= Note: In order for the syntax to work: NAME: PASSWORD @ with logging data directly in the line, it must be explicitly enabled when manually trying using Internet Explorer: https://support.microsoft.com/kb/834489 Otherwise use without specifying NAME: PASSWORD @ in URL, the browser will display a login dialog on the first request. Priklady URL: basic features of all products: => Default.asmx/GetResult?resultType=StoItemBase basic features of one product: 600623: => Default.asmx/GetResultByCode?resultType=StoItemBase&code=600623 info on stock status of one product 600623 according to PartNo:: => Default.asmx/GetResultByCode?resultType=StoItemQtyFree&code={PartNo}600623 info on the price of one product 600623: => Default.asmx/GetResultByCode?resultType=StoItemPriceOrd&code=600623 all products in stock: => Default.asmx/GetResult?resultType=StoItemQtyFree the basic features 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 with the resulting saving of the XML file using VBScript: '-------------------------------------------------------------------- Option Explicit Main Private Sub Main Dim strUrl, strFile strUrl = "https://JMENO:HESLO@WWW.CYBERSOFT.CZ/i6ws/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 to a text file named: i6ws_client.vbs It can then be run in the CMD.EXE command line as: cscript.exe i6ws_client.vbs The script downloads basic product information 600623 and save it to a file: C:\StoItemBase.xml Description of the StoItemBase export structure ----------------------------- StoItemBase is a basic export providing product information. Other product exports are often a subset of it (only prices, stock info, etc.) Using the URL from the example above: http: // NAME: PASSWORD@WWW.CYBERSOFT.CZ/i6ws/Default.asmx/GetResultByCode?resultType=StoItemBase&code=600623 the following XML structure would be downloaded: For XML size savings, some attributes do not contain empty texts - eg: Code2, PartNo, PartNo2, NameAdd, NameE, ManName, SisName, NoteShort, Note NULL / unassigned values ​​- eg: PriceRef, RefProName, RefCode, PriceRef2, RefProName2, RefCode2 , WeightRef, MeasureRef2 zero = 0 values ​​- for example: QtyFreeIs, QtyFree, SNTrack, ThumbnailIs, ThumbnailSize, ImgIs, ImgSize, EnlargementIs, EnlargementSize default values ​​- for example: QtyPack = 1 at all returned. Closer comments on some attributes: QtyFreeIs | QtyFree => only one of the data is exported (based on the configuration of the web service at the distributor) ThumbnailIs | ThumbnailSize + ImgIs | EnlargementSize + EnlargementIs | EnlargementSize => Drive exported info only in the sense of YES / NO Is can be replaced by newly added *Size (* Is = 1 it is the same as Size> 0) *Is columns remain only for backward compatibility. It is possible to detect a change in the image from *Size (it can be assumed that changing the image will also change its size) WarDur + WarDurEU => The guarantee is kept in the system as Time (2,24, ...) One (Year, Month, ...). In the service, it is converted to days for versatility. You can perform a recalculation from the value exported in this way: MAXINT = 2147483647 - this is a lifetime guarantee If the number is completely divisible by 365 - it is possible to make a conversion to years If the number is completely divisible by 31 - it is possible to make a conversion to months. Creating a link from the exported data: To save space, the constant parts of the link are listed in the attributes only once in the root element Result. The resulting link is created by concatenating the UrlBase * attribute from the Result root element with the Id attribute from the StoItem row element, so that: UrlBase + Id = link to the product detail page on the distributor's eShop UrlBaseThumbnail + Id = link to image (small), only makes sense if ThumbnailSize > 0 UrlBaseImg + Id = link to image (common), only makes sense if ImgSize > 0 UrlBaseEnlargement + Id = link to image (large), only makes sense if EnlargementSize > 0 UrlBaseImgGalery + Id from the ImgGal subelement for images from the gallery ORDER ------------------------------------------------- -------------------- Provided by the service / site: Order.asmx http: //WWW.CYBERSOFT.CZ/i6ws/Order.asmx The service may not be configured / enabled on all distributors . If the service does not function at the end of all service method calls by status code: 501 Not Implemented Can simply test the GET request: http: // NAME: PASSWORD@WWW.CYBERSOFT.CZ/i6ws/Order.asmx/GetStatus? Id = 0 (query for non-existent order - returns either error 500 or 501 - does not know the method at all) The actual description of ordering via the web service is in a separate document: OrderReadMe.txt http: // NAME: PASSWORD@WWW.CYBERSOFT.CZ/i6ws/OrderReadMe.txt