Re: [twsocket] Newbie Question: How to use the HTTPCli component toconnect to USPS

2008-02-19 Thread Francois Piette
> I understand I need to use the HTTPCli component to connect to the
> webserver, but am having trouble in how to use and hope that someone on
this
> list would take pitty on me and help to guide me in how to accomplish
this.

Have you looked at HttpTst sample program ? I think it will do what you
need. So please check it and the ask for more questions if it is not clear.


Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
--
[EMAIL PROTECTED]
Author of ICS (Internet Component Suite, freeware)
Author of MidWare (Multi-tier framework, freeware)
http://www.overbyte.be


- Original Message - 
From: "SoftTech" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Monday, February 18, 2008 3:55 PM
Subject: [twsocket] Newbie Question: How to use the HTTPCli component
toconnect to USPS


> Greetings All,
>
> This is my first attempt at programing to communicate with a web server
and
> althought I have been a Delphi programer for 11 years mainly in the
database
> field, I'm a newbie at this kind of programming and I now remember how
> overwhelmed I was when first starting to learn Delphi.
>
> I'm currently using Delphi 5.1 and want to communicate with a web server
> hosted by USPS.
>
> Using the webtools proviced by USPS at
> http://www.usps.com/webtools/address.htm I would like to use their address
> correction and lookup tools from within my Delphi application.
>
> After reading their technical guides they do mention that software
> developers can also use these tools from within their own software.
>
> I have signed up to use there tools and have tested calling their web
server
> by simply plugging in the following HTTP url (which includes XML) and it
> works returning an XML value in internet explorer.  (Yeah)
>
> Here is what I need to do:
>
> I need to connect to a web server, send an xml message, the server
receives
> and respond to my
> message responding with XML.
>
> I can connect to a webserver using my internet browser and send it a
string
> of information like this:
>
>
http://SERVERNAME/ShippingAPITest.dll?API=CityStateLookup&XML=90210
>
> NOTE: SERVERNAME and USERID above are of course replaced with the actual
> server I'm logging onto and the User ID assigned to me
>
> and it returns a response like this in XML format that I see in my
internet
> browser
>
>   
> - 
> - 
>   90210
>   BEVERLY HILLS
>   CA
>   
>   
>
> I understand I need to use the HTTPCli component to connect to the
> webserver, but am having trouble in how to use and hope that someone on
this
> list would take pitty on me and help to guide me in how to accomplish
this.
>
> Any guidance on how to get started would really be appreciated.
>
> Thanks,
> Mike
>
>
> -- 
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Newbie Question: How to use the HTTPCli component toconnect to USPS

2008-02-18 Thread retnyg

S> URLDownloadToFile must be something found in a greater version than Delphi
S> 5.1

uses UrlMon;
or define to use the function from urlmon.dll yourself:
HRESULT URLDownloadToFile(  LPUNKNOWN pCaller,
LPCTSTR szURL,
LPCTSTR szFileName,
DWORD dwReserved,
LPBINDSTATUSCALLBACK lpfnCB
);

S> However, I was able to do something on my own using the wininet unit.

nice.

S> So again, thanks for your help,
S> Mike



S> just use the api function URLDownloadToFile for such an easy task. you
S> will find examples in google with "URLDownloadToFile delphi".
S> the only thing you have to be able is correct forming of the url
S> string .


greetz, ret




-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Newbie Question: How to use the HTTPCli component toconnect to USPS

2008-02-18 Thread SoftTech

Mit freundlichen Grüßen,

Thanks for your very helpful reply.

URLDownloadToFile must be something found in a greater version than Delphi 
5.1

However, I was able to do something on my own using the wininet unit.

So again, thanks for your help,
Mike

- Original Message - 
From: <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Monday, February 18, 2008 1:10 PM
Subject: Re: [twsocket] Newbie Question: How to use the HTTPCli component 
toconnect to USPS


Guten Tag SoftTech,

am Montag, 18. Februar 2008 um 15:55 schrieben Sie:

S> Return-Path: <[EMAIL PROTECTED]>
S> X-Flags: 1001
S> Delivered-To: GMX delivery to [EMAIL PROTECTED]
S> Received: (qmail invoked by alias); 18 Feb 2008 14:56:02 -
S> Received: from enterprise.codeboffins.com (EHLO
S> enterprise.codeboffins.com) [66.135.48.88]
S>   by mx0.gmx.net (mx081) with SMTP; 18 Feb 2008 15:56:02 +0100
S> Received: (qmail 6423 invoked from network); 18 Feb 2008 14:56:01 +
S> Received: from localhost (HELO enterprise.codeboffins.com) 
([EMAIL PROTECTED])
S>   by localhost with SMTP; 18 Feb 2008 14:56:00 +
S> Delivered-To: [EMAIL PROTECTED]
S> Received: (qmail 6338 invoked from network); 18 Feb 2008 14:55:59 +
S> Received: from eastrmmtao104.cox.net (68.230.240.46)
S> by enterprise.codeboffins.com with SMTP; 18 Feb 2008 14:55:59 
+
S> Received-SPF: none (enterprise.codeboffins.com: domain at softtechks.com 
does
S> not designate permitted sender hosts)
S> Received: from eastrmimpo03.cox.net ([68.1.16.126]) by 
eastrmmtao104.cox.net
S> (InterMail vM.7.08.02.01 201-2186-121-102-20070209) with ESMTP
S> id
S> <[EMAIL PROTECTED]>
S> for ; Mon, 18 Feb 2008 09:55:23 -0500
S> Received: from michael ([24.255.172.206]) by
S> eastrmimpo03.cox.net with bizsmtp
S> id r2sb1Y0044TYytC000; Mon, 18 Feb 2008 09:52:37 -0500
S> Message-ID: <[EMAIL PROTECTED]>
S> From: "SoftTech" <[EMAIL PROTECTED]>
S> To: "ICS support mailing" 
S> References:
S> 
<[EMAIL PROTECTED]><[EMAIL PROTECTED]>
S> <[EMAIL PROTECTED]>
S> Date: Mon, 18 Feb 2008 08:55:30 -0600
S> MIME-Version: 1.0
S> X-Priority: 3
S> X-MSMail-Priority: Normal
S> X-Mailer: Microsoft Outlook Express 6.00.2900.3138
S> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198
S> Subject: [twsocket] Newbie Question: How to use the HTTPCli component to
S> connect to USPS
S> X-BeenThere: twsocket@elists.org
S> X-Mailman-Version: 2.1.9
S> Precedence: list
S> Reply-To: ICS support mailing 
S> List-Id: ICS support mailing 
S> List-Unsubscribe:
S> <http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket>,
S> <mailto:[EMAIL PROTECTED]>
S> List-Archive: <http://lists.elists.org/pipermail/twsocket>
S> List-Post: <mailto:twsocket@elists.org>
S> List-Help: <mailto:[EMAIL PROTECTED]>
S> List-Subscribe:
S> <http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket>,
S> <mailto:[EMAIL PROTECTED]>
S> Content-Type: text/plain; charset="us-ascii"
S> Content-Transfer-Encoding: 7bit
S> Sender: [EMAIL PROTECTED]
S> Errors-To: [EMAIL PROTECTED]
S> X-Anti-Virus: Kaspersky Anti-Virus for MailServers
S> 5.5.12.2/Plesk_SWsoft, bases: 18022008 #531244, status: notchecked
S> X-GMX-Antivirus: -1 (not scanned, may not use virus scanner)
S> X-GMX-Htest: 0.53
S> X-GMX-Antispam: 0 (Mail was not recognized as spam)
S> X-GMX-UID: 7fHbE1M0bXBt0QX1FTQ2vsEqLyUmZcin

S> Greetings All,

S> This is my first attempt at programing to communicate with a web server 
and
S> althought I have been a Delphi programer for 11 years mainly in the 
database
S> field, I'm a newbie at this kind of programming and I now remember how
S> overwhelmed I was when first starting to learn Delphi.

S> I'm currently using Delphi 5.1 and want to communicate with a web server
S> hosted by USPS.

S> Using the webtools proviced by USPS at
S> http://www.usps.com/webtools/address.htm I would like to use their 
address
S> correction and lookup tools from within my Delphi application.

S> After reading their technical guides they do mention that software
S> developers can also use these tools from within their own software.

S> I have signed up to use there tools and have tested calling their web 
server
S> by simply plugging in the following HTTP url (which includes XML) and it
S> works returning an XML value in internet explorer.  (Yeah)

S> Here is what I need to do:

S> I need to connect to a web server, send an xml message, the server 
receives
S> and respond to my
S> message responding with XML.

S> I can connect to a webserver using my internet browser and send it a 
string
S> of informat