How is the best way to delete a tenant in WSO2 carbon?

℡╲_俬逩灬. 提交于 2019-12-13 14:20:47

问题


I'm trying to delete a tenant using the method "deleteTenant" in the class "TenantMgtAdminServiceStub" but it didn't works, it shows an error. I'm wondering if this is the best way to delete a tenant... I was looking for help and I found this post but is not a possibility restart the server every time I want to delete a tenant.

Days before I post this with the error I got when I use that method.

Thanks!


回答1:


Tenants once created from the UI cannot be deleted from the UI. However, Using the deleteTenant operation of RemoteTenantManagerService we can delete a tenant. This am basing on a product like API-Manager1.9.0

To access this RemoteTenantManagerService as https://localhost:9443/services/RemoteTenantManagerService?wsdl follow the following steps

step1: set the following property to false in vi ../repository/conf/carbon.xml <HideAdminServiceWSDLs>false</HideAdminServiceWSDLs>

step2: start the server and then access https://localhost:9443/services/RemoteTenantManagerService?wsdl via soap ui

step3: if a tenant is created each tenant should have a tenant id which we need to pass

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://service.ws.um.carbon.wso2.org">
   <soapenv:Header/>
   <soapenv:Body>
      <ser:deleteTenant>
         <!--Optional:-->
         <ser:tenantId>?</ser:tenantId>
      </ser:deleteTenant>
   </soapenv:Body>
</soapenv:Envelope>

Note: if you are to create a tenant with the same name you will need to restart the server

regards,shavantha



来源:https://stackoverflow.com/questions/36553984/how-is-the-best-way-to-delete-a-tenant-in-wso2-carbon

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!