<?xml version="1.0" encoding="windows-1252"?>
<node id="996257" title="Re^2: More Soap::Lite" created="2012-09-28 13:35:02" updated="2012-09-28 13:35:02">
<type id="11">
note</type>
<author id="861528">
fritz1968</author>
<data>
<field name="doctext">
&lt;p&gt;Thanks for the code.  I modeled my code after yours and came up with the following:&lt;/p&gt;
&lt;code&gt;
    foreach $rHash (@userData)
    {
	my $tempString = ();
	$tempString=SOAP::Data-&gt;name('request' =&gt; \SOAP::Data-&gt;value(
              SOAP::Data-&gt;name('actionTime')-&gt;value($zTime),
	      SOAP::Data-&gt;name('id')-&gt;value($id1)-&gt;type('long'),
	      SOAP::Data-&gt;name('state')-&gt;value($state1)-&gt;type('string'),
	      SOAP::Data-&gt;name('result')-&gt;value($result1)-&gt;type('string')
		));
	push(@soapArray, $tempString);
    }# end foreach

    my $release_response = release($proxy, $xmlns, @soapArray);
&lt;/code&gt;
&lt;P&gt;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:&lt;br&gt;
     my $release_response = release($proxy, $xmlns, @soapArray);
&lt;br&gt;&lt;br&gt;

In the subroutine, I make the WSDL call:
&lt;/p&gt;
&lt;code&gt;
    my ($proxy1, $xmlns1, @array1) = @_;
        # IIS web services expect / as a separator for uri and method.
    my $lite = SOAP::Lite-&gt;new()-&gt;on_action(sub { join '/', @_ } )
	-&gt;proxy($proxy1),
           SOAP::Header-&gt;name('Authentication' =&gt;
	           SOAP::Header-&gt;value(
			 SOAP::Header-&gt;name('user')-&gt;value($zID),
		         SOAP::Header-&gt;name('password')-&gt;value($zPW)));
    
    
    my $response = $lite-&gt;call(
	   SOAP::Data-&gt;name('release')
	   -&gt;attr({ 'xmlns', $xmlns1}), @array1 );

    return $response;
&lt;/code&gt;&lt;p&gt;
The name of the array changes in the subroutine from @soapArray to @array1.&lt;br&gt;&lt;br&gt;

Again, thanks for the help.  It is much appreciated.&lt;br&gt;
Frank&lt;/p&gt;



</field>
<field name="root_node">
995573</field>
<field name="parent_node">
995628</field>
</data>
</node>
