6 Replies Latest reply on Oct 4, 2017 7:40 AM by Bill Robinson

    BMC server automation 8.3 - Web Service - how to use NAMED_OBJECT

    BOURRIGAUD joel

      Hello all,

       

      i am working on migration of NSH script that is using blcli_execute commands into WebServices using CLITunnel operation.

      The following NSH script is working fine.

        # Push ACLs to server

        blcli_execute Server findByName-api $PARAMS[server]

        blcli_execute Utility storeTargetObject SERVER_OBJECT

        blcli_execute Server pushAcl-api NAMED_OBJECT=SERVER_OBJECT

       

      When I migrated to Web Service, I have considered "NAMED_OBJECT=SERVER_OBJECT" as an input arguments of WS operation "executeCommandByParamList".

      The WS response was "Server,pushAcl-api Method found but with mismatching arguments. Error was : Input 'NAMED_OBJECT=SERVER_OBJECT' cannot be converted to expected type : interface com.bladelogic.om.infra.model.server.Server"

       

      The entire SOAP XML response:

      <?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><soapenv:Fault><faultcode>soapenv:Server</faultcode><faultstring>CommandNotFoundException</faultstring><detail><ns6:CommandNotFoundException xmlns:ns6="http://bladelogic.com/webservices/skeleton/clitunnel"><ns6:CommandNotFoundException xmlns:ns2="http://bladelogic.com/webservices/cli/factory/xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns2:CommandNotFoundException"><Exception xmlns:s439="http://www.w3.org/2001/XMLSchema" xsi:type="s439:string">Server,pushAcl-api Method found but with mismatching arguments. Error was : Input 'NAMED_OBJECT=SERVER_OBJECT' cannot be converted to expected type : interface com.bladelogic.om.infra.model.server.Server</Exception></ns6:CommandNotFoundException></ns6:CommandNotFoundException></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope><?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><soapenv:Fault><faultcode>soapenv:Server</faultcode><faultstring>CommandNotFoundException</faultstring><detail><ns6:CommandNotFoundException xmlns:ns6="http://bladelogic.com/webservices/skeleton/clitunnel"><ns6:CommandNotFoundException xmlns:ns2="http://bladelogic.com/webservices/cli/factory/xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns2:CommandNotFoundException"><Exception xmlns:s440="http://www.w3.org/2001/XMLSchema" xsi:type="s440:string">Server,pushAcl-api Method found but with mismatching arguments. Error was : Input 'NAMED_OBJECT=SERVER_OBJECT' cannot be converted to expected type : interface com.bladelogic.om.infra.model.server.Server</Exception></ns6:CommandNotFoundException></ns6:CommandNotFoundException></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope><?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><soapenv:Fault><faultcode>soapenv:Server</faultcode><faultstring>CommandNotFoundException</faultstring><detail><ns6:CommandNotFoundException xmlns:ns6="http://bladelogic.com/webservices/skeleton/clitunnel"><ns6:CommandNotFoundException xmlns:ns2="http://bladelogic.com/webservices/cli/factory/xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns2:CommandNotFoundException"><Exception xmlns:s441="http://www.w3.org/2001/XMLSchema" xsi:type="s441:string">Server,pushAcl-api Method found but with mismatching arguments. Error was : Input 'NAMED_OBJECT=SERVER_OBJECT' cannot be converted to expected type : interface com.bladelogic.om.infra.model.server.Server</Exception></ns6:CommandNotFoundException></ns6:CommandNotFoundException></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>
      

       

       

      Thanks for your helps.

      Best regards,

      Joel BOURRIGAUD