0

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

Community
  • 1
  • 1
nidkil
  • 1,295
  • 1
  • 17
  • 28

1 Answers1

0

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>
Amila De Silva
  • 716
  • 4
  • 6
  • Thx Amila it works. Any chance you guys at WSO2 are going to be fixing the admin services? The WSDL's are not very helpful and in some cases (like this one) even misleading... – nidkil Dec 15 '13 at 02:29
  • I guess you are working with an older release of the GREG. In the latest release this issue is fixed. Either you can download a newer release to generate the correct WSDLs or else you can refer to service stubs located inside /repository/components/plugins directory (which is a little cumbersome). org.wso2.carbon.user.mgt.stub_.jar contains a WSDL with the correct definition of the UserAdmin service. – Amila De Silva Dec 15 '13 at 16:16
  • Amila. I am using version 4.5.2. Is this fixed in version 4.6.0? – nidkil Dec 17 '13 at 14:47
  • Yes. This is fixed in 4.6.0. – Amila De Silva Dec 18 '13 at 16:08