I just want to write a simple web service using Axis2 which can show a html page when accessed.
So here’s what I’ve done so far... I wrote trying to write a web service in Axis2 with a java class file, which will print with a html output, the problem here is - Axis 2 is embedding the html output within the WSDL Tags. Is it really possible to achieve a html response with Axis2 Web Service.?
In service.xml:
<service name="TestService">
<description>
This is a sample Web service with two operations, echo and ping.
</description>
<parameter name="serviceClass">com.xxx.xxxx.MyService</parameter>
<operation name="getString">
..................
.......
</service>
And the MyService.Java :
public class MyService {
public void getString() {
System.out.println("<html><body><h1>Hello</h1></body></html>");
}
}