/[dgee]/dgee/cslib/DotGNU/XmlRpc/XmlRpcWriter.cs
ViewVC logotype

Diff of /dgee/cslib/DotGNU/XmlRpc/XmlRpcWriter.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1.2.7 by npg, Thu Jul 24 16:33:42 2003 UTC revision 1.1.2.8 by npg, Fri Jul 25 10:13:47 2003 UTC
# Line 56  namespace DotGNU.XmlRpc Line 56  namespace DotGNU.XmlRpc
56      {      {
57      }      }
58    
59        public void WriteMethodCall( string name )
60        {
61          WriteStartElement( "methodCall" );
62          WriteElementString( "methodName", name );
63        }
64    
65        public void WriteMethodCall( string name, object o )
66        {
67          WriteMethodCall( name );
68          WriteParams();
69          WriteParam( o );
70        }
71    
72      public void WriteMethodResponse()      public void WriteMethodResponse()
73      {      {
74        WriteStartElement( "methodResponse" );        WriteStartElement( "methodResponse" );
75      }      }
76        
77      public void WriteMethodResponse( object o )      public void WriteMethodResponse( object o )
78      {      {
79        WriteMethodResponse();        WriteMethodResponse();
# Line 68  namespace DotGNU.XmlRpc Line 81  namespace DotGNU.XmlRpc
81        WriteParam( o );        WriteParam( o );
82      }      }
83            
84        public void WriteMethodResponse( XmlRpcException e )
85        {
86          WriteMethodResponse();
87          WriteStartElement( "fault" );
88          XmlRpcStruct s = new XmlRpcStruct();
89          s.Add( "faultCode", e.FaultCode );
90          s.Add( "faultString", e.Message );
91          WriteValue( s );
92          WriteEndElement();
93        }
94    
95        public void WriteMethodResponse( Exception e )
96        {
97          XmlRpcException ex = new XmlRpcException( e );
98          WriteMethodResponse( ex );
99        }
100        
101      public void WriteParams()      public void WriteParams()
102      {      {
103        WriteStartElement( "params" );        WriteStartElement( "params" );
# Line 110  namespace DotGNU.XmlRpc Line 140  namespace DotGNU.XmlRpc
140      public void WriteDateTime( DateTime v )      public void WriteDateTime( DateTime v )
141      {      {
142        // ensure this is iso compliant        // ensure this is iso compliant
143        DateTime dt = (DateTime)v;        Console.Out.WriteLine( "Writing DateTime: " + v );
144          
145        // Why has MS got no clue about ISO 8601???  Horrid.  All        // Why has MS got no clue about ISO 8601???  Horrid.  All
146        // these newbies working on specs.  this is as close as it        // these newbies working on specs.  this is as close as it
147        // gets but not exactly since the 'T' can be left out        // gets but not exactly since the 'T' can be left out
148        WriteElementString( "dateTime.iso860", dt.ToString( "s" ) );        WriteElementString( "dateTime.iso8601", v.ToString( "s" ) );
149      }      }
150            
151      public void WriteBase64( byte[] v )      public void WriteBase64( byte[] v )

Legend:
Removed from v.1.1.2.7  
changed lines
  Added in v.1.1.2.8

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26