Simply calling the AxisServlet will not list services for you. One thing you
could do is write your own servlet to do this;

public class ListServicesServlet extends HttpServlet {

private AxisConfiguration axisConfig;

public void init() throws ServletException {
        axisConfig =
ConfigurationContextFactory.createConfigurationContextFromFileSystem("path
to ur repo", "path to your axis2.xml").getAxisConfiguration();

 }

 public void doGet(HttpServletRequest request,
                         HttpServletResponse response) throws
ServletException {

         StringBuffer output = new StringBuffer("<html><body><h1>Service
List</h1>");
        int index = 1;
        for (Iterator iter = axisConfig.getServices().values().iterator();
iter.hasNext();){
            AxisService service = (AxisService) iter.next();
            output.append(index).append(". ").append(service.getName());
        }
        output.append("</body></html>");
        PrintWriter printWriter = response.getWriter();
        printWriter.write(output.toString());
        printWriter.flush();
        printWriter.close();
}
}

HTH
Azeez

On Jan 22, 2008 9:56 PM, red dog <[EMAIL PROTECTED]> wrote:

> Hello everyone,
>
> I have 2 embedded axis 2 services in my web app. How can I list all the
> available services? Invoking
> http://localhost:8080/AppName/services/listServices returns an empty page.
>
> Here is how i define the Axis Servlet in my web.xml:
>
> <
> servlet>
> <servlet-name>AxisServlet</servlet-name>
> <display-name>Apache-Axis Servlet</display-name>
> <servlet-class>org.apache.axis2.transport.http.AxisServlet</servlet-class>
>
> <load-on-startup>2</load-on-startup>
> </servlet>
> <servlet-mapping>
> <servlet-name>AxisServlet</servlet-name>
> <url-pattern>/services/*</url-pattern>
> </servlet-mapping>
> <servlet-mapping>
> <servlet-name>AxisServlet</servlet-name>
> <url-pattern>listServices</url-pattern>
> </servlet-mapping>
> Thank you,
>
> Radu
>
> ------------------------------
> Looking for last minute shopping deals? Find them fast with Yahoo! 
> Search.<http://us.rd.yahoo.com/evt=51734/*http://tools.search.yahoo.com/newsearch/category.php?category=shopping>
>



-- 
Thanks
Afkham Azeez

http://www.wso2.org
GPG Fingerprint: 643F C2AF EB78 F886 40C9  B2A2 4AE2 C887 665E 0760

Reply via email to