CA Service Management

  • 1.  How to create a ticket using the web service ?

    Posted Jun 23, 2016 12:36 PM

    Dear , I wonder if there is the possibility of creating ticket using the web service and if there is any example available



  • 2.  Re:  How to create a ticket using the web service ?
    Best Answer

    Posted Jun 23, 2016 01:11 PM

    There's plenty of information regarding WS in the technical reference documentation.

     

    You need to use : createRequest.

     

    I'm assuming you are a programmer and expect you to understand that i'm not going to teach you how to code.

     

    Here's a powershell code snippet :

     

    $svc = New-WebServiceProxy -Uri http://servicedeskURL:8080/axis/services/USD_R11_WebService?wsdl
    #WS username.
    $wsUsername = "username"
    #WS password
    $wsPassword="password"
    #Login to get SID
    $sid = $svc.login($wsUsername,$wsPassword)
    #get customer handle
    $customerHandle = $svc.getHandleForuserID($sid,"customerUserName")
    #get creator handle
    $creatorHandle = $svc.getHandleForuserID($sid,"creatorUserName")
    #Get variables ready
    $prop = ""
    $attr = "persistent_id"
    $requestHandle = ""
    $requestNumber = ""
    $summary="Test incident"
    $description="Test incident"
    #get group handle
    [xml]$groupHandleReturn = $svc.doSelect($sid,"grp","last_name='GROUP_NAME'",1,"persistent_id")
    $groupHandle=$groupHandleReturn.UDSObjectList.UDSObject.Handle
    #get category handle
    [xml]$categoryHandleReturn = $svc.doSelect($sid,"pcat","sym='category name'",1,"persistent_id")
    $categoryHandle=$categoryHandleReturn.UDSObjectList.UDSObject.Handle
    #Attribute to set (key,value) array
    $attrVal = "customer", $customerHandle, "type","I","summary",$summary,"description",$description,"group",$groupHandle,"category",$categoryHandle
    #Create incident
    [xml]$newRequestHandle = $svc.createRequest($sid,$creatorHandle,$attrVal,$prop,"","id",[ref]$requestHandle, [ref]$requestNumber)
    
    
    $requestHandle
    $requestNumber
    
    
    
    

     

    You need to understand SDM objects and attributes in order to use WS.

     

     

    Regards,



  • 3.  Re:  How to create a ticket using the web service ?

    Posted Jun 23, 2016 01:59 PM

    Its work for me,

    thanks



  • 4.  Re:  How to create a ticket using the web service ?

    Broadcom Employee
    Posted Jun 23, 2016 02:01 PM


  • 5.  Re:  How to create a ticket using the web service ?