Reputation: 5967
How to list all the web services deployed on server? Is there any global command used to list the same?
Like in my services, i have following path in common:
path="vms/CaseServices"
path="vms/ActivityServices"
path="vms/FileDownloadServices"
and to access them i use
http://localhost:8080/vms/CaseServices?wsdl
But how to list all web services available on server, whether using Java code?
Upvotes: 2
Views: 1978
Reputation: 546
In Mule you can do it with a transformer:
public class HttpPathsTransformer extends AbstractMessageTransformer {
@Override
public Object transformMessage(MuleMessage message, String encoding) throws TransformerException {
StringBuilder sb = new StringBuilder("paths: ");
Collection<DefaultHttpListener> listener = muleContext.getRegistry().lookupObjects(DefaultHttpListener.class);
for (DefaultHttpListener l : listener) {
logger.info("path: " + l.getPath());
sb.append(System.lineSeparator()).append(l.getPath());
}
return sb.toString();
}
}
Logs the paths and returns them as a String.
That are all http paths, not only web services.
Upvotes: 2