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 Having difficulties setting up Web Service (No serializer found for class example.Car) 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 "Having difficulties setting up Web Service (No serializer found for class example.Car)" Watch "Having difficulties setting up Web Service (No serializer found for class example.Car)" New topic
Author

Having difficulties setting up Web Service (No serializer found for class example.Car)

Duffman Be
Greenhorn

Joined: Nov 14, 2009
Posts: 7
Hello,

I am experiencing some difficulties setting up a very simple Web Service.
I made a Web Service which has 2 methods: getCars() and getCarById(int id).
Whenever I tried to run getCarById(int id) I used to get an error saying there was no serializer found for class example.Car. I searched the internet and came across something called "beanMapping" so I added this line to my server-config.wsdd:

From now on, I am getting this error:
Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: org.xml.sax.SAXException: Deserializing parameter 'id': could not find deserializer for type {http://DefaultNamespace}int

Does anyone know what I am doing wrong here?
I've uploaded the source code of the service here: http://users.telenet.be/duffman/ws/service.zip

The client code looks like this:

public class testClient {
public static void main(String[] args) {
CarServiceService service = new CarServiceService();
CarService carService = service.getCarService();
//GetCarsReturn cars = carService.getCars();
Car car = carService.getCarById(1);
}
}


Ofcourse it has a service package which is created after passing the wsdl file. This service package contains:
ArrayOfCar
Car
CarService
CarService.wsdl
CarServiceService
GetCarsReturn
ObjectFactory
package-info.java


Greets,
Duffman

 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Having difficulties setting up Web Service (No serializer found for class example.Car)
 
Similar Threads
AxisFault: serializer found for class ...
Problem in <one-to-one> relation mapping
Null Qualified name .. JAXRPCException while deploying a web service..
Object data type as parameter + Webservice + Tomcat
Axis No Serializer Found error...