4 Replies Latest reply: Oct 1, 2013 10:45 AM by RaviKiranSavirigana RSS

    Database Error handling from DB Adapter

    849145
      Hi,

      I just started learning Oracle SOA 11g R1 suite. When I am trying out some samples, I find it difficult to handle database constrain errors as the WSDL created by DB Adapter is not returning any message in response during UPDATE operations.

      It will be really helpful if any one reply for this post.


      Thanks,
      DM
        • 1. Re: Database Error handling from DB Adapter
          685183
          Hi,

          You can make use of the fault handling feature of BPEL to handle the binding faults returned by the DB adapter.
          • 2. Re: Database Error handling from DB Adapter
            849145
            Hi,

            Thanks for your reply.


            I will give you more insight about my composite. The service which am creating is for CRUD operations in database table. The SCA components which I have in my composite are Webservice, Mediator and JCA DB Adapter (for each create, read, update and delete operations). I am not using BPEL in my composite.


            Below are the issues I have with DB Adapters

            1. When I create DB Adapter with custom SQL for Update operation with Update query, the WSDL created by JDeveloper is not having any response (i.e.., wsdl:output) defined in it. Because of this am not able to identify how many rows gets updated successfully similar to java jdbc which will return an integer of number of rows got updated.

            2. Is there any way I can catch database constraint exceptions somewhere in my composite and interpret exception message to understand which constraint got violated and send reasonable error message to client. Because in terms of database constrain exceptions, DB Adapter is throwing constrain exception messages directly to client as part of response.


            Thanks in advance.
            • 3. Re: Database Error handling from DB Adapter
              849145
              Hi

              Anybody please clarify my query.

              Am I creating services in right way. Any comments are welcome plz.
              • 4. Re: Database Error handling from DB Adapter
                RaviKiranSavirigana

                Hi

                 

                Hope you are doing fine!

                I would like to know if you've found a solution for your question above. We've a similar situation but could not figure out how to handle different errors from the DBAdapter. I know BPEL would solve this, but without using BPEL, with just Mediator, I would like to handle the situation.

                 

                Regards

                RaviKiran