i++;
instanceId = args[i];
}
else
{
throw new XMLDispatcherCommException("Unexpected argument: '"+args[i]+"'");
}
}
if (verb == null || appName == null ||
className == null || methodName == null)
{
throw new XMLDispatcherCommException("missing argument");
}
input = new BufferedReader(new InputStreamReader(System.in));
xmlRqst = new StringBuffer();
while (-1 != (c = input.read()))
{
xmlRqst.append((char)c);
}
xdCli = new XMLDispatcherEJBClient(appName);
if (verb.equals("DispatchClassMethodXML"))
{
xmlRply = xdCli.dispatchClassMethodXML(className,methodName,xmlRqst.toString());
}
else if (verb.equals("DispatchNewInstanceMethodXML"))
{
xmlRply = xdCli.dispatchNewInstanceMethodXML(className,methodName,xmlRqst.toString());
}
else if (verb.equals("DispatchInstanceMethodXML"))
{
if (instanceId == null)
{
throw new XMLDispatcherCommException("Missing instanceId");
}
xmlRply = xdCli.dispatchInstanceMethodXML(className,methodName,instanceId,xmlRqst.toString());
}
else
{
throw new XMLDispatcherCommException("Invalid verb: "+verb);
}
System.out.print(xmlRply);
System.exit(0);
}
catch(Exception e)