Send barcodes to WEB server (web services)

This option allows sending barcodes from OPN2001 memory to a web server using web services protocol - SOAP.

image

Image: O2001SSW software – configure send barcodes to a web service.

O2001SSW can upload data to a web service providing that web method will accept one parameter XMLDocument and return string value "brec:OK" as indication that data is received correctly. Any other value will be considered an error.

Example code for MSSQL server table and Web service is available for download from: http://www.programbl.com/o2001ssw-opn2001-documentation.html - resources section.

Example template for web method:

[WebMethod]

public string BarcodeLoader(XmlDocument BarcodeDataSet)

{

// do something with received barcodes

return "brec:OK"; // return this string

}

image

Image:  configuration - uploading barcodes to a web service.

Web Page Address – address of web service – Example:  http://localhost/barcodesvc.asmx

Port and Service Type are ignored and will be removed in next version.

Request Data: - template for XML SOAP message that will be sent to web service. Template must include string #barcodes-xml# which is placeholder that will be replaced with actual XML barcode message sent to web service. Example:

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

<soap:Body>

<BarcodeLoader xmlns="http://programbl.com/webservices/">

<BarcodeDataSet>#barcodes-xml#</BarcodeDataSet>

</BarcodeLoader>

</soap:Body>

</soap:Envelope>

 

 

Headers Add - add any html header required for your service. It is good practice to open web service page with some internet browser. Most web services will provide some info about proper way to call service/methods. In this example: SOAPAction:http://programbl.com/webservices/BarcodeLoader is namespace and name of method.

Format Field Selection – specifies which columns will be included in XMLDocument sent to web service as well as order of fields in resulting XML document.

Available values:

{Barcode}

Barcode stored in OPN-2001 memory

{ScannerID}

Unique scanner ID (set by manufacturer)

{BarcodeType}

Barcode type (EAN13, UPC, EAN128 …)

{ScannerRTC}

Scan time - Scanner real time clock (If enabled)

{SysTime}

System – computer time

{BarcodeCount}

Total number of barcodes in scanner memory

{SessionCounter}

Total number of barcodes read from scanner since program was started

 

Request Method: Post/Get – enter method as specified by web service.

User Agent: optional string that identifies O2001SSW as web client.

Content type: enter content type as specified by web service.

Click on ‘Test Now’ button to verify correct setup of web service connectivity.