axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tobi" <tob...@gmx.de>
Subject querying AxisServlet does not return all deployed services
Date Sat, 12 Jul 2003 13:35:44 GMT
Hi,
 
for displaying the deployed axis services in my own jsp, I try to query
the AxisServlet to get all deployed services. The problem is, that I
only get the two services from Axis (Version and AdminService) and not
the third one, that I've deployed. Using the AxisServlet directly
through http://localhost:8080/axis/services I them all deployed
including my own one. Are there any policy restrictions that I have to
concern (axis and my application are running under a different context,
but in the same VM)?
 
 
Thanks in advance!
 
Tobias
 
The code I use is as follows:
 
import org.apache.axis.transport.http.AxisServlet;
import org.apache.axis.*;
 
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.ServletException;
import java.io.IOException;
import java.util.Iterator;
 
public class WebServiceDiscoveryServlet extends AxisServlet
{
            public void doGet (HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException
            {
                        String queryString = request.getQueryString ();
                        if (queryString != null)
                        {
                                   if (queryString.equalsIgnoreCase
("wsdl"))
                                   {
                                               super.doGet (request,
response);
                                               return;
                                   }
                        }
                        setWebServices (request, response);
                        forward (request, response);
            }
 
            public void doPost (HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException
            {
                        String queryString = request.getQueryString ();
                        if (queryString != null)
                        {
                                   if (queryString.equalsIgnoreCase
("wsdl"))
                                   {
                                               super.doPost (request,
response);
                                               return;
                                   }
                        }
 
                        setWebServices (request, response);
                        forward (request, response);
            }
 
            private void setWebServices (HttpServletRequest request,
HttpServletResponse response) throws IOException,
ConfigurationException, ServletException
            {
                        Iterator it = getEngine ().getConfig
().getDeployedServices (); // The Iterator contains only the 2 axis
services
                        getServletContext ().setAttribute
(Constants.DEPLOYED_WEB_SERVICES, it);
            }
 
            private void forward (HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException
            {
                        String forwardUrl = response.encodeRedirectURL
(Constants.DEPLOYED_WEB_SERVICES_JSP);
                        request.getRequestDispatcher
(forwardUrl).forward (request, response);
            }
}

Mime
View raw message