CA Service Management

Expand all | Collapse all

Can we update Business Units and Authorization Levels using SOAP

  • 1.  Can we update Business Units and Authorization Levels using SOAP

    Posted Aug 18, 2018 06:44 PM

    Can we update Business Units and Authorization Levels for users using SOAP?



  • 2.  Re: Can we update Business Units and Authorization Levels

    Broadcom Employee
    Posted Aug 20, 2018 02:03 AM

    Good Morning Kunal.

    To check for the possibilites in Web Services, please check the following:
    1 Login to the SC-UI
    2 Goto Administration/Tools/Links/Web Services API
    3 Select 'BusinessUnit Web Service'
    4 Select 'User Web Service'

    And then see in there for the options as available.

    Thanks and kind regards, Louis.



  • 3.  Re: Can we update Business Units and Authorization Levels using SOAP

    Posted Aug 20, 2018 03:31 PM

    We already followed those steps , i was trying addContactToBusinessUnit Method to update table "usm_contact_domain" but that does not work.

    could you help me with the exact method name? 



  • 4.  Re: Can we update Business Units and Authorization Levels using SOAP

    Broadcom Employee
    Posted Aug 20, 2018 10:38 AM

    Hi Kunal,

     

    You can use the editUser method from User WebService. More details in the following document:

    Where to find information about CA Service Catalog - CA Knowledge 

     

    Regards,

    Pablo



  • 5.  Re: Can we update Business Units and Authorization Levels using SOAP

    Broadcom Employee
    Posted Aug 22, 2018 07:37 AM

    Good Afternoon Kunal.

     

    Possibly, the following will help you further on this?

    Kind regards, Louis.

     

    SOAPUI: http://WINx64:8083/usm/services/UserService?wsdl
    logIn
    89e52507-7e02-499d-89eb-67ed47815ee7
    assignBusinessUnitRoles
    <soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://services.soap.usm.ca.com" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
    <soapenv:Header/>
    <soapenv:Body>
    <ser:assignBusinessUnitRoles soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    <sessionID xsi:type="xsd:string">89e52507-7e02-499d-89eb-67ed47815ee7</sessionID>
    <userid xsi:type="xsd:string">bu1user1</userid>

    <businessunitroles xsi:type="urn:ArrayOf_xsd_string" soapenc:arrayType="xsd:string[1]" xmlns:urn="urn:usmUserService">
    <string2>BU1catalog=catalogenduser</string2>
    </businessunitroles>

    </ser:assignBusinessUnitRoles>
    </soapenv:Body>
    </soapenv:Envelope>
    ====================
    <soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://services.soap.usm.ca.com" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
    <soapenv:Header/>
    <soapenv:Body>
    <ser:assignBusinessUnitRoles soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    <sessionID xsi:type="xsd:string">6f7ed44a-9685-4cca-a318-7ec4e4bbb323</sessionID>
    <userid xsi:type="xsd:string">bu1user1</userid>

    <businessunitroles xsi:type="urn:ArrayOf_xsd_string" soapenc:arrayType="xsd:string[2]" xmlns:urn="urn:usmUserService">
    <string1>BU1catalog=catalogenduser</string1>
    <string2>SM141=catalogenduser</string2>
    </businessunitroles>

    </ser:assignBusinessUnitRoles>
    </soapenv:Body>
    </soapenv:Envelope>
    ====================



  • 6.  Re: Can we update Business Units and Authorization Levels using SOAP

    Posted Aug 22, 2018 07:57 AM

    Method assignBusinessUnitRoles works just fine in SOAP UI also i am able to update usm_contact_domain_role but when i use the same method in PAM it give me an error " soapenv:Server.generalExceptionException occurred assigning user to business unit role:The INSERT statement conflicted with the FOREIGN KEY constraint "$usm_c_r0000218f00000000". The conflict occurred in database "mdb", table "dbo.usm_role", column 'role_id'.com.ca.usm.soap.axisInterfaces.WebServiceExceptionsdedaps0273"



  • 7.  Re: Can we update Business Units and Authorization Levels using SOAP

    Broadcom Employee
    Posted Aug 22, 2018 07:38 AM

    Good Afternoon Kunal.

    Possibly, the following will help you further on this?
    Kind regards, Louis.

     

    <soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://services.soap.usm.ca.com" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
    <soapenv:Header/>
    <soapenv:Body>
    <ser:editUser soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    <sessionID xsi:type="soapenc:string">6f5fc24d-c778-46be-874f-e5102ef7ef60</sessionID>
    <userObj xsi:type="urn:User" xmlns:urn="urn:usmUserService">
    <address xsi:type="urn:ArrayOf_xsd_string" soapenc:arrayType="xsd:string[]"/>
    <alias xsi:type="xsd:string"></alias>
    <businessUnitLevels xsi:type="urn:ArrayOf_xsd_string" soapenc:arrayType="xsd:string[1]" xmlns:urn="urn:usmUserService">
    <string1>Sandvik=0</string1></businessUnitLevels>
    <businessUnitRoles xsi:type="urn:ArrayOf_xsd_string" soapenc:arrayType="xsd:string[1]" xmlns:urn="urn:usmUserService">
    <string1>Sandvik=catalogenduser</string1></businessUnitRoles>
    <city xsi:type="xsd:string"></city>
    <comment xsi:type="xsd:string"></comment>
    <country xsi:type="xsd:string"></country>
    <county xsi:type="xsd:string"></county>
    <data1 xsi:type="xsd:string"></data1>
    <data2 xsi:type="xsd:string"></data2>
    <data3 xsi:type="xsd:string"></data3>
    <data4 xsi:type="xsd:string"></data4>
    <data5 xsi:type="xsd:string"></data5>
    <data6 xsi:type="xsd:string"></data6>
    <data7 xsi:type="xsd:string"></data7>
    <defaultBusinessUnit xsi:type="xsd:string">Sandvik</defaultBusinessUnit>
    <defaultRole xsi:type="xsd:string">catalogenduser</defaultRole>
    <delegate xsi:type="xsd:string"></delegate>
    <email xsi:type="xsd:string"></email>
    <fax xsi:type="xsd:string"></fax>
    <firstName xsi:type="xsd:string"></firstName>
    <groups xsi:type="urn:ArrayOf_xsd_string" soapenc:arrayType="xsd:string[]"/>
    <lastName xsi:type="xsd:string">Ledituser01</lastName>
    <locationComment xsi:type="xsd:string"></locationComment>
    <locationFax xsi:type="xsd:string"></locationFax>
    <locationName xsi:type="xsd:string"></locationName>
    <locationPhone xsi:type="xsd:string"></locationPhone>
    <locationUuid xsi:type="xsd:string"></locationUuid>
    <manager xsi:type="xsd:string"></manager>
    <middleName xsi:type="xsd:string"></middleName>
    <mobile xsi:type="xsd:string"></mobile>
    <pager xsi:type="xsd:string"></pager>
    <postalCode xsi:type="xsd:string"></postalCode>
    <primaryPhone xsi:type="xsd:string"></primaryPhone>
    <secondaryPhone xsi:type="xsd:string"></secondaryPhone>
    <serviceDelegatesId xsi:type="urn:ArrayOf_xsd_string" soapenc:arrayType="xsd:string[]"/>
    <state xsi:type="xsd:string"></state>
    <status xsi:type="xsd:int">0</status>
    <telephone xsi:type="xsd:string"></telephone>
    <timeZone xsi:type="xsd:string"></timeZone>
    <title xsi:type="xsd:string"></title>
    <userID xsi:type="xsd:string">edituser01</userID>
    <userUUID xsi:type="xsd:string">17847596D7574ADBB13B6AD50A539621</userUUID>
    </userObj>
    </ser:editUser>
    </soapenv:Body>
    </soapenv:Envelope>

    Client ========================================================

    <soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://services.soap.usm.ca.com" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
    <soapenv:Header/>
    <soapenv:Body>
    <ser:editUser soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    <sessionID xsi:type="xsd:string">28cda7d3-cf13-4096-a4bd-27e7f107b565</sessionID>
    <userObj xsi:type="urn:User" xmlns:urn="urn:usmUserService">
    <address soapenc:arrayType="xsd:string[6]" xsi:type="soapenc:Array" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
    <address xsi:type="xsd:string"/>
    <address xsi:type="xsd:string"/>
    <address xsi:type="xsd:string"/>
    <address xsi:type="xsd:string"/>
    <address xsi:type="xsd:string"/>
    <address xsi:type="xsd:string"/>
    </address>
    <alias xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"/>
    <businessUnitLevels soapenc:arrayType="xsd:string[1]" xsi:type="soapenc:Array" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
    <businessUnitLevels xsi:type="xsd:string">Sandvik=0</businessUnitLevels>
    </businessUnitLevels>
    <businessUnitRoles soapenc:arrayType="xsd:string[1]" xsi:type="soapenc:Array" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
    <businessUnitRoles xsi:type="xsd:string">4523=catalogenduser</businessUnitRoles>
    </businessUnitRoles>
    <city xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"/>
    <comment xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"/>
    <country xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"/>
    <county xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"/>
    <data1 xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"/>
    <data2 xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"/>
    <data3 xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"/>
    <data4 xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"/>
    <data5 xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"/>
    <data6 xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"/>
    <data7 xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"/>
    <defaultBusinessUnit xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">4523</defaultBusinessUnit>
    <defaultRole xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">catalogenduser</defaultRole>
    <delegate xsi:type="soapenc:string" xsi:nil="true" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"/>
    <email xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">jeffery.romine@walter-tools.com</email>
    <fax xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"/>
    <firstName xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">Jeffery</firstName>
    <groups soapenc:arrayType="xsd:string[0]" xsi:type="soapenc:Array" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"/>
    <lastName xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">Romine</lastName>
    <locationComment xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"/>
    <locationFax xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"/>
    <locationName xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"/>
    <locationPhone xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"/>
    <locationUuid xsi:type="soapenc:string" xsi:nil="true" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"/>
    <manager xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">vwjjodw</manager>
    <middleName xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">Wayne</middleName>
    <mobile xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"/>
    <pager xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"/>
    <postalCode xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"/>
    <primaryPhone xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"/>
    <secondaryPhone xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"/>
    <serviceDelegatesId soapenc:arrayType="xsd:string[0]" xsi:type="soapenc:Array" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"/>
    <state xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"/>
    <status xsi:type="xsd:int">0</status>
    <telephone xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"/>
    <timeZone xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">GMT+01:00 Europe/Berlin</timeZone>
    <title xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"/>
    <userID xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">rz3779</userID>
    <userUUID xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">B203D1B77E4847AEB1919E37F9683789</userUUID>
    </userObj>
    </ser:editUser>
    </soapenv:Body>
    </soapenv:Envelope>



  • 8.  Re: Can we update Business Units and Authorization Levels using SOAP

    Posted Aug 22, 2018 07:54 AM

    thanks for your assistance , could you confirm which method you are using in above xml , because i have already tried " addContactToBusinessUnit Method" using SOAP ui which does not make any changes to "usm_contact_domain"



  • 9.  Re: Can we update Business Units and Authorization Levels using SOAP

    Broadcom Employee
    Posted Aug 22, 2018 07:57 AM

    Good Afternoon Kunal.

     

    I do not understand? The info is in the above xml(s) in the 'ser' line.

    Like e.g. <ser:editUser .....

     

    Kind regards, Louis.



  • 10.  Re: Can we update Business Units and Authorization Levels using SOAP

    Posted Aug 22, 2018 09:18 AM

    We tried using the above sample but unfortunately that did not worked as we are working on existing user getting exception " <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.generalException</faultcode>
    <faultstring>Exception occurred editing user: Violation of PRIMARY KEY constraint 'XPKusm_contact_extension'. Cannot insert duplicate key in object 'dbo.usm_contact_extension'. The duplicate key value is userid.</faultstring>
    <detail>
    <ns1:exceptionName xmlns:ns1="http://xml.apache.org/axis/">com.ca.usm.soap.axisInterfaces.WebServiceException</ns1:exceptionName>
    <ns2:hostname xmlns:ns2="http://xml.apache.org/axis/">sdedaps0273</ns2:hostname>
    </detail>
    </soapenv:Fault>
    </soapenv:Body>
    </soapenv:Envelope>