kdmurphy001 has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl use XML::Simple; use Data::Dumper; use strict; use warnings; my $HOST1='https://ws.fluffybunnies.com/zyxws/zyxws'; my $HOST2='https://ws.fluffybunnies.com/xyzws/xyzws'; my $ADMIN_UID='rabbit.lover@rabbits.com'; my $ADMIN_PASS= $ARGV[0]; my $Token=''; my $Title=''; $Token = `curl --insecure -Ss -d '<?xml version="1.0" ?><S:Envelope xm +lns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:Body><ns5:getTok +en xmlns:ns2="java:com.tl.zyxws" xmlns:ns3="java:language_builtins.la +ng" xmlns:ns4="java:com.tl.zyxws.parameters" xmlns:ns5="http://ws.flu +ffybunnies.com:80/zyxws"><ns4:password>'$ADMIN_PASS'</ns4:password><n +s4:uid>'$ADMIN_UID'</ns4:uid></ns5:getToken></S:Body></S:Envelope>' - +-header "Content-Type: text/xml; charset=utf-8" $HOST1 | egrep -o '[A +-Z0-9]{32,}'`; print "Token: ".$Token."\n"; $Title = `curl --insecure -Ss -d '<?xml version="1.0" ?><S:Envelope xm +lns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:Body><ns5:getTit +le xmlns:ns2="java:com.tl.xyzws" xmlns:ns3="java:language_builtins.la +ng" xmlns:ns4="java:com.tl.xyzws.parameters" xmlns:ns5="http://ws.flu +ffybunnies.com:80/xyzws"><ns4:isbn>123456789</ns4:isbn><ns4:epi>12121 +212121212121212</ns4:epi><ns4:token>'$Token'</ns4:token></ns5:getTitl +e></S:Body></S:Envelope>' --header "Content-Type: text/xml; charset=u +tf-8" $HOST2`; my $xml = new XML::Simple; my $data = $xml->XMLin($Title);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: System tick and CURL not interrpeting variable
by NetWallah (Canon) on Dec 12, 2015 at 00:33 UTC | |
|
Re: System tick and CURL not interrpeting variable
by Anonymous Monk on Dec 12, 2015 at 00:59 UTC | |
by afoken (Chancellor) on Dec 12, 2015 at 20:02 UTC |