23 |
* Authors: |
* Authors: |
24 |
* Nicolai P Guba |
* Nicolai P Guba |
25 |
*/ |
*/ |
|
using System.Reflection; |
|
26 |
using DotGNU.XmlRpc; |
using DotGNU.XmlRpc; |
27 |
|
|
28 |
namespace DotGNU.DGEE.Protocols.XmlRpc |
namespace DotGNU.DGEE.Protocols.XmlRpc |
29 |
{ |
{ |
30 |
public class XmlRpcReplyHandler : IWebServiceReplyHandler |
public class XmlRpcReplyHandler : IWebServiceReplyHandler |
31 |
{ |
{ |
32 |
public String GetReply( String assemblyName, String className, String methodName ) { |
public String GetReply( String assemblyName, String className, String methodName ) |
33 |
|
{ |
34 |
string reply; |
XmlRpcWriter writer = new XmlRpcWriter(); |
|
XmlRpcWriter writer = new XmlRpcWriter(); |
|
|
|
|
35 |
XmlRpcStruct h = new XmlRpcStruct(); |
XmlRpcStruct h = new XmlRpcStruct(); |
36 |
|
|
37 |
int i = 1; |
int i = 1; |
38 |
double d = 2.0; |
double d = 2.99; |
39 |
bool b = false; |
bool b = false; |
40 |
byte[] bytes = {0x00, 0x12, 0x34, 0x56, 0xAA, 0x55, 0xFF}; |
byte[] bytes = {0x00, 0x12, 0x34, 0x56, 0xAA, 0x55, 0xFF}; |
41 |
|
|
54 |
a.Add( b ); |
a.Add( b ); |
55 |
a.Add( "some dodgy text"); |
a.Add( "some dodgy text"); |
56 |
a.Add( h0 ); |
a.Add( h0 ); |
57 |
a.Add( new DateTime() ); |
a.Add( DateTime.Now ); |
58 |
a.Add( bytes ); |
a.Add( bytes ); |
59 |
h["An array"] = a; |
h["An array"] = a; |
|
reply = writer.Parse( h ); |
|
60 |
|
|
61 |
|
string reply = writer.Parse( h ); |
62 |
return reply; |
return reply; |
63 |
} |
} |
64 |
} |
} |