Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

Thanks for the code. I modeled my code after yours and came up with the following:

foreach $rHash (@userData) { my $tempString = (); $tempString=SOAP::Data->name('request' => \SOAP::Data->value( SOAP::Data->name('actionTime')->value($zTime), SOAP::Data->name('id')->value($id1)->type('long'), SOAP::Data->name('state')->value($state1)->type('string'), SOAP::Data->name('result')->value($result1)->type('string') )); push(@soapArray, $tempString); }# end foreach my $release_response = release($proxy, $xmlns, @soapArray);

Before the above code is executed, the user Data is retrieved from a WSDL and stored in an array - @userData - of hashes. That array of hashes is ran through a foreach loop to dynamically format each record to a string ($tempString) and then to add that string to an array (@soapArray). Then I call a subroutine and pass the necessary information to execute the WSDL call:
my $release_response = release($proxy, $xmlns, @soapArray);

In the subroutine, I make the WSDL call:

my ($proxy1, $xmlns1, @array1) = @_; # IIS web services expect / as a separator for uri and method. my $lite = SOAP::Lite->new()->on_action(sub { join '/', @_ } ) ->proxy($proxy1), SOAP::Header->name('Authentication' => SOAP::Header->value( SOAP::Header->name('user')->value($zID), SOAP::Header->name('password')->value($zPW))); my $response = $lite->call( SOAP::Data->name('release') ->attr({ 'xmlns', $xmlns1}), @array1 ); return $response;

The name of the array changes in the subroutine from @soapArray to @array1.

Again, thanks for the help. It is much appreciated.

In reply to Re^2: More Soap::Lite by fritz1968
in thread More Soap::Lite by fritz1968

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    and the rats come out to play...

    How do I use this? | Other CB clients
    Other Users?
    Others surveying the Monastery: (4)
    As of 2018-04-27 03:26 GMT
    Find Nodes?
      Voting Booth?