Prev | Current Page 151 | Next

Binildas A Christudas

"Service-Oriented Java Business Integration"

out.println("HelloServiceImpl.HelloServiceImpl()...");
Chapter 5
[ 103 ]
}
public String sayHello(String name)
{
System.out.println("HelloServiceImpl.sayHello(" +
(++times) + ")");
return "HelloServiceImpl.sayHello : HELLO! You just said: "
+ name;
}
}
3. services .xml: Here we specify the details of our web services, using the
serviceClass and implementationClass elements. serviceClass
specifies the Java interface, which hosts the method signature whereas
implementationClass specifies the class which implements the method.
All the methods in serviceClass will be exposed as web services. If the
implementationClass doesn't implement any interface, the serviceClass
element can have the implementationClass itself as its value. services.
xml is placed within the WEB-INF\classes\META-INF\xfire directory, so
that the XFire run time can set up the service environment. The name and
namespace elements can have any valid XML names as the values.
It is shown in the following code:


Hello
myHello
IHello
HelloServiceImpl


4.


Pages:
139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163