Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Community Member

RPC Argument Passing

Hi,

I am trying to set up an RPC detector that runs an applet. The Applet currently just contains CLI commands, but I would like to use arguments passed from the SOAP request in the CLI commands. From the RPC syntax, the following should be accepted:

<?xml version="1.0"?>

<SOAP:Envelope xmlns:SOAP="http://www.cisco.com/eem.xsd">

<SOAP:Body>

  <run_emscript>

    <script_name> name of script </script_name>

    <argc> argc value </argc>

    <arglist>

    <l> argv1 value </l>

    <l> argv2 value </l>

          ...

    <l> argvn value </l>

    </arglist>

  </run_Eemscript>

</SOAP:Body>

</SOAP:Envelope>

My simple message is as follows:

<?xml version="1.0" encoding="UTF-8"?>

<SOAP:Envelope xmlns:SOAP="http://www.cisco.com/eem.xsd">

  <SOAP:Body>

    <run_eemscript>

      <script_name>Event_RPC</script_name>

      <argc> argc test </argc>

      <arglist>

           <l> argv1 100</l>

       </arglist>

    </run_eemscript>

  </SOAP:Body>

</SOAP:Envelope>

However, whenever the <arglist> is included I receive an error code response. I would expect the arglist to be accepted and an action command something like the following to be accepted:

action 1.0 cli command "switchport access vlan $_rpc_arg1"

Has anyone had experience with this?

Thanks,

Jason

Everyone's tags (2)
1 ACCEPTED SOLUTION

Accepted Solutions
Cisco Employee

Re: RPC Argument Passing

That's an (ell) not a <1>.  Your arguments are:

100

200

4 REPLIES
Cisco Employee

Re: RPC Argument Passing

You need to omit the "argc" and "argv" literals.  Your SOAP message will look like:

http://www.cisco.com/eem.xsd">

 

   

      Event_RPC

      1

     

           100

      

   

 

Remember, argc is a count of the number of arguments.  You should also look at my Perl API for this.  It makes doing a lot of these things much easier.

https://supportforums.cisco.com/docs/DOC-19523

Community Member

Re: RPC Argument Passing

I have tried the suggestion, but now receive the following response:


http://www.cisco.com/eem.xsd">
 
   
      Event_RPC
      2
     
        <1>100

        <2>200

 
   

 
]]>]]>

got data:

"http://www.cisco.com/eem.xsd\">-15844577'Embedded Event Manager' detected the 'fatal' condition 'unknown event ID']]>]]>\r\n"

Cisco Employee

Re: RPC Argument Passing

That's an (ell) not a <1>.  Your arguments are:

100

200

Community Member

Re: RPC Argument Passing

Thats it.

Thanks,

Jason

1040
Views
0
Helpful
4
Replies
CreatePlease to create content