[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Example using http_url_post_stmf
Hi all
I am quite new to Httpapi and I am looking for an example about the
use of http_url_post_stmf . I have to send a xml file to a webserver
that is on a Epson printer. Looking at the example in Httpapi first I
wrote a pgm that send the example data written in a program variable
using �tp_url_post_xml�nd it was Ok . Then I modified the program
to send the same data written now in a xml file using
http_url_post_stmf and I receive an error. So I try to send the xml
file using the HTTPAPI cmdline interface to try to understand what I
receive from the server and the response file is :
<?xml version="1.0"
encoding="utf-8"?>
<soapenv:Envelope
xmlns:soapenv="[1]http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<response success="false" code="PARSER_ERROR"
status="0">
</response>
</soapenv:Body>
</soapenv:Envelope>
maybe I did a mistake when I copied the data in the xml file and there
is no problem or I am using the http_url_post_stmf in a wrong mode.
Another question is how in the incoming procedure can I read the values
of success and code attributes of response tag?
Attached is the XML file that I am using.
Thanks in advance
Mario
References
1. http://schemas.xmlsoap.org/soap/envelope/"
<?xml version="1.0" encoding="utf-8"?>
<SOAP:Envelope
xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP:Body>
<printerFiscalReceipt>
<displayText operator="1" data="Message on customer display" />
<printRecMessage operator="1" messageType="1" index="1"
font="1" message="Messaggio di testata Row Type 1" />
<printRecMessage operator="1" messageType="1" index="2"
font="1" message="Secondo messaggio testa Row Type 1" />
<beginFiscalReceipt operator="1" />
<printRecMessage operator="1" messageType="4"
message="Descrizione aggiunt. type 4" />
<printRecItem operator="1" description="ASPIRINA C" quantity="1"
unitPrice="6,00" department="15" justification="1" />
<printRecMessage operator="1" messageType="4"
message="Second Additional Row Type 4" />
<printRecItem operator="1" description="Selling Item 2 VAT 20%"
quantity="1,234" unitPrice="10,00" department="15"
justification="1" />
<printRecVoidItem operator="1" description="Void selling Item 2"
quantity="1,234" unitPrice="10,00" department="15"
justification="1" /> '
<printRecItem operator="1" description="Selling Item 3 VAT 20%"
quantity="2,50" unitPrice="100,17" department="3"
justification="1" />
<printRecMessage operator="1" messageType="4"
message="Third Additional Row Type 4" />
<printRecRefund operator="1" description="Refund (goods return)"
quantity="10" unitPrice="5,00" department="15"
justification="1" />
<printRecItem operator="1" description="Selling Item 4 VAT 20%"
quantity="12,13" unitPrice="216,17" department="3"
justification="2" />
<printRecItemAdjustment operator="1" description=
"Discount applied to the product" adjustmentType="0"
amount="123,45" justification="2" />
<printRecMessage operator="1" message="First Additional Row Type 2"
messageType="2" index="1" font="1" />
<printRecMessage operator="1" message="Second Additional Row Type 2"
messageType="2" index="2" font="1" />
<printRecMessage operator="1" message="First Additional Row Type 3"
messageType="3" index="1" font="1" />
<printRecMessage operator="1" message="Second Additional Row Type 3"
messageType="3" index="2" font="1" />
<printRecItem operator="1" description="Selling Item 5 20%"
quantity="12,13" unitPrice="216,17" department="3"
justification="2" />
<printRecSubtotalAdjustment operator="1"
description="Discount applied to the subtotal"
adjustmentType="1" amount="300,12" justification="2" />
<printRecSubtotal operator="1" option="1" />
<printBarCode operator="1" position="10" width="2" height="66"
hRIPosition="3" hRIFont="C"
codeType="CODE39" code="0123456789" />
<printRecTotal operator="1" description="Payment in cash"
payment="6000,00" paymentType="0" index="0"
justification="2" />
<endFiscalReceipt operator="1" />
<displayText operator="1" data="Arrivederci e grazie su display" />
</printerFiscalReceipt>
</SOAP:Body>
</SOAP:Envelope>
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------