TEWS API SOAP Request: Resolving wsdl Prefix SAXParseException
search cancel

TEWS API SOAP Request: Resolving wsdl Prefix SAXParseException

book

Article ID: 137181

calendar_today

Updated On:

Products

CA Identity Manager

Issue/Introduction

When utilizing the Task Execution Web Service (TEWS) API to perform multi-step administrative tasks, such as Forgotten Password resets, the second SOAP call may fail during the answer verification phase. This occurs when the SOAP request XML incorrectly includes namespace prefixes that the parser cannot resolve, resulting in a SAXParseException.

Symptoms

Users receive the following error response when submitting the second SOAP call: org.xml.sax.SAXException: The prefix "wsdl" for element "wsdl:_BAR_VerifyAnswer_BAR_" is not bound. org.xml.sax.SAXParseException; lineNumber: 21; columnNumber: 41; The prefix "wsdl" for element "wsdl:_BAR_VerifyAnswer_BAR_" is not bound.

 

Here is my SOAP request:

 

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

  <soap:Body>

     <PublicTaskContext xmlns="http://tews6/wsdl">

        <transaction_id>95388873-59095bba-a8065180-7c6780b</transaction_id>

        # This is the transaction_Id from the previous return payload

     </PublicTaskContext>

     <ForgottenPasswordSearch xmlns="http://tews6/wsdl">

        <Subject index="0">

           <UID>UserID</UID>

           # Represents the user login ID   

           <wsdl:_BAR_VerifyAnswer_BAR_>Tom Cruise</wsdl:_BAR_VerifyAnswer_BAR_>

           # Answer to the question

        </Subject>

     </ForgottenPasswordSearch>

  </soap:Body>

</soap:Envelope>

 

Here is the 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:Client</faultcode>

         <faultstring>Error parsing incoming document.</faultstring>

         <detail>

            <tews:ImsException version="6.0" xmlns="http://tews6/xsd/common">

               <tews:exception>

                  <tews:name>org.xml.sax.SAXException</tews:name>

                  <tews:code>300</tews:code>

                  <tews:description>org.xml.sax.SAXException: The prefix "wsdl" for element "wsdl:_BAR_VerifyAnswer_BAR_" is not bound.

org.xml.sax.SAXParseException; lineNumber: 21; columnNumber: 41; The prefix "wsdl" for element "wsdl:_BAR_VerifyAnswer_BAR_" is not bound.</tews:description>

                  <tews:transaction/>

               </tews:exception>

            </tews:ImsException>

         </detail>

      </soapenv:Fault>

   </soapenv:Body>

</soapenv:Envelope>



Environment

Identity Manager

Cause

There is a syntax error in the SOAP request XML.

Resolution

The error is caused by a syntax misalignment in the SOAP request XML where the wsdl: prefix is applied to the element tag without a corresponding namespace declaration.

To resolve this, remove the wsdl: prefix from the task-specific elements in your SOAP body.

Incorrect Syntax:

xml
 
<wsdl:_BAR_VerifyAnswer_BAR_>    <question_answer>YourAnswer</question_answer></wsdl:_BAR_VerifyAnswer_BAR_>

Corrected Syntax:

xml
 
<_BAR_VerifyAnswer_BAR_>    <question_answer>YourAnswer</question_answer></_BAR_VerifyAnswer_BAR_>

Procedure:

  1. Open your SOAP request template (e.g., in SoapUI).
  2. Locate the verification element (e.g., _BAR_VerifyAnswer_BAR_).
  3. Ensure the tag starts directly with the underscore (_) rather than a namespace prefix.
  4. Resubmit the call using the transaction_Id returned from the initial question retrieval payload.