Antonio... I love women... But I swear I would kiss you several times... As Dragan says tax office informs protocols and blablablá, but there's no examples and instructions have errors too, and when you don't know exactly what you have to put and where you feel hopeless.
Thank you. Now I can finally start my work.
>>Hi friends:
>>
>>I need to send a XML string to an IP, actually is a fiscal printer. Then I need to receive the XML response from it...
>>
>>It is written easy, but I've been all the morning searching on the web and just found tones of explanations about consuming web services and xmladapters, and xmltocursor and so... and it is not what I'm looking for.
>>
>>Anyone knows how this can become a wonderful reality?
>>
>>Thank you.
>>
>> Héctor
>
>I assume that you already took care of preparing the XML data to send, so you only need to send it and get the response, right? So, here are the basics...
>
>
>LOCAL TargetURL AS String
>LOCAL XMLToSend AS String
>LOCAL Transporter AS MSXML2.ServerXMLHTTP60
>
>m.TargetURL = "http://fiscal.printer.ip"
>
>TEXT TO m.XMLToSend NOSHOW FLAGS 1
><?xml version="1.0" encoding="utf-8"?>
><root />
>ENDTEXT
>
>m.Transporter = CREATEOBJECT("MSXML2.ServerXMLHTTP.6.0")
>
>m.Transporter.Open("POST", m.TargetURL, .F.)
>m.Transporter.Setrequestheader("Content-type", "text/xml")
>m.Transporter.Send(m.XMLToSend)
>
>STRTOFILE(m.Transporter.Responsexml.xml, PUTFILE("Response:","response.xml","xml"))
>