which method to call

I have a web service that I created.

In order to create webservice client, I used WSDL2JAVA utility - which in turn created the following classes -

ListServiceSoapBindingStub.java

ListServiceLocator.java

ListServiceService.java

ListService.java(originally created by me)

What class/method do I call now to test if it works.

I do not see the main method anywhere.

Please suggest.

[436 byte] By [BabuLala] at [2007-11-26 18:22:42]
# 1

You don't have any main method because these classes are thought to be used as interfaces to the Web Service. You have to create your own test class like (I guess):

public class Tester {

public static void main(String [] args) throws Exception {

// Make a service

ListServiceService service = new ListServiceLocator();

// Now use the service to get a stub which implements the SDI.

ListService port = service.getListService();

// Make the actual call

port.callYourMethod(....)

}

}

What method to call depends on what operations the service exports and which one you want to test!

Perhaps if you give us more information (WSDL for instance) we can help you more...

Look here: http://ws.apache.org/axis/java/user-guide.html#WSDL2JavaBuildingStubsSkeletonsAndDataTypesFromWSDL

Cheers.

Anhura at 2007-7-9 5:56:36 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...