Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Web Services and Inheritance
Web Services and Inheritance [message #173304] Thu, 06 July 2006 10:33 Go to next message
Eclipse UserFriend
Originally posted by: callumurquhart.gmail.com

This is my first web service (although not my first use of Eclipse), so
bear with me if this is an obvious question.

I'm wanting to know if there are rules around inheritance and [testing]
web services. I'm asking because I have a class from which I create the
web service that initialises a class that is the child of another, however
when testing the client I'm not seeing the expected "input" fields.


I have a class "LoginService" which is the class from which I want to
create a web service:


public class LoginService
{
public LoginService ()
{

}


public String login (String u, String p)
{
Child child = new Child () ;

return u + " " + p ;
}
}

And the Child class and its parent (Base):


public class Child extends Base
{
public Child ()
{

}
}


public class Base
{
protected Data myData = new Data () ;


public Base ()
{

}
}


So Child extends Base, and Base has the class Data which some fields:

package com.bsn.icrm2;

public class Data
{
private String forename, surname ;

/* set and get methods for forename and surname here
*/
}


Data has two string members, along with set/get methods for those.


So, when I create a web service of LoginService class I was expecting to
be able to set the forename and surname in the Test Client.

Quite a long story, but after looking for a reference to this I've found
nothing - does anyone know of a link to rules of web services,
inheritance, etc? I know for a method to be available to a web service it
must be public (login() in my case), but that's about it.


Thanks

--
CUrquhart
Re: Web Services and Inheritance [message #173816 is a reply to message #173304] Mon, 10 July 2006 20:06 Go to previous message
Peter Moogk is currently offline Peter MoogkFriend
Messages: 15
Registered: July 2009
Junior Member
In your posting the LoginService class has one method login. Therefore,
the webservice will only have one operation for login. The implementation
of the login method uses the Child class. This Child class as defined in
your example is just part of the implementation and therefore none of its
methods will appear as operations for the web service. I hope this help.

Peter Moogk

C Urquhart wrote:


> This is my first web service (although not my first use of Eclipse), so
> bear with me if this is an obvious question.

> I'm wanting to know if there are rules around inheritance and [testing]
> web services. I'm asking because I have a class from which I create the
> web service that initialises a class that is the child of another, however
> when testing the client I'm not seeing the expected "input" fields.


> I have a class "LoginService" which is the class from which I want to
> create a web service:


> public class LoginService
> {
> public LoginService ()
> {

> }


> public String login (String u, String p)
> {
> Child child = new Child () ;

> return u + " " + p ;
> }
> }

> And the Child class and its parent (Base):


> public class Child extends Base
> {
> public Child ()
> {

> }
> }


> public class Base
> {
> protected Data myData = new Data () ;


> public Base ()
> {

> }
> }


> So Child extends Base, and Base has the class Data which some fields:

> package com.bsn.icrm2;

> public class Data
> {
> private String forename, surname ;

> /* set and get methods for forename and surname here
> */
> }


> Data has two string members, along with set/get methods for those.


> So, when I create a web service of LoginService class I was expecting to
> be able to set the forename and surname in the Test Client.

> Quite a long story, but after looking for a reference to this I've found
> nothing - does anyone know of a link to rules of web services,
> inheritance, etc? I know for a method to be available to a web service it
> must be public (login() in my case), but that's about it.


> Thanks

> --
> CUrquhart
Previous Topic:html format
Next Topic:Generic Server, Remote Server support in WTP
Goto Forum:
  


Current Time: Fri Apr 19 23:27:39 GMT 2024

Powered by FUDForum. Page generated in 0.02701 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top