Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

mpolo's scratchpad

by mpolo (Chaplain)
on Jun 01, 2004 at 20:43 UTC ( [id://358551]=scratchpad: print w/replies, xml ) Need Help??

---- Headers returned by code below HTTP/1.0 200 OK Content-Type: text/html Client-Date: Thu, 08 Jan 2004 12:51:58 GMT Client-Peer: 172.16.110.12:80 Client-Response-Num: 1 Refresh: 0; URL=https://www.cieups.com/ups.app/xml/Rate/ <HTML></HTML>
---- Begin program #!/usr/bin/perl use XML::Parser; use LWP::UserAgent; $lwp=LWP::UserAgent->new; $lwp->proxy(['http','https'],'http://zzzzz:xxxx@172.16.110.12:80/'); $XML=<<XML; <?xml version="1.0"?> <AccessRequest xml:lang="en-US"> <AccessLicenseNumber>xxxxx</AccessLicenseNumber> <UserId>xxxx</UserId> <Password>xxxxx</Password> </AccessRequest> <?xml version="1.0"?> <RatingServiceSelectionRequest xml:lang="en-US"> <Request> <TransactionReference> <CustomerContext>Rating and Service</CustomerContext> <XpciVersion>1.0001</XpciVersion> </TransactionReference> <RequestAction>Rate</RequestAction> <RequestOption>shop</RequestOption> </Request> <PickupType> <Qode>01</Qode> </PickupType> <Shipment> <Shipper> <Address> <PostalCode>30076</PostalCode> </Address> </Shipper> <ShipTo> <Address> <PostalCode>30041</PostalCode> </Address> </ShipTo> <Service> <Qode>11</Qode> </Service> <Package> <PackagingType> <Qode>02</Qode> <Description>Package</Description> </PackagingType> <Description>Package</Description> </PackagingType> <Description>Rate Shopping</Description> <PackageWeight> <Weight>33</Weight> </PackageWeight> </Package> <ShipmentServiceOptions/> </Shipment> </RatingServiceSelectionRequest> XML push @{ $lwp->requests_redirectable }, 'POST'; $request=HTTP::Request->new(POST =>'https://www.cieups.com/ups.app/xml +/Rate/'); $request->header('content-type'=>'application/x-www-form-urlencoded'); $request->header('content-length'=>length($XML)); print length($XML); $request->content($XML); $response=$lwp->request($request); print "\n"; #print $request->as_string; #äprint $response->status_line; #print $response->content; print $response->as_string;
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (3)
As of 2025-07-19 18:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.