cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements

315
Views
0
Helpful
0
Replies
Highlighted
Beginner

Error Trying to get device status via RisPort SOAP Service (Cucm 8.5 and 10.5)

All,

     I feel that I am really close, but I am not able to retrieve a phone's status via the selectCmDevice Operation of the  RisPort SOAP Service.

 

Here is my perl Code:

#!/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/RisPort"); ###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;

  1. <?xml version="1.0" encoding="utf-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><soapenv:Fault><faultcode>soapenv:Server.userException</faultcode><faultstring>org.xml.sax.SAXException: Invalid element in com.cisco.ccm.serviceability.soap.risport.CmSelectionCriteria - DeviceClass</faultstring><detail><ns1:stackTrace xmlns:ns1="http://xml.apache.org/axis/">org.xml.sax.SAXException: Invalid element in com.cisco.ccm.serviceability.soap.risport.CmSelectionCriteria - DeviceClass  
  2.         at org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(BeanDeserializer.java:258)  
  3.         at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)  
  4.         at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)  
  5.         at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)  
  6.         at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)  
  7.         at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)  
  8.         at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:81)  
  9.         at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)  
  10.         at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)  
  11.         at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)  
  12.         at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)  
  13.         at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:454)  
  14.         at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)  
  15.         at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)  
  16.         at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)  
  17.         at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)  
  18.         at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)  
  19.         at sun.reflect.GeneratedMethodAccessor195.invoke(Unknown Source)  
  20.         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)  
  21.         at java.lang.reflect.Method.invoke(Method.java:597)  
  22.         at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:269)  
  23.         at java.security.AccessController.doPrivileged(Native Method)  
  24.         at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)  
  25.         at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:301)  
  26.         at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)  
  27.         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:283)  
  28.         at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:56)  
  29.         at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:189)  
  30.         at java.security.AccessController.doPrivileged(Native Method)  
  31.         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:185)  
  32.         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)  
  33.         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)  
  34.         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:563)  
  35.         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)  
  36.         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)  
  37.         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:555)  
  38.         at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:394)  
  39.         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)  
  40.         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)  
  41.         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)  
  42.         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)  
  43.         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)  
  44.         at java.lang.Thread.run(Thread.java:662)  

Something tells me that the error may be around the <SelectItems> tag because I am not sure that the child structure is adequate. I am also unsure that the URI, and proxy were constructed properly, lastly, I know that a sequence # is needed, I am unsure of how to include that as part of the request.

CreatePlease to create content
Content for Community-Ad
August's Community Spotlight Awards