Login  
Search All Forums
Dart Home | PowerTCP Web for ActiveX | Custom Development Reply | PowerTCP Web for ActiveX Topics | Forums   
AuthorForum: PowerTCP Web for ActiveX
Topic: Webtool post
scottrassbach

From: Waterloo, WI USA
Posts: 7
Member Since: 05/19/03
posted May 7, 2004 5:59 AM

I'm trying to post to UPS, and they have a very specific header format. The post needs to look like this:

--BOUNDARY
Content-type: application/x-www-form-urlencoded
Content-length: 134

AppVersion=1.0&AcceptUPSLicenseAgreement=YES&ResponseType=application/x-ups-pld&VersionNumber=V4R1&UserId=PLDDSTEST&Password=PLDDSTEST

--BOUNDARY
Content-type: application/x-ups-binary
Content-length: 719

020094                 2003081300000590000000200  000000001*AA0TEST0  DE        5900000002000001*BA1Z0TEST06800000018         00001+0000000000000010 +0000000000000000KGS11PRE10                  3CMEUR000001*CA18                  United Parcel Service       Goerlitzer Str 1                                             Neuss               41460  DE                            *PA1Z0TEST06800000018         02+0000010                                           +0000000+00000000+00000000+00000000*SA000004

--BOUNDARY--

I'm using VB.NET. Is there a way to accomplish this with the web tool? I'm not so concerned about the section with content type application/x-ups-binary, as I can generate that successfully. What I need to do is get the headers right for the section at the first boundary.  I'm new to Posting, so I could use some help.

thanks,

-Scott
Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted May 7, 2004 9:17 AM

Take a look at the MultiPart post sample. If you don't have it, get the latest setup from our website.
Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted May 7, 2004 9:21 AM

On second glance, I don't think that's going to help, since the application/x-ups-binary type would not be set by us.

Looks like you would have to create the entire request (like you did above) and set it to the Data parameter when you call Post
scottrassbach

From: Waterloo, WI USA
Posts: 7
Member Since: 05/19/03
posted May 9, 2004 10:33 PM

I do that, and it gives me an error, saying it can't find the AppVersion parameter. I'll get the exact error and post it tomorrow.
scottrassbach

From: Waterloo, WI USA
Posts: 7
Member Since: 05/19/03
posted May 13, 2004 2:38 PM

When I post with the data all sent in the "Data" parameter, this is the response I get:

--BOUNDARY
Content-type: text/html
Content-length: 138

<HTML>
<HEAD>
<TITLE>UPS Internet Software</TITLE>
</HEAD>
<BODY>
<P>UPS Internet Software, Copyright UPS 1998</P>
</BODY>
</HTML>

--BOUNDARY
Content-type: application/x-ups-psmpld
Content-length: 104

UPSOnLine%null%6931%6800AppVersion missing.                            

--BOUNDARY
Content-type: application/x-ups-pld
Content-length: 110

00010000009710000008800026800AppVersion missing.                              

--BOUNDARY--

Any help?

Here's the data I'm posting:

--BOUNDARY
Content-type: application/x-www-form-urlencoded
content-length: 130
AppVersion=1.0&AcceptUPSLicenseAgreeement=Yes&ResponseType=application/x-ups-pld&versionNumber=V4R1&UserId=trek530&Password=lance2
--BOUNDARY
Content-type: application/x-ups-binary
Content-length: 146110

020094                 2004051300000590558411200  000000001*AA83189Y  NL        5905584112000131*BA1Z83189Y6860014291         00001+00000000000000550+0000000000000000KGS11PRE10                  3CMEUR000001*CA06Geneo Helmlink           Bike Europe BV           Bijsterhuizen 25-03                                           Wijchen              6604LM  NL31246487570          83189Y          *CA18                  Fun Corner             Deisterstra?e 84                                             Hameln               31785  DE0515114343           83189Y          *FA001 456124               *IA83189YL8JWB1Bicycle Parts and Accessories                     *PA1Z83189Y6860014291         02+0000055                         Bicycle Parts and Accessories    +0000000+00000000+00000000+00000000*FA003 456124               *SA000008

--BOUNDARY
Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted May 13, 2004 2:40 PM

Have you spoken with anyone at UPS about how to get this working?
scottrassbach

From: Waterloo, WI USA
Posts: 7
Member Since: 05/19/03
posted May 13, 2004 2:44 PM

Yeah. They tell me this is the format. I'm hoping someone here has some more insight for me.
Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted May 13, 2004 2:49 PM

Sorry, but I don't. Try writing directly to David Harry (sales@dart.com) to find out whether we could try to figure this out for you as a consulting project.
Reply | PowerTCP Web for ActiveX Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX