Create WebService API with Multiple Classes [message #516519] |
Wed, 24 February 2010 10:36 |
Jamie Messages: 3 Registered: February 2010 |
Junior Member |
|
|
Hi
I know how to create a basic Axis 2 web service using Eclipse WTP when exposing one class, however, how does one specify an entire API with a large number of classes?
For example, I would like to split up the web service functions into Customer, Supplier, Distributor, etc. instead of keeping everything in one class. Furthermore, I want to have one login session across all classes. Its not clear on how to do this.
Say I have a class called System and expose it as a web service:
public class System {
public static Customer getCustomer() { return new Customer(); }
public static Supplier getSupplier() { return new Supplier(); }
public static void login(String username, String password) throws AxisFault;
}
Where Customer, Supplier are meant to be web service interfaces not objects to be passed back to the client.
Now, I want the caller to be able access the web sevice like System.getCustomer().getRecord(id); The above wont work, as the Customer object is not designed to be passed to the client. In such a case, I required to create a web service for each one of the exposed classes in my API? How do I implement unified login across all exposed classes? Must I run the WTP wizard for each of the classes? How do I have one session across all classes in the API?
Many thanks
Jamie
|
|
|
Powered by
FUDForum. Page generated in 0.03164 seconds