Dear all,
I have two questions:
* does anybody know a convenient way to get the list of deployed
services on a remote server whitout having to use the
ServiceManagerClient (which is a little dangerous letting to use by
clients). I wrote a client (see below) able to do this, and it works,
but I don't know if this is the correct way to do. Does anybody have an
alternative?
* is there a way to extract the arguments/parameters a service needs
before sending a request (with possibly wrong parameter settings) or do
I just have to try and catch if things didn't work?
Thanks a lot,
Bert
public class ServiceLister
{
public String[] list (String url) throws Exception
{
Call call = new Call ();
call.setTargetObjectURI (ServerConstants.SERVICE_MANAGER_SERVICE_NAME);
call.setMethodName ("list");
call.setEncodingStyleURI (Constants.NS_URI_SOAP_ENC);
Response resp = call.invoke (new URL(url), "");
if (!resp.generatedFault ())
{
Parameter result = resp.getReturnValue();
String[] services = (String[]) result.getValue();
return services;
}
else
{
return null;
}
}
}