joshuahess has asked for the wisdom of the Perl Monks concerning the following question:
Code is as follows:
#!/usr/bin/perl use strict; use warnings; use LWP 5.64; my $browser = LWP::UserAgent->new; my $xml= qq[<?xml version="1.0" encoding="utf-8" ?> <LabelRequest Test="YES" LabelType="Default" LabelSize="4X6" ImageForm +at="PNG"> <RequesterID>xxxxxx</RequesterID> <AccountID>xxxxxx</AccountID> <PassPhrase>xxxxxx</PassPhrase> <MailClass>First</MailClass> <DateAdvance>0</DateAdvance> <WeightOz>15</WeightOz> <MailpieceShape>Parcel</MailpieceShape> <Stealth>FALSE</Stealth> <Services InsuredMail="OFF" SignatureConfirmation="OFF" /> <BarcodeFormat>CONCATENATED</BarcodeFormat> <Value>0</Value> <Description>Sample Label</Description> <PartnerCustomerID>12345ABCD</PartnerCustomerID> <PartnerTransactionID>6789EFGH</PartnerTransactionID> <ToName>Amine Khechfe</ToName> <ToCompany>PSI Systems, Inc.</ToCompany> <ToAddress1>247 High Street</ToAddress1> <ToCity>Palo Alto</ToCity> <ToState>CA</ToState> <ToPostalCode>84301</ToPostalCode> <ToZIP4>0000</ToZIP4> <ToDeliveryPoint>00</ToDeliveryPoint> <ToPhone>8005763279</ToPhone> <FromName>John Doe</FromName> <ReturnAddress1>123 Main Street</ReturnAddress1> <FromCity>Boise</FromCity> <FromState>ID</FromState> <FromPostalCode>83702</FromPostalCode> <FromZIP4>7261</FromZIP4> <FromPhone>8005551212</FromPhone> </LabelRequest>]; my $url = 'https://www.envmgr.com/LabelService/EwsLabelService.asmx/Ge +tPostageLabelXML'; my $response = $browser->post( $url, $xml ); print $response->content;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Post XML
by derby (Abbot) on Dec 06, 2007 at 17:53 UTC | |
by joshuahess (Novice) on Dec 07, 2007 at 01:20 UTC |