首页 > 解决方案 > 带有肥皂网络服务的 WSO2 IS 5.7 editUserStore 无法正常工作

问题描述

我想使用 wso2 提供的肥皂网络服务使用 Spring Boot Web 服务编辑用户存储。但无法在 wso2 中编辑用户存储。目前,我正在使用 WSO2 IS 5.7

这是我得到的错误

<soapenv:Reason><soapenv:Text xml:lang="en-US">UniqueID property is not provided.</soapenv:Text></soapenv:Reason>

这是我发送以编辑用户存储的肥皂请求

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsd="http://org.apache.axis2/xsd" xmlns:xsd1="http://dto.configuration.store.user.identity.carbon.wso2.org/xsd">
<soap:Header/>
<soap:Body>
  <xsd:editUserStore>
        <xsd:userStoreDTO>
            <xsd1:className>##LDAP_CLASS##</xsd1:className>
            <xsd1:description>##DESCRIPTION##</xsd1:description>
            <xsd1:disabled>false</xsd1:disabled>
            <xsd1:domainId>##DOMAIN_NAME##</xsd1:domainId>
            <xsd1:properties>
                <xsd1:name>ConnectionName</xsd1:name>
                <xsd1:value>##CONNECTION_NAME##</xsd1:value>
            </xsd1:properties>
            <xsd1:properties>
                <xsd1:name>ConnectionURL</xsd1:name>
                <xsd1:value>##CONNECTION_URL##</xsd1:value>
            </xsd1:properties>
            <xsd1:properties>
                <xsd1:name>ConnectionPassword</xsd1:name>
                <xsd1:value>##PASSWORD##</xsd1:value>
            </xsd1:properties>
            <xsd1:properties>
                <xsd1:name>UserSearchBase</xsd1:name>
                <xsd1:value>##USER_SEARCH_BASE##</xsd1:value>
            </xsd1:properties>
            <xsd1:properties>
                <xsd1:name>UserEntryObjectClass</xsd1:name>
                <xsd1:value>##USER_ENTRY_OBJECT_CLASS##</xsd1:value>
            </xsd1:properties>
            <xsd1:properties>
                <xsd1:name>GroupEntryObjectClass</xsd1:name>
                <xsd1:value>##GROUP_ENTRY_OBJECT_CLASS##</xsd1:value>
            </xsd1:properties>
            <xsd1:properties>
                <xsd1:name>UserNameAttribute</xsd1:name>
                <xsd1:value>##USER_NAME_ATTRIBUTE##</xsd1:value>
            </xsd1:properties>
            <xsd1:properties>
                <xsd1:name>UserNameSearchFilter</xsd1:name>
                <xsd1:value>##USER_NAME_SEARCH_FILTER##</xsd1:value>
            </xsd1:properties>
            <xsd1:properties>
                <xsd1:name>UserNameListFilter</xsd1:name>
                <xsd1:value>##USER_NAME_LIST_FILTER##</xsd1:value>
            </xsd1:properties>
        </xsd:userStoreDTO>
         </xsd:editUserStore>

标签: web-serviceswso2wso2is

解决方案


正如错误所说,您没有在请求中发送UniqueID属性。editUserStore

要检索UniqueID每个用户存储的 ,您可以使用以下请求。这将列出所有用户商店及其属性,您可以找到UniqueID每个用户商店的属性。

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsd="http://org.apache.axis2/xsd">
   <soap:Header/>
   <soap:Body>
      <xsd:getSecondaryRealmConfigurations/>
   </soap:Body>
</soap:Envelope>

UniqueID然后,您可以通过向请求中添加属性来避免此错误,editUserStore如下所示。

    <xsd1:properties>
        <xsd1:name>UniqueID</xsd1:name>
        <xsd1:value>751d3a55-5eb3-462b-ad6a-c93fcc444927</xsd1:value>
    </xsd1:properties>

PS:这些管理服务在UserStoreConfigAdminService


推荐阅读