HTTP, XML & Tcl
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.tcl archive

HTTP, XML & Tcl

From: alf <amnon.friling@citicorp.com>
Date: Tue Feb 21 2006 - 22:12:25 CET

Hi

I need help posting an XML form to an HTTP server.
In general, this is what I want to do:

1. Connect to wctp.skytel.com:80
2. Move to wctp.skytel.com/wctp
3. Declare content type = "text/xml" ("text/html",
"text/plain")
4. Post the following:
<?xml version="1.0"?>
<!DOCTYPE wctp-Operation SYSTEM
"http://www.skytel.com/protocols/dtds/wctp/wctpv1-0.dtd">
<wctp-Operation wctpVersion="WCTP-DTD-1.1">
<wctp-SubmitClientMessage>
    <wctp-SubmitClientHeader
        submitTimestamp="2000-08-08T13:19:43"
>
        <wctp-ClientOriginator
            senderID="1234567"
        />
        <wctp-ClientMessageControl
            allowResponse="true"
            allowTruncation="true"
            deliveryPriority="HIGH"
            notifyWhenDelivered="true"
            notifyWhenQueued="true"
            notifyWhenRead="true"
            preformatted="true"
        />
        <wctp-Recipient
            recipientID="9999999"
        />
    </wctp-SubmitClientHeader>
    <wctp-Payload>
        <wctp-Alphanumeric>
            tst msg to internet email address
        </wctp-Alphanumeric>
    </wctp-Payload>
</wctp-SubmitClientMessage>
</wctp-Operation>

5. Get the response.

I do not need (yet?) to parse XML data.

I am a TCLer but know nothing about http. If I get this part right, I
will be able to take it from there.

Thanks
alf
Received on Sun Apr 30 02:11:45 2006