NoSuchElementException Sending Forgotten Password Admin Task SOAP Calls via TEWS API
search cancel

NoSuchElementException Sending Forgotten Password Admin Task SOAP Calls via TEWS API

book

Article ID: 227665

calendar_today

Updated On:

Products

CA Identity Manager

Issue/Introduction

Sending the 1st SOAP Call to invoke Forgotten Password Admin Task failed with the following response.

<soapenv:Envelope xsi:schemaLocation="http://schemas.xmlsoap.org/soap/envelope/ http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tews="http://tews6/wsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <soapenv:Body>
      <soapenv:Fault>
         <faultcode>soapenv:Server</faultcode>
         <faultstring>Unknown processing error.</faultstring>
         <detail>
            <tews:ImsException version="6.0">
               <tews:exception>
                  <tews:name>com.netegrity.ims.exception.IMSException</tews:name>
                  <tews:code>700</tews:code>
                  <tews:description>java.util.NoSuchElementException error: No subjects returned for task: Forgotten Password</tews:description>
                  <tews:transaction>19d218dd-833d8466-8a9515c6-a6ebe22</tews:transaction>
                  <tews:msgKey>2029</tews:msgKey>
               </tews:exception>
            </tews:ImsException>
         </detail>
      </soapenv:Fault>
   </soapenv:Body>
</soapenv:Envelope>

The TEWS Call request is

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsdl="http://tews6/wsdl">
   <soapenv:Header/>
   <soapenv:Body>
      <wsdl:PublicTaskContext>
         <wsdl:transaction_id>New</wsdl:transaction_id>
      </wsdl:PublicTaskContext>
      <wsdl:ForgottenPassword>
         <wsdl:ForgottenPasswordSearch>
            <wsdl:Subject index="0">
               <wsdl:UniqueName>User@test</wsdl:UniqueName>
            </wsdl:Subject>
         </wsdl:ForgottenPasswordSearch>
      </wsdl:ForgottenPassword>
   </soapenv:Body>
</soapenv:Envelope>

Environment

Identity Manager 14.x

Cause

Unnecessary <wsdl:ForgottenPassword> causes the problem

Resolution

Remove the <wsdl:ForgottenPassword> and </wsdl:ForgottenPassword> tags from the TEWS payload. I.e. use below TEWS Call instead.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsdl="http://tews6/wsdl">
   <soapenv:Header/>
   <soapenv:Body>
      <wsdl:PublicTaskContext>
         <wsdl:transaction_id>New</wsdl:transaction_id>
      </wsdl:PublicTaskContext>
         <wsdl:ForgottenPasswordSearch>
            <wsdl:Subject index="0">
               <wsdl:UniqueName>testuser01</wsdl:UniqueName>
            </wsdl:Subject>
         </wsdl:ForgottenPasswordSearch>
   </soapenv:Body>
</soapenv:Envelope>

Additional Information

Please refer below documentation for more details.

https://techdocs.broadcom.com/us/en/symantec-security-software/identity-security/identity-manager/14-4/programming/programming-guide-for-java/task-execution-web-service/forgotten-password-admin-tasks-soap-calls-via-tews-api.html