Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Creating a web service

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.

replied

Hi David,

Have you tried declaring the class Request as public ?

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question