in reply to Re^2: Displaying SOAP Request and Response
in thread Displaying SOAP Request and Response

set up Children for the "SelectItems" element

I showed that here

for (6963..6965){ push @items,SOAP::Data->name( "item"=> \SOAP::Data->value( SOAP::Data->name("Item"=> $_) )); }; . . "SelectItems" => $items,

Just change the 6963..6965 to an array @device of your own device numbers. If they are in a file then use something like this perhaps

open IN,'<', $path_file or die "Could not open $path_file : $!"; my @device = (); while (<IN>){ if (m/(SEP[0-9A-Z]+)/i){ push @device,$1; } } close IN;

Note you have a error (extra comma) in this line

my $data  = SOAP::Data->name('CmSelectionCriteria' ,  => \%select);
poj

Replies are listed 'Best First'.
Re^4: Displaying SOAP Request and Response
by adamZ88 (Beadle) on Mar 09, 2017 at 16:33 UTC

    Thank you for the clarification. I corrected my code and the result is more like what I need. The session Id is still missing from my envelope. Apparently it belongs in the header, like so:

    <soap:Header> <tns:AstHeader id="id1"> <SessionId xsi:type="xsd:string">SessionId</SessionId> </tns:AstHeader> </soap:Header>

    I know that my current code does not specify anything in the header. Doing some research I see that instead of SOAP::Data, I would use SOAP::Header right? BUt how exactly do I do this? Thanks.

      Try

      my $header = SOAP::Header->name("tns:AstHeader" => { SessionId => "SessionID" } ); $header->attr({ id => "id1" } ); my $response = $CUCM->selectCmDevice($header,..);
      poj
Re^4: Displaying SOAP Request and Response
by adamZ88 (Beadle) on Mar 09, 2017 at 16:37 UTC

    Also, my envelope always gets constructed in different order?