wso2wso2-governance-registry

Add role using WSO2 GReg admin service addRole


I'm trying to add a role using the WSO2 GReg admin service addRole using SoapUI. Unfortunately I get an error.

Using the following request I get the error "java.lang.ArrayIndexOutOfBoundsException: 3":

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:mgt="http://mgt.user.carbon.wso2.org">
<soap:Header/>
   <soap:Body>
      <mgt:addRole>
         <!--Optional:-->
         <mgt:addRole>test</mgt:addRole>
      </mgt:addRole>
   </soap:Body>
</soap:Envelope>

Using the following request I get the error "Role name not valid. Role name must be a non null string with following format, ^[^~!#$;%^*+={}\|\\<>,\'\"]{3,30}$":

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:mgt="http://mgt.user.carbon.wso2.org">
<soap:Header/>
   <soap:Body>
     <!--Optional:-->
     <mgt:addRole>test</mgt:addRole>
   </soap:Body>
</soap:Envelope>

Any idea's what I'm doing wrong?

Regards, nidkil


Solution

  • Can you try with the following Envelope?

    <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:mgt="http://mgt.user.carbon.wso2.org">
    <soap:Header/>
       <soap:Body>
          <mgt:addRole>
             <mgt:roleName>test</mgt:roleName>
          </mgt:addRole>
       </soap:Body>
    </soap:Envelope>