If you open the URL of the WSDL deployed in your server you will see the file starts with: <?xml version="1.0" encoding="utf-8" ?> <definitions xmlns="http://schemas.x. ... <types> <xsd:schema> <xsd:import namespace="http://ws.rbarcode.java4less.com/"
90 schemaLocation="http://localhost:8080/j4lrbarcode/BarcodeWS?x
sd=../../WEB-INF/wsdl/BarcodeWS.xsd" />
</xsd:schema> </types>
the schemaLocation attribute gives you the URL where you can see the schema of the XML document used as request to create a barcode. The XML schema describes the format of the document used in the web service request, this is similar to the method signature in a Java class which describes the parameters used in a method. In this example the schema's URL would be:
http://localhost:8080/j4lrbarcode/BarcodeWS?xsd=../../WEB- INF/wsdl/BarcodeWS.xsd
if you open that XSD file you will see this complexType: <xs:complexType name="CreateBarcode"> <xs:sequence>
<xs:element minOccurs="0" name="type" type="xs:string" />
<xs:element minOccurs="0" name="value" type="xs:string" />
<xs:element minOccurs="0" name="set" type="xs:string" />
<xs:element minOccurs="0"
name="processTilde" type="xs:string" /> <xs:element minOccurs="0" name="text" type="xs:string" />
<xs:element name="rotate" type="xs:int" /> <xs:element name="barHeight"
type="xs:int" />
<xs:element name="X" type="xs:int" /> <xs:element name="N" type="xs:int" /> <xs:element minOccurs="0" name="barColor" type="xs:string" /> <xs:element minOccurs="0" name="fontColor" type="xs:string" /> <xs:element minOccurs="0" name="backColor" type="xs:string" /> <xs:element minOccurs="0" name="font" type="xs:string" /> <xs:element name="leftMargin" type="xs:int" /> <xs:element name="topMargin" type="xs:int" /> </xs:sequence> </xs:complexType>
91 these are the parameters of the Barcode 1D creation request.
This section provides now a short description of the meaning of the parameters without using the XML schema format:
• Barcode 1D:
o type: type of barcode to create. Valid values are: BAR39, BAR38EXT,
CODE128, CODE11, CODABAR,CODE93, CODE93EXT, MSI, IND25, MAT25, INTERLEAVED25, EAN13, EAN8, EAN128, UPCA, UPCE or POSTNET.
o value: value to be encoded
o set: value A, B or C (for type CODE128 only)
o processTilde.See Barcode 1D documentation.
o text: value to be displayed below the barcode. o barHeight: height of bars in pixels
o X: width of narrow bars in pixels
o N: multiplier for wide bars. A value of 2, means that wide bars will be 2
times the width of narrow bars. The default vaue is 2
o barColor. Color of bars. Valid values are RED, BLACK, BLUE, CYAN,
DARKGRAY, GRAY, GREEN, LIGHTGRAY, MAGENTA, PINK, WHITE or YELLOW. You can also use the RGB value.
o fontColor: color of the text. o backColor: background color.
o font: font of the text, for example "ARIAL|BOLD|10", the format is
<family|style|size>
o leftMargin: margin in pixels o topMargin: margin in pixels
• QRCode
<xs:complexType name="createBarcode"> <xs:sequence>
<xs:element minOccurs="0" name="code" type="xs:string" /> <xs:element name="moduleSize" type="xs:int" />
<xs:element name="processTilde" type="xs:boolean" /> <xs:element name="margin" type="xs:int" />
<xs:element minOccurs="0" name="ecLevel" type="xs:string" /> <xs:element minOccurs="0" name="encoding" type="xs:string" /> <xs:element name="configuration" type="xs:int" />
</xs:sequence> </xs:complexType>
o code: value to be encoded.
o processTilde: See QRCode documentation in evaluation version. o moduleSize: size (pixels) of the modules (dots) of the matrix. o margin: margin in pixels.
o ecLevel: can be H, L, M or Q.
o encoding: can be ALPHA, BYTE, NUMERIC, KANJI or AUTO.
o configuration: the configuration is the size of the qrcode. Valid values
92 • Datamatrix
<xs:complexType name="createBarcode"> <xs:sequence>
<xs:element minOccurs="0" name="code" type="xs:string" /> <xs:element name="processTilde" type="xs:boolean" /> <xs:element name="moduleSize" type="xs:int" />
<xs:element name="margin" type="xs:int" />
<xs:element minOccurs="0" name="encoding" type="xs:string" /> <xs:element minOccurs="0" name="format" type="xs:string" /> </xs:sequence>
</xs:complexType>
o code: value to be encoded.
o processTilde: See J4L Barcodes documentation
o moduleSize: size (pixels) of the modules (dots) of the matrix. o margin: margin in pixels
o encoding: The default is ASCII. Posible values are ASCII, C40, TEXT,
BASE256 and AUTO.
o format: If empty the format will be selected automatically, if not you can
specify the format (e.g. C24X24).
• PDF417
<xs:complexType name="createBarcode"> <xs:sequence>
<xs:element minOccurs="0" name="code" type="xs:string" /> <xs:element name="rows" type="xs:int" />
<xs:element name="maxRows" type="xs:int" /> <xs:element name="cols" type="xs:int" /> <xs:element name="ecLevel" type="xs:int" />
<xs:element minOccurs="0" name="compaction" type="xs:string" />
<xs:element name="X" type="xs:int" /> <xs:element name="H" type="xs:int" /> <xs:element name="margin" type="xs:int" /> </xs:sequence>
</xs:complexType>
o code: value to be encoded o rows: number of rows
o maxRows: maximum number of rows
o cols: number of columns o ecLevel: error correction level
o compaction: can be NUMERIC, TEXT or BINARY
o X: width of narrows bars in pixels o H: height of bars
93