Uploaded image for project: 'WSO2 Identity Server'
  1. WSO2 Identity Server
  2. IDENTITY-6186

SOAP API parameters shows as optional even though some of them are required parameters.

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Not a bug
    • Affects Version/s: 5.3.0-GA
    • Fix Version/s: 5.4.0-Alpha
    • Component/s: identity-mgt, user-mgt
    • Labels:
      None

      Description

      Following addUser API does not work without requirePasswordChange parameter. But it's defined as optional.

      <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://service.ws.um.carbon.wso2.org" xmlns:xsd="http://common.mgt.user.carbon.wso2.org/xsd">
         <soapenv:Header/>
         <soapenv:Body>
            <ser:addUser>
               <!--Optional:-->
               <ser:userName>sakthi3@scania.user</ser:userName>
               <!--Optional:-->
               <ser:credential>kbH3t3Vqe2zH</ser:credential>
               <!--Zero or more repetitions:-->
               <ser:claims>
                  <!--Optional:-->
                  <xsd:claimURI>http://wso2.org/claims/userid</xsd:claimURI>
                  <!--Optional:-->
                  <xsd:value>59b3f740-75a9-4c16-80bd-78caaef14d45</xsd:value>
               </ser:claims>
               <!--Optional:-->
               <ser:profileName>default</ser:profileName>
               <!--Optional:-->
               <ser:requirePasswordChange>false</ser:requirePasswordChange>
            </ser:addUser>
         </soapenv:Body>
      </soapenv:Envelope>
      

      The reason for showing the requirePasswordChange as optional in the addUser API is that its minOccurs="0" in the RemoteUserStoreManagerService.wsdl as below.

      <xs:element name="addUser">
                      <xs:complexType>
                          <xs:sequence>
                              <xs:element minOccurs="0" name="userName" nillable="true" type="xs:string"></xs:element>
                              <xs:element minOccurs="0" name="credential" nillable="true" type="xs:string"></xs:element>
                              <xs:element maxOccurs="unbounded" minOccurs="0" name="roleList" nillable="true" type="xs:string"></xs:element>
                              <xs:element maxOccurs="unbounded" minOccurs="0" name="claims" nillable="true" type="ax2592:ClaimValue"></xs:element>
                              <xs:element minOccurs="0" name="profileName" nillable="true" type="xs:string"></xs:element>
                              <xs:element minOccurs="0" name="requirePasswordChange" type="xs:boolean"></xs:element>
                          </xs:sequence>
                      </xs:complexType>
                  </xs:element>
      

      So need to define it as required if it's not an optional parameter. This applies to all the admin services such as user management, identity management, application management etc.

        Attachments

          Activity

            People

            • Assignee:
              harshat@wso2.com Harsha Thirimanna
              Reporter:
              ashen@wso2.com Ashen Weerathunga
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: