=div>
On 20 Nov 2010, at 12:08, Steve Raslevich =wrote:
Hello everyone,
Could someone tell me what is wrong with the the code below to connectto ups.com? The reply I'm getting is:
=EF=BB=BFError: couldn't connect to host[
ups.com/ups.app/xml/Rate]=
[text]reply=3D[tcpconnecthost=3Dups.com/ups.app/xml/Rate&port=3D443&ssl=3Dt]
[tcpsend]POST /transaction HTTP/1.0[unurl]%0D%0A[/unurl][!]
[/!]USER-AGENT: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)
[unurl]%0D%0A[/unurl][!]
[/!]Content-Type:text/namevalue[unurl]%0D%0A[/unurl][!]
=[/!]Content-Length:[CountChars][content][/CountChars][unurl]%0D%0A[/unurl]=[!]
[/!][unurl]%0D%0A[/unurl][!]
[/!][content][unurl]%0D%0A[/unurl][!]
[/!][/tcpsend]
[/tcpconnect]
[/text]
Thank you,
Steve
--=20Steve RaslevichPresident/CEONorthern Sound & Light, Inc.11 Shingiss StreetMcKees Rocks, Pennsylvania 15136Phone: (412) 331-1000Fax: (412) 331-1035http://www.northernsound.net-------------------------------------------------------------------This Email and any files transmitted with it contain confidential, =non-public information intended solely for the use of the individual to =whom or the entity to which they are addressed. Unauthorized use, =reproduction, distribution or communication of this message or any =information contained or attached to this message is strictly prohibited =and may be unlawful.=20If you have received this email in error please notify the sender =immediately by e-mail or contact Northern Sound & Light at frontdesk@northernsound.net or (412) 331-1000.=-------------------------------------------------------------------
=--Apple-Mail-27-572141259--
Associated Messages, from the most recent to the oldest:
--Apple-Mail-27-572141259Content-Transfer-Encoding: quoted-printableContent-Type: text/plain;charset=utf-82 things1. Think the tcpconnect host command needs to have host only.=20ie=20> [tcpconnect host=3Dups.com/ups.app/xml/Rate&port=3D443&ssl=3Dt]becomes[tcpconnect host=3Dups.com&port=3D443&ssl=3Dt]
[tcpsend]POST /ups.app/xml/Rate/transactionetcalso, for some domains, you needs to stick the HTTP header=20Host: {hostname}so you would haveHost: ups.comhere.I've also had some trouble in past with SSL & TCPso you could try
[shell]curl -d "myvar1=3Dnuts&myvar2=3Dbolts" ="https://ups.com/ups.app/xml/Rate/transaction"[/shell]TCOn 20 Nov 2010, at 12:08, Steve Raslevich wrote:> Hello everyone,>=20> Could someone tell me what is wrong with the the code below to connect =to ups.com? The reply I'm getting is:> =EF=BB=BFError: couldn't connect to host [ups.com/ups.app/xml/Rate]=20>=20>
[text]reply=3D[tcpconnect =host=3Dups.com/ups.app/xml/Rate&port=3D443&ssl=3Dt]>
[tcpsend]POST /transaction HTTP/1.0
[unurl]%0D%0A[/unurl]
[!]> [/!]USER-AGENT: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)>
[unurl]%0D%0A[/unurl]
[!]> [/!]Content-Type:text/namevalue
[unurl]%0D%0A[/unurl]
[!]> =[/!]Content-Length:
[countchars][content][/CountChars]
[unurl]%0D%0A[/unurl]=
[!]> [/!]
[unurl]%0D%0A[/unurl]
[!]> [/!][content]
[unurl]%0D%0A[/unurl]
[!]> [/!][/tcpsend]> [/tcpconnect]> [/text]>=20>=20> Thank you,> Steve>=20>=20>=20>=20>=20>=20>=20>=20>=20>=20> --=20> Steve Raslevich> President/CEO> Northern Sound & Light, Inc.> 11 Shingiss Street> McKees Rocks, Pennsylvania 15136>=20> Phone: (412) 331-1000> Fax: (412) 331-1035>=20> http://www.northernsound.net>=20> -------------------------------------------------------------------> This Email and any files transmitted with it contain confidential, =non-public information intended solely for the use of the individual to =whom or the entity to which they are addressed. Unauthorized use, =reproduction, distribution or communication of this message or any =information contained or attached to this message is strictly prohibited =and may be unlawful.=20>=20> If you have received this email in error please notify the sender =immediately by e-mail or contact Northern Sound & Light at =frontdesk@northernsound.net or (412) 331-1000.> ---------------------------------------------------------------------Apple-Mail-27-572141259Content-Transfer-Encoding: quoted-printableContent-Type: text/html;charset=utf-8
2 things
1. Think the tcpconnect host =command needs to have host =only.
ie
[tcpconnect =host=3Dups.com/ups.app/xml/Rate&port=3D443&ssl=3Dt]<=/div>
becomes
[tcpconn=ect =host=3Dups.com&port=3D443&ssl=3Dt]
etc
also, for some domains, you needs to stick =the HTTP header
Host: ={hostname}
so you would =have
here.
I've also had some =trouble in past with SSL & TCP
so you could =try
[shell]curl -d ="myvar1=3Dnuts&myvar2=3Dbolts" "https://
ups.com/ups.app/xml/Rate/transaction"[/shell]<=/div>
TC
=div>
On 20 Nov 2010, at 12:08, Steve Raslevich =wrote:
Hello everyone,
Could someone tell me what is wrong with the the code below to connectto ups.com? The reply I'm getting is:
=EF=BB=BFError: couldn't connect to host[
ups.com/ups.app/xml/Rate]=
[text]reply=3D[tcpconnecthost=3Dups.com/ups.app/xml/Rate&port=3D443&ssl=3Dt]
[tcpsend]POST /transaction HTTP/1.0[unurl]%0D%0A[/unurl][!]
[/!]USER-AGENT: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)
[unurl]%0D%0A[/unurl][!]
[/!]Content-Type:text/namevalue[unurl]%0D%0A[/unurl][!]
=[/!]Content-Length:[countchars][content][/CountChars][unurl]%0D%0A[/unurl]=[!]
[/!][unurl]%0D%0A[/unurl][!]
[/!][content][unurl]%0D%0A[/unurl][!]
[/!][/tcpsend]
[/tcpconnect]
[/text]
Thank you,
Steve
--=20Steve RaslevichPresident/CEONorthern Sound & Light, Inc.11 Shingiss StreetMcKees Rocks, Pennsylvania 15136Phone: (412) 331-1000Fax: (412) 331-1035http://www.northernsound.net-------------------------------------------------------------------This Email and any files transmitted with it contain confidential, =non-public information intended solely for the use of the individual to =whom or the entity to which they are addressed. Unauthorized use, =reproduction, distribution or communication of this message or any =information contained or attached to this message is strictly prohibited =and may be unlawful.=20If you have received this email in error please notify the sender =immediately by e-mail or contact Northern Sound & Light at frontdesk@northernsound.net or (412) 331-1000.=-------------------------------------------------------------------
=--Apple-Mail-27-572141259--
Toby Cox
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
Running _every_ page through WebCat ? (1997)
WCS Newbie question (1997)
searches with dash, period etc. (2000)
Using [detete] (1998)
web delivery (1997)
Feedback Please (2003)
Bug? (1997)
international time (1997)
DNS Lookup 2 (2000)
Help! WebCat2 bug (1997)
WebCatalog Programmer looking for a new job (2001)
[WebDNA] Is [math] on a number with too many digits the only (2011)
Emailer (1997)
PCS Frames (1997)
why won't this work, please tell me??? (2001)
[isfile] ? (1997)
OT: Please set your computer's clock (1997)
OT: Weird table rendering w/ WebCat in Explorer (2005)
Make sure I understand this??? (1997)
SOP for WebDNA talk (2004)