Skip to Content
0
Oct 07, 2008 at 02:56 PM

Creating a web service

17 Views

Hi everyone,

I am trying to create a web service but without success.

Here is the simple code.

import java.io.Serializable;

public class Main

{

public String doSomething(Request req)

{

return "hello" + req.name;

}

}

class Request implements Serializable

{

public String name;

}

I right click on the class to create a web service and expose the "doSomething" methode.

When I try to test the web service, I get the following exception.

Deserializing fails. Nested message: XML Deserialization Error. Can not create instance of class [Request] when deserializing XML type [urn:][Request]..

Can someone help ?

Thanks a lot.