3 Replies Latest reply: Jul 5, 2013 11:26 PM by user13630962 RSS

    Exception Handling for URL Service Data Control





      My Usecase_

      I have created URL Service Data Control and fetching data from my legacy Application URL which returns XML.

      I want to implement Exception handling for below use case.


      Page1 shows the username and password textbox and a button.

      When a user enters correct username and password, system displays page2 and shows name of user. When the user enters the wrong password or some connection error occurred, I want to display meaningful error message on page1 itself.


      XML Format for each use case_

      1.When user enter correct credentials, service returns user name in below xml format.

      <?xml version = '1.0'?>


         <customername>RAMESH &amp; SURESH</customername>

         <rc errorcode="" errormessage="" returncode="0"/>



      2.When the user enters wrong credentials, It returns below xml format.

      <?xml version = '1.0'?>


         <rc errorcode="1001" errormessage="Invalid credential" returncode="0"/>



      3.When a connection error occurs, the system displays popup message "Couldn't access the data source. HTTP Analyzer Bad Gateway"


      Please suggest me a better way of handling exception for the above case.