CA Client Automation

 View Only
  • 1.  Web Services - Unable to execute ScanPackageOnTargetComputers

    Posted May 31, 2017 01:03 PM

    Hi,

     

    I am trying to deploy a software package on a computer throught Client Automation Web Services but i am not being able to generate the request correctly of method 'ScanPackageOnTargetComputers'.

    I know the steps to perform a deployment are:

    1. Login
    2. ScanPackageOnTargetComputers (with LoginID of step 1)
    3. DeployPackage (with LoginID of step 1)
    4. Logout

     

    In step 2 i execute this request but i obtain the following error.

    I think the problem is with <scanPackageInfo>, i am not sure how to set the parameters packageName and productName.

     

    <?xml version="1.0" encoding="UTF-8" standalone="no" ?>
    <SOAP-ENV:Envelope
    xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:dsm="urn://www.ca.com/Unicenter/DSM/r11"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema">

       <SOAP-ENV:Body>
          <dsm:ScanPackageOnTargetComputers>
                    <sessionId>2FA9C66B0EF63F43ABD7D0C68065C2E2</sessionId>
                      <scanParameters>
                          <arrayOfTargetMachines>
                           <stringElements>IBA8246</stringElements>
                           </arrayOfTargetMachines>
                         <bTargetMachinesSupplied>1</bTargetMachinesSupplied>
                    </scanParameters>
                      <scanPackageInfo>
                             <productName>Llamador</productName>
                               <packageName>Llamador</packageName> 
                                <packageVersion>0</packageVersion>
                                <bPackageVersionSupplied>1</bPackageVersionSupplied>
                           </scanPackageInfo>
                      <jobName>Test-Computer_IBA8246ASDF</jobName>
          </dsm:ScanPackageOnTargetComputers>
        </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>

     

    Error obtained:

    <?xml version="1.0" encoding="UTF-8" ?>
    <SOAP-ENV:Envelopexmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns:xsd="http://www.w3.org/2001/XMLSchema"xmlns:xop="http://www.w3.org/2004/08/xop/include"xmlns:xmime5="http://tempuri.org/xmime5.xsd"xmlns:dsm2="urn://www.ca.com/Unicenter/DSM/r12"xmlns:dsm1="urn://www.ca.com/Unicenter/DSM/r11"xmlns:ASWS2="automationServiceSoapBinding"xmlns:ASWS1="urn:com.ca.dsm.automationwebservice">
    <SOAP-ENV:Body>
    <SOAP-ENV:Fault>
    <faultcode>DMA001010</faultcode>
    <faultstring>Error Description Not Available</faultstring>
    </SOAP-ENV:Fault>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>

     

    Hope someone can help me with this.

    Regards,

    Facundo



  • 2.  Re: Web Services - Unable to execute ScanPackageOnTargetComputers
    Best Answer

    Posted Jul 03, 2017 03:32 PM

    Hi Facundo,

     

    Are you attempting to deploy an agent (infrastructure deployment) or deploy a software package (software delivery)?

     

    I believe the confusion here is the purpose of the ScanPackageOnTargetComputers web services method.  It's related to the infrastructure deployment functionality, for setting up a job to deploy an agent to a computer that is currently not managed by ITCM.  i.e. in DSM Explorer --> Control Panel --> Deployment --> Infrastructure Deployment Wizard

     

    The entire section in the Web Services Reference Guide-- "Deployment Methods" is all about agent deployment-- hence the confusion between productName and packageName.  The purpose of this web service method is to scan the target PC to check whether it's deploy-able or not, in terms of pushing the ITCM agent, so it can be managed by ITCM.

     

    For deploying software packages to existing agents that are already deployed, which is what I believe you are looking to do, use the "Software Methods" section of the Web Services Guide:

     

    Software Methods - CA Client Automation - 14.0 - CA Technologies Documentation 

     

    -Brian



  • 3.  Re: Web Services - Unable to execute ScanPackageOnTargetComputers

    Posted Jul 03, 2017 04:15 PM

    If it helps, there's an example for creating a software job here:

    Creating a Software Job - CA Client Automation - 14.0 - CA Technologies Documentation 

     

    It's not in SoapUI format, but serves as an example that can be mirrored programmatically.

     

    -Brian