This discussion is archived
3 Replies Latest reply: Jul 5, 2013 9:26 PM by user13630962 RSS

Exception Handling for URL Service Data Control

user13630962 Newbie
Currently Being Moderated

Environent_

JDeveloper 11.1.1.6.0

 

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'?>

<resp>

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

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

</resp>

 

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

<?xml version = '1.0'?>

<resp>

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

</resp>

 

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.

 

Regards,

Niraj

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points