39 |
static protected bool dgeeDebug = false; |
static protected bool dgeeDebug = false; |
40 |
|
|
41 |
/// this method is the entry point for the pnetvm |
/// this method is the entry point for the pnetvm |
42 |
public static String DGEE_run( String []args ) |
public static String DGEE_run( String []args ) |
43 |
{ |
{ |
44 |
if( args.Length < 3 ) { |
if( args.Length < 3 ) { |
45 |
// npg: How do we raise exceptions here? Will this work and get |
// |
46 |
// serialised properly?? |
// TODO: plug in generic exception handling |
47 |
|
// via the IProtocolsException handler interface. |
48 |
throw new |
throw new |
49 |
Exception( "Not enough arguments passed to DGEE request handler" ); |
Exception( "Not enough arguments passed to DGEE request handler" ); |
50 |
} |
} |
94 |
// request. |
// request. |
95 |
// |
// |
96 |
// FIXME - This is hardcoaded as an XmlRpcMethod object |
// FIXME - This is hardcoaded as an XmlRpcMethod object |
97 |
|
// (yep, for now it is --for simplicity's sake ;) [npg] |
98 |
// |
// |
99 |
minfo = ac.ResolveMethod( type, |
minfo = ac.ResolveMethod( type, |
100 |
(method != null) ? method : ((XmlRpcMethod)rMethod).Name); |
(method != null) ? method : ((XmlRpcMethod)rMethod).Name); |
101 |
|
|
102 |
// npg: This is where we've had issues before. In your XmlRpcMethod obj |
Object result = minfo.Invoke( null, rMethod.ToArray() ); |
|
// you've got an invoke method. That is fine there for general use |
|
|
// but for the DGEE we really want to do the invoking *here* |
|
|
// so we can use the AssemblyContainer directly. |
|
|
// (We don't want the dgee specific assemblycontainer within the |
|
|
// XmlRpc implementation). |
|
|
// Note that I've got it to fall back to the request derived method |
|
|
// name if none is passed in - this should also be done for type I |
|
|
// suppose - TODO when we need it. |
|
|
// |
|
|
// So, where do we get the request arguments from for the invoke?? |
|
|
// |
|
|
Object result = minfo.Invoke(null, null /* request-arguments */ ); |
|
103 |
|
|
104 |
// Send reply back via the Protocol's response handler |
// Send reply back via the Protocol's response handler |
105 |
// implementation |
// implementation |
116 |
|
|
117 |
return outputString; |
return outputString; |
118 |
} |
} |
119 |
|
} |
|
} |
|
120 |
} |
} |