Poj You have me very close to figuring this out. I am uncertain that you are a Cisco Voice guy, so you may not have a solution to my current issues, but I will post my updated code below. I do get errors printed out to the file and the errors seem to come from Cisco Communications manager. What you could help me with is being able to set up Children for the "SelectItems" element. As you can see my updated code, I did this is a very naive way, I think.

#!/usr/bin/perl my $cucm_ip = "10.74.13.228"; my $user_axl = "user"; my $password_axl = "password"; my $dev ="SEPE8BA70FB8CB5"; ###################################################################### +######################### $ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = 0; use SOAP::Lite; BEGIN { sub SOAP::Transport::HTTP::Client::get_basic_credentials { return ($user_axl => $password_axl) } } my $CUCM = SOAP::Lite ->uri("http://schemas.cisco.com/ast/soap/action/#RisPort# +selectCmDevice") #->uri("http://schemas.cisco.com/ast/soap/") ->proxy("https://$cucm_ip:8443/realtimeservice/services/Ris +Port"); ###Maybe ?wsdl"); #->proxy("loopback://"); $CUCM->outputxml(1); $CUCM->readable(1); #$CUCM->envprefix('soapenv'); #$CUCM->ns($uri,'soap'); $CUCM->autotype(0); print "The Device $dev\n\n\n"; #####i################################################################ +############################# my %select =( "MaxReturnedDevices" => 200, "DeviceClass" => "Any", "Model" => 255, "Status" => 'Any', "NodeName" => '', "SelectBy" => 'Name', "SelectItems" => "<item><Item>$dev</Item></item>", "Protocol" => 'Any', "DownloadStatus" => 'Any' ); ################################################################# my $state = SOAP::Data->name('StateInfo',''); my $data = SOAP::Data->name('CmSelectionCriteria' , => \%select); my $elem = SOAP::Data->type('data' => $data); my $response = $CUCM->selectCmDevice($state,$elem); ##my $status=$response->valueof('//return/row/Status'); ##print "status is : $status\n\n"; open OUT,'>','soap.xml' or die "$!"; print OUT $response; close OUT;

Also, I was building an envelope for a different version of CUCM than I have, please see below for the right format. I see that the elements have attributes, do I need to include those in my message? If so, how is this achieved? I know for sure there should be an attribute to the CmSelection Criteria, this is a session Id. Can you please help me include that in my code?

<?xml version="1.0" encoding="utf-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envel +ope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <ns1:SelectCmDevice soapenv:encodingStyle="http://schemas.xmlsoap.org +/soap/encoding/" xmlns:ns1="http://schemas.cisco.com/ast/soap/"> <StateInfo xsi:type="xsd:string"/> <CmSelectionCriteria href="#id0"/> </ns1:SelectCmDevice> <multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns2:CmSelectionCriteria" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="http://schemas.cisco.com/ast/soap/"> <MaxReturnedDevices xsi:type="xsd:unsignedInt">200</MaxReturnedDevice +s> <Class xsi:type="xsd:string">Any</Class> <Model xsi:type="xsd:unsignedInt">255</Model> <Status xsi:type="xsd:string">Registered</Status> <NodeName xsi:type="xsd:string" xsi:nil="true"/> <SelectBy xsi:type="xsd:string">Name</SelectBy> <SelectItems soapenc:arrayType="ns2:SelectItem[1]" xsi:type="soapenc: +Array"> <item href="#id1"/> </SelectItems> </multiRef> <multiRef id="id1" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns3:SelectItem" xmlns:ns3="http://schemas.cisco.com/ast/soap +/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"> <Item xsi:type="xsd:string">*</Item> </multiRef> </soapenv:Body> </soapenv:Envelope>

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

Title:
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, details, 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, summary, 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.