7 Replies Latest reply: Nov 20, 2012 3:07 AM by Angelo Hannes RSS

    Prolem with updating method of webservice in adf mobile

    Angelo Hannes
      Hello all,
      I'm currently stuck with a Problem, which occurs when I want to update a row of a view.

      I created a Panel Form in my amx site, by dropping the result of a findViewCriteria-method (exposed by my bc webservice) on the page. It is an editable Form. So until here it works as expected. So after the User edited the form, I want to send it back. Therefore I dropped the updateView-method on the page, which created a Button (The Action Listener of the Button is something like #{bindings.updateFooView.execute} - seems to be right)
      In the bindings view I assigned the #{bindings.resultIterator.currentRow.dataProvider} as parameter to this update-method. resultIterater is the result of the aforementioned findViewCriteria-method.

      After clicking on the button on my device I get a 500 Server Error and the only log I see in JDeveloper is the following

      <JAXWSMessages> <log> Exception while executing the business logic: JBO-25020: View-Zeile mit Schlüssel oracle.jbo.Key[283 ] in FooEditView nicht gefunden.

      loosely translated it says: View-Row with Key oracle.jbo.Key[283 ] in FooEditView not found.

      I checked the underlying table. There is a row with this key.
      So the question is, why does my View don't find it, or (because it found the row with find-method) looses a reference to the row?

      Any ideas on that?

      Studio Edition Version 11.1.2.3.0

      I hope I got the terminology right. I'm both new to ADF and ADF Mobile
        • 1. Re: Prolem with updating method of webservice in adf mobile
          Frank Nimphius-Oracle
          Hi,

          didn't test, but can you try "#{bindings.resultIterator.currentRow}" instead of the data provider?

          Frank
          • 2. Re: Prolem with updating method of webservice in adf mobile
            Angelo Hannes
            Hello,
            and thanks to your reply. I did try using the currentRow instead of currentRow.dataProvider, but that didn't change anything. The Exception thrown is exactly the same.

            My approach is similar to the one Shay Shmeltzer described in [this blog entry|https://blogs.oracle.com/shay/entry/updateinsert_with_adf_web_serv] from 2010, except that my web service was created like he described in this [this blog entry|https://blogs.oracle.com/shay/entry/developing_with_oracle_adf_mobile]

            Edited by: 968387 on Nov 16, 2012 1:45 AM
            • 3. Re: Prolem with updating method of webservice in adf mobile
              Angelo Hannes
              I could finally enabling logging, and I see something about a Rollback and a "Clearing VO cache for FooEditView", shortly before the exception.

              could this causing the exception, and if so, how do I change that behavior?
              • 4. Re: Prolem with updating method of webservice in adf mobile
                Shay Shmeltzer-Oracle
                If you created a Web srevice interface for ADF BC to do an update operation then when you create a data control on top of that WSDL you'll see that there is an object that represent the parameter to an update method at the top of the data control palette.
                (something like: UpdateDepartmentsView_parameters)
                Drag that object into your page to create a form.
                Now drag the operation for the update, and it will automatically bind to that iterator.
                Then you just need to update the values in the Form and they will be passed to the update operation.
                • 5. Re: Prolem with updating method of webservice in adf mobile
                  Angelo Hannes
                  And how do I get the current data then into that created form?

                  //edit
                  even if i fill out the form by hand, I still get the same Exception

                  //edit2
                  I did try the web service with this testing tool, which appears when you access the service url in a browser. And still I get the same exception.
                  So there seems to be something wrong, ether with the webservice, or the BCs themselves. And as the Exception is a JBO-25020: RowNotFoundException, I think something is wrong with my BCs, because the database table does show one row with the given key!

                  //edit3
                  In addition I don't receive any row, when I use the get-method, but I'm able to receive it, with a find-method.
                  This is what I get, when I call the get-method:
                  <env:Envelope
                  xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
                  <env:Header/>
                  <env:Body>
                  <ns0:getFooEditViewResponse
                  xmlns:ns0="/com/bar/web/foo/model/bc/common/types/"/>
                  </env:Body>
                  </env:Envelope>
                  Edited by: 968387 on Nov 19, 2012 2:40 AM

                  Edited by: 968387 on Nov 19, 2012 3:45 AM

                  Edited by: 968387 on Nov 19, 2012 4:43 AM
                  • 6. Re: Prolem with updating method of webservice in adf mobile
                    Shay Shmeltzer-Oracle
                    See this demo:
                    https://blogs.oracle.com/shay/entry/adf_mobile_update_through_web
                    • 7. Re: Prolem with updating method of webservice in adf mobile
                      Angelo Hannes
                      Thank you very much, shay, for your great efforts. I will definitely take a look at that blog post.
                      But I think, I just got it right. There was a bind variable with a checked 'required' property. And the viewcriteria which uses this bind variable was selected as standard, or so it seemed. So the generated query was wrong.
                      Nevertheless the above quoted exception was very misleading, as it said, there is now row with a specific key. But that row with that key was definitely there. The row with that key, and what ever value was assigned to that bind variable was missing.

                      After all, I want to thank for every ones efforts. I see, there is much to learn in the adf framework. And I hope you are not tired of providing support to newcomers.

                      best regards

                      //edit
                      very good video tutorial in your blog. Thank you!

                      Edited by: 968387 on Nov 20, 2012 1:06 AM