You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "Chippada, Venkata" <Ve...@ca.com> on 2006/09/26 18:24:35 UTC

How can we generate wsdl without having messagecontext

Hi,

 

I have a need to get all the services deployed in axis and wsdls of
these services runtime without accessing the services where
messageContext not available. I could able to get the list of services
deployed as follows in a simple trial. Our services may not have wsdl
files located in the machine. So that it should generate the wsdl
runtime. Can we generate the wsdl without having messagecontext object
just by having ServiceDesc object. I really appreciate any help in this
regards. Thank in advance.

 

ServletContext context = this.getServletContext();

    Object contextObject = context.getAttribute("AxisEngine");

    if(contextObject instanceof AxisServer) {

                out.println("got AxisServer<br>");

                                EngineConfiguration conf =
((AxisEngine)contextObject).getConfig();

                                Iterator it =
conf.getDeployedServices();         

                                ServiceDesc desc = null;

                                //MessageContext msgContext = new
MessageContext((AxisEngine)contextObject);                          

                                while(it.hasNext()) {

                                                desc = (ServiceDesc)
it.next();          

 
out.println(desc.getName() + "<br>");

                                                SOAPService service =
conf.getService(new QName(desc.getName()));

                                                

 
//service.generateWSDL(msgContext); Here I am missing proper
messageContext object

                                }

}

 

Thanks & Regards,

Naresh