Hi,
Basically, I want my stub's method signatures to be same as the service that
was used. Please note that I am not creating a contract first web service,
where you create the wsdl first. Instead, I am going the POJO first
approach. Where I have my neat little Java class, with it's methods
implementing business logic, and need to expose it using a web service. For
example, let's look a the following, my Web Service POJO class looks like
this,
public class StudentService
{
public Student registerNewStudent(Student student)
{
//code to persist student object to database using hibernate (or JPA) and
get the unique student id
return student;
}
}
Then I packaged this into an AAR and deployed to Axis2 war running inside
Tomcat 7.0
Using wsdl that is generated by Axis2, I generated client stub using the
Eclipse's code generator plugin. But the stub contains another level of
abstraction in the method signatures to wrap the parameters. For example,
the stub looked like this.
public class StudentServiceStub
{
public RegisterNewStudentResponse
registerNewStudent(RegisterNewStudentRequest rnreq) { ..... }
}
So when I want to use the service, the stub does not necessarily completely
mask the complexity of calling the web service. You have to know little
tidbits about Request/Response stuff, which is totally unnecessary.
Can someone please explain how we can get rid of these difficult to use
method signatures and instead generate a stub that is easy to call an Axis2
web service.
Thanks and best regards,
AndroidGuy...