This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Can Watch "Can New topic
Author

Can't update database via client webservice.

sam White
Ranch Hand

Joined: Feb 18, 2011
Posts: 208
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 AbstractFactory.java 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:
AbstractFactory.java:


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

Any suggestion is very appreciated.
Thanks
Sam
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3817

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?


SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Can't update database via client webservice.
 
Similar Threads
JBoss clustering
Unable to connect to read-only Embedded Derby database from within EAR file deployed on JBoss server
Problem creating query when using Hibernate and Axis2
Conneting to database but unable to save object.
Problem with the <set> mapping please help