Presented by developerWorks, your source for great tutorials
ibm.com/developerWorks
* by the Apache Axis WSDL2Java emitter.
*/
package localhost.axisejb.services.RemoteHelloService;
import javax.xml.rpc.*;
public interface HelloService extends Service {
public String getRemoteHelloServiceAddress();
public Hello getRemoteHelloService() throws ServiceException;
public Hello getRemoteHelloService(java.net.URL portAddress)
throws ServiceException;
}
Notice that the
HelloService
has two methods for finding your service, both called
getRemoteHelloService()
. The no argument version of
getRemoteHelloService()
will return an instance of
Hello
interface for you to
work for the service you have deployed at
http://localhost:8080/axisejb/services/RemoteHelloService
. (The code was modified to
fit nicely on the screen).
The other version of
getRemoteHelloService()
that takes a URL is used to look
up a particular Web service at another location. This is for when you deploy your Web
service to production, for example,
getRemoteHelloService(new
URL("http://www.rickhightower.com/AxisEJB"))
.
RemoteHelloServiceSoapBindingStub
and
HelloServiceLocator
implement
Hello
and
HelloService
respectively. The class
HelloServiceTestCase
demonstrates how to use
RemoteHelloServiceSoapBindingStub
and
HelloServiceLocator
as follows:
/**
* HelloServiceTestCase.java
*
* This file was auto generated from WSDL
* by the Apache Axis WSDL2Java emitter.
*/
package localhost.axisejb.services.RemoteHelloService;
import junit.framework.*;
public class HelloServiceTestCase extends TestCase {
public HelloServiceTestCase(java.lang.String name) {
super(name);
}
public void test1RemoteHelloServiceGetGreetings() throws Exception {
RemoteHelloServiceSoapBindingStub binding;
try {
binding = (RemoteHelloServiceSoapBindingStub)
Service enable EJB SessionBeans with the IBM ETTK
Page 19 of 33






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

servlet web hosting

 

Our partners: PHP: Hypertext Preprocessor Best Web Hosting Java Web Hosting Jsp Web Hosting Cheapest Web Hosting

Visionwebhosting.net Business web hosting division of Web Design Plus. All rights reserved