K
kwalike57
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)"/></
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)"/></
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
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="Invoices"/></FOLDERPATH></FOLDERPATH> said:</FOLDERPATH><FOLDERPATH><FOLDER FOLDERNAME="2007"/></
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="Invoices"/></FOLDERPATH></FOLDERPATH> said:</FOLDERPATH><FOLDERPATH><FOLDER FOLDERNAME="2007"/></
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