How to submit an HTTP Request with XML



Hello. I need to build a process in an existing Perl script the
submits an http request with some XML.

I have never done this in Perl and I need to know which modules to use
and how to compose the syntax in the script to send this request.

Here is what the fully composed request needs to look like:

http://ppld.corp.sprint.com/wlsapps2/livelink_wls/Upload91?control=<?xml
version="1.0" encoding="ISO-8859-1"?><LIVELINKUPLOAD ID="1"><LOADINFO
Host="DOC-SHARE" LOGIN="xxxxxxx" PASSWORD="xxxxxxx"
DELETESOURCE="TRUE" OUTPUT="XML" LOADTYPE="PATH"/><FILEINFO
FILENAME="TRS_926106383.pdf"
FTPFILENAME="926106383.pdf"><FOLDERPATH><FOLDER
FOLDERNAME="Information Technology"/></FOLDERPATH><FOLDERPATH><FOLDER
FOLDERNAME="IT Billing and Customer Care Systems (CBS)"/></
FOLDERPATH><FOLDERPATH><FOLDER FOLDERNAME="CBS - Customer Billing
Services"/></FOLDERPATH><FOLDERPATH><FOLDER FOLDERNAME="TRS Billing"/
</FOLDERPATH><FOLDERPATH><FOLDER FOLDERNAME="2007"/></
FOLDERPATH><FOLDERPATH><FOLDER FOLDERNAME="Invoices"/></FOLDERPATH></
FILEINFO></LIVELINKUPLOAD>

If I paste this request string into a browser from the host machine
where the Perl script will run from it executes perfectly, basically
taking the .pdf file named in the command and uploading it to an
online document library called Doc-Share where it is then viewable to
users who log in.

It also deletes the source .pdf file from an SFTP server where
the .pdf files reside prior to upload to Doc-Share.

Please let me know how I would add this automation to Perl.

I have already written the Perl to generate the XML containing the
name of each .pdf file that needs to upload. I have used the
XML:Simple to parse the XML string and hold it in a variable, "<?xml
version="1.0" encoding="ISO-8859-1"?><LIVELINKUPLOAD ID="1"><LOADINFO
Host="DOC-SHARE" LOGIN="xxxxxxx" PASSWORD="xxxxxxx"
DELETESOURCE="TRUE" OUTPUT="XML" LOADTYPE="PATH"/><FILEINFO
FILENAME="TRS_926106383.pdf"
FTPFILENAME="926106383.pdf"><FOLDERPATH><FOLDER
FOLDERNAME="Information Technology"/></FOLDERPATH><FOLDERPATH><FOLDER
FOLDERNAME="IT Billing and Customer Care Systems (CBS)"/></
FOLDERPATH><FOLDERPATH><FOLDER FOLDERNAME="CBS - Customer Billing
Services"/></FOLDERPATH><FOLDERPATH><FOLDER FOLDERNAME="TRS Billing"/
</FOLDERPATH><FOLDERPATH><FOLDER FOLDERNAME="2007"/></
FOLDERPATH><FOLDERPATH><FOLDER FOLDERNAME="Invoices"/></FOLDERPATH></
FILEINFO></LIVELINKUPLOAD>" .

I have the http request in a separate variable as "http://
ppld.corp.sprint.com/wlsapps2/livelink_wls/Upload91?control=".

I then plan on running the http request with the XML string for
each .pdf file, 46 .pdf files in all.

Let me know if I need to provide any additional info to better
describe the process.

Thanks for your help.

Karin Walike
.



Relevant Pages

  • Re: How to submit an HTTP Request with XML
    ... submits an http request with some XML. ... I have never done this in Perl and I need to know which modules to use ... and how to compose the syntax in the script to send this request. ...
    (comp.lang.perl.misc)
  • Re: How to submit an HTTP Request with XML
    ... kwalike57 wrote: ... submits an http request with some XML. ... I have never done this in Perl and I need to know which modules to use ...
    (comp.lang.perl.misc)
  • need help for this project......
    ... I am new to XML and PERL and I have a few questions the answers to ... user and makes an XML file from the fetched data. ... will scrape data from the T-Mobile web page to an XML file. ...
    (comp.lang.perl.misc)
  • Re: Help with validating XML (DTD or Schema) with PERL
    ... to handle DTD or Schemas? ... Amongst the many things I've happily & successfully done with Perl & ... parsing XML is not one. ... original thought I would easily find a FILTER to handle DTD or Schema ...
    (comp.lang.perl.modules)
  • Re: :Oracle - Any advance on inserting CLOB to XMLTYPE?
    ... perl xmltypeinsert-testcase.pl ORCL scott tiger 63 ... DBI v1.47 ... >> with them (aside from convert the text into XML). ... >> insert on the table with the XMLTYPE in it. ...
    (perl.dbi.users)