Meaningless Drivel is fun!
The moose likes Web Services and the fly likes Can't update database via client webservice. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Can Watch "Can New topic

Can't update database via client webservice.

sam White
Ranch Hand

Joined: Feb 18, 2011
Posts: 229
Hi, With spring mvc 3.0.4 and hibernate 3.5.3, I am using Netbeans 7 generated ear file backend CXF web service.
The generated class mainly including a class, where the edit(..) function have been created automatically in this class.
I have tested the backend webserivce by calling edit() function from SoapUI, and it does update the database correctly at this point.

When I use a web service client within another .ear file to save the updated record to the database table, it didn't update the database table record, it leaves the record unchanged.

There is no error/exception in the log and console.

Does issue this sound familiar?

Here is a fraction of my client edit code in the controller:

Backend code as in entity.facade:

log file:
23:35:13,247 INFO [stdout] (http-- Hibernate:
23:35:13,247 INFO [stdout] (http-- update
23:35:13,248 INFO [stdout] (http-- cust_address
23:35:13,248 INFO [stdout] (http-- set
23:35:13,248 INFO [stdout] (http-- address1=?,
23:35:13,248 INFO [stdout] (http-- address2=?,
23:35:13,248 INFO [stdout] (http-- contact=?,
23:35:13,248 INFO [stdout] (http-- country=?,
23:35:13,248 INFO [stdout] (http-- email_address=?,
23:35:13,248 INFO [stdout] (http-- fax=?,
23:35:13,248 INFO [stdout] (http-- phone=?,
23:35:13,249 INFO [stdout] (http-- postcode=?,
23:35:13,249 INFO [stdout] (http-- state=?,
23:35:13,249 INFO [stdout] (http-- suburb=?,
23:35:13,249 INFO [stdout] (http-- type=?
23:35:13,249 INFO [stdout] (http-- where
23:35:13,249 INFO [stdout] (http-- address_id=?
23:35:13,253 INFO [stdout] (http-- Hibernate:
23:35:13,253 INFO [stdout] (http-- update
23:35:13,253 INFO [stdout] (http-- deliveries
23:35:13,253 INFO [stdout] (http-- set
23:35:13,253 INFO [stdout] (http-- address_id=?,
23:35:13,253 INFO [stdout] (http-- ads_source=?,
23:35:13,253 INFO [stdout] (http-- customer_name=?,
23:35:13,253 INFO [stdout] (http-- delivery_between_time1=?,
23:35:13,253 INFO [stdout] (http-- delivery_between_time2=?,
23:35:13,254 INFO [stdout] (http-- delivery_date=?,
23:35:13,254 INFO [stdout] (http-- delivery_fee=?,
23:35:13,254 INFO [stdout] (http-- driver_license_number=?,
23:35:13,254 INFO [stdout] (http-- driver_name=?,
23:35:13,254 INFO [stdout] (http-- driver_phone_number=?,
23:35:13,254 INFO [stdout] (http-- ebay_id=?,
23:35:13,254 INFO [stdout] (http-- item_name=?,
23:35:13,254 INFO [stdout] (http-- item_price=?,
23:35:13,255 INFO [stdout] (http-- notes=?,
23:35:13,255 INFO [stdout] (http-- payment_status=?,
23:35:13,255 INFO [stdout] (http-- qty=?,
23:35:13,255 INFO [stdout] (http-- third_party_driver=?,
23:35:13,255 INFO [stdout] (http-- third_party_driver_charge=?
23:35:13,255 INFO [stdout] (http-- where
23:35:13,255 INFO [stdout] (http-- delivery_id=?

Any suggestion is very appreciated.
Vijitha Kumara

Joined: Mar 24, 2008
Posts: 3902

First you may need to debug and see up to what point it works (i.e. any methods does not get called where you expect them to). Is the method call goes the same flow as the working scenario?

[How to ask questions] [Twitter]
I agree. Here's the link:
subject: Can't update database via client webservice.
It's not a secret anymore!