Loading ...
Sorry, an error occurred while loading the content.

Re: [XMLRPCNET] Re: dateTime error ?

Expand Messages
  • charlescook@ukonline.co.uk
    Hi Charles - to convert a DateTime instance to an iso8601 formatted string I use the following code: DateTime dt = ...... string dtstr =
    Message 1 of 14 , Nov 14, 2002
    View Source
    • 0 Attachment
      Hi Charles - to convert a DateTime instance to an "iso8601 formatted" string I
      use the following code:

      DateTime dt = ......
      string dtstr = dt.ToString("yyyyMMddTHH:mm:ss", null);

      - Charles

      Quoting Charles Nadeau <charles@...>:

      > --- In XMLRPCNET@y..., "charlescookuk" <charlescook@u...> wrote:
      > > Hi Charles - the problem with this is how tolerant should you be of
      > > requests/responses which contain non-standard dateTime values?
      >
      > Basically I need a function that will take a DateTime typed variable
      > and output a iso8601 formated string I can pass to my XML-RPC server.
      > Maybe I could create a class inheriting from System.DateTime and add
      > a "ToIso8601" public method...
      > I'll try to find something... Any suggestion?
      >
      > > Calling the type "dateTime.iso8601" is a red-herring because the
      > > format is not compliant with ISO 8601, and anyway I wouldn't want
      > to
      > > implement compliance with ISO 8601 because that covers a wide range
      > > of formats.
      > >
      > > Maybe the best solution is to handle non-compliancy on a
      > case-by-case
      > > approach. What is the dateTime format you are having problems with?
      > > It probably wouldn't involve much work to support it. Any chance of
      > > persuading the implementor to become XML-RPC compliant?
      >
      > Shouldn't be tough: I wrote the server too... ;-)
      >
      > Charles
      >
      > Charles Nadeau
      > http://radio.weblogs.com/0111823/
      >
      > >
      > > - Charles
      > >
      > > - Charles
      > > --- In XMLRPCNET@y..., "Charles Nadeau" <charles@e...> wrote:
      > > > --- In XMLRPCNET@y..., "charlescookuk" <charlescook@u...> wrote:
      > > > > My understanding is that dateTimes in XML-RPC should always be
      > of
      > > > this
      > > > > format:
      > > > >
      > > > > YYYYMMDDTHH:mm:SS
      > > > >
      > > > > i.e. without timezone, and no hyphens between YYYYMMDD (which is
      > > > > allowed by ISO 8601). This is the position taken in the book
      > > > > "Programming Web Services with XML-RPC".
      > > > >
      > > > > So the current XML-RPC.NET implementation is strictly adhering
      > to
      > > > the
      > > >
      > > >
      > > > > XML-RPC standard. I suppose I should really implement
      > XML-RPC.NET
      > > to
      > > > > accept different formats but only output the format above.
      > > >
      > > > Any progress on this? I am at a point where I would need such a
      > > > feature. If I can be of any help, please let me know.
      > > >
      > > > Charles Nadeau
      > > > http://radio.weblogs.com/0111823/
      > > >
      > > > >
      > > > > - Charles
      > > > >
      > > > >
      > > > > --- In XMLRPCNET@y..., "simonfell99" <soap@z...> wrote:
      > > > > > I'm trying to send a dateTime to a XML-RPC.NET server as
      > > > > > <dateTime.iso8601>2002-05-11T12:48:37Z</dateTime.iso8601>
      > > > > >
      > > > > > but i get this error
      > > > > > HTTP/1.1 400 dateTime element is invalid.
      > > > > >
      > > > > > AFAICS Its a valid iso8601 date, is it not expecting to get a
      > > TZ
      > > > > > trailer ? [i notice the examples in the spec don't show
      > > timezones]
      > > > > >
      > > > > > Thanks
      > > > > > Simon
      >
      >
      > To unsubscribe from this group, send an email to:
      > XMLRPCNET-unsubscribe@yahoogroups.com
      >
      >
      >
      > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
      >
      >
      >




      ----------------------------------------------
      This mail sent through http://www.ukonline.net
    • alexhung@mac.com
      Charles, I am running into a brick wall with TypePad over dateTime.iso8601 at the moment. The date format TypePad sends back is the ISO8601 extended format,
      Message 2 of 14 , Jan 4, 2004
      View Source
      • 0 Attachment
        Charles,

        I am running into a brick wall with TypePad over dateTime.iso8601 at
        the moment. The date format TypePad sends back is the ISO8601 extended
        format, e.g. 2003-12-30T10:43:56Z. And XML-RPC.NET throws an
        exception, of course.

        Since I can't change what TypePad sends back, what would my best
        course of action? Any workarounds that I can implement without any
        waiting for modification to the library from you?

        Thanks,
        Alex

        --- In XMLRPCNET@yahoogroups.com, charlescook@u... wrote:
        > Hi Charles - to convert a DateTime instance to an "iso8601
        formatted" string I
        > use the following code:
        >
        > DateTime dt = ......
        > string dtstr = dt.ToString("yyyyMMddTHH:mm:ss", null);
        >
        > - Charles
        >
      • charlescookuk
        Hi Alex - have you tried reporting this to the TypePad people? Returning dates in this format is invalid XML-RPC. - Charles ... extended
        Message 3 of 14 , Jan 6, 2004
        View Source
        • 0 Attachment
          Hi Alex - have you tried reporting this to the TypePad people?
          Returning dates in this format is invalid XML-RPC.

          - Charles

          --- In XMLRPCNET@yahoogroups.com, alexhung@m... wrote:
          > Charles,
          >
          > I am running into a brick wall with TypePad over dateTime.iso8601 at
          > the moment. The date format TypePad sends back is the ISO8601
          extended
          > format, e.g. 2003-12-30T10:43:56Z. And XML-RPC.NET throws an
          > exception, of course.
          >
          > Since I can't change what TypePad sends back, what would my best
          > course of action? Any workarounds that I can implement without any
          > waiting for modification to the library from you?
          >
          > Thanks,
          > Alex
          >
          > --- In XMLRPCNET@yahoogroups.com, charlescook@u... wrote:
          > > Hi Charles - to convert a DateTime instance to an "iso8601
          > formatted" string I
          > > use the following code:
          > >
          > > DateTime dt = ......
          > > string dtstr = dt.ToString("yyyyMMddTHH:mm:ss", null);
          > >
          > > - Charles
          > >
        • alexhung@mac.com
          Hi Charles, I have not but I ve found that it was a known bug that was fixed in MT2.65 which was released in mid-Dec. I guess TypePad has not been upgraded to
          Message 4 of 14 , Jan 6, 2004
          View Source
          • 0 Attachment
            Hi Charles,

            I have not but I've found that it was a known bug that was fixed in MT2.65 which was
            released in mid-Dec. I guess TypePad has not been upgraded to that version yet. I am
            planning to email TypePad helpdesk to find out the timeframe...

            Thanks,
            Alex

            --- In XMLRPCNET@yahoogroups.com, "charlescookuk" <charlescook@u...> wrote:
            > Hi Alex - have you tried reporting this to the TypePad people?
            > Returning dates in this format is invalid XML-RPC.
            >
            > - Charles
            >
            > --- In XMLRPCNET@yahoogroups.com, alexhung@m... wrote:
            > > Charles,
            > >
            > > I am running into a brick wall with TypePad over dateTime.iso8601 at
            > > the moment. The date format TypePad sends back is the ISO8601
            > extended
            > > format, e.g. 2003-12-30T10:43:56Z. And XML-RPC.NET throws an
            > > exception, of course.
            > >
            > > Since I can't change what TypePad sends back, what would my best
            > > course of action? Any workarounds that I can implement without any
            > > waiting for modification to the library from you?
            > >
            > > Thanks,
            > > Alex
            > >
            > > --- In XMLRPCNET@yahoogroups.com, charlescook@u... wrote:
            > > > Hi Charles - to convert a DateTime instance to an "iso8601
            > > formatted" string I
            > > > use the following code:
            > > >
            > > > DateTime dt = ......
            > > > string dtstr = dt.ToString("yyyyMMddTHH:mm:ss", null);
            > > >
            > > > - Charles
            > > >
          • alexhung@mac.com
            Charles, Talked to Ben Trott at TypePad/MT. His reply is that MTv2.65 and TypePad supports ISO8601 date format (which is true) but not the format given in the
            Message 5 of 14 , Jan 12, 2004
            View Source
            • 0 Attachment
              Charles,

              Talked to Ben Trott at TypePad/MT. His reply is that MTv2.65 and
              TypePad supports ISO8601 date format (which is true) but not the
              format given in the XML-RPC spec example.

              So... would it be possible for you to add just one more date/time
              format (YYYY-MM-DDThh:mm:ssZ) mapping to the library? Currently my
              project is pretty much dead in the water because I can't get posts
              from the server.

              Let me know (via email if you wish).

              Alex

              --- In XMLRPCNET@yahoogroups.com, "charlescookuk" <charlescook@u...>
              wrote:
              > Hi Alex - have you tried reporting this to the TypePad people?
              > Returning dates in this format is invalid XML-RPC.
              >
              > - Charles
            • charlescookuk
              You could try something along these lines in XmlRpcSerializer.ParseDateTime: DateTime dt; try { dt = DateTime.ParseExact(s, yyyyMMddThh:mm:ss ,
              Message 6 of 14 , Jan 13, 2004
              View Source
              • 0 Attachment
                You could try something along these lines in
                XmlRpcSerializer.ParseDateTime:

                DateTime dt;
                try
                {
                dt = DateTime.ParseExact(s, "yyyyMMddThh:mm:ss",
                CultureInfo.InvariantCulture);
                }
                catch (System.FormatException ex)
                {
                // workaround for TypePad
                dt = DateTime.ParseExact(s, "yyyy-MM-ddThh:mm:ssZ",
                CultureInfo.InvariantCulture);
                }


                --- In XMLRPCNET@yahoogroups.com, alexhung@m... wrote:
                > Charles,
                >
                > Talked to Ben Trott at TypePad/MT. His reply is that MTv2.65 and
                > TypePad supports ISO8601 date format (which is true) but not the
                > format given in the XML-RPC spec example.
                >
                > So... would it be possible for you to add just one more date/time
                > format (YYYY-MM-DDThh:mm:ssZ) mapping to the library? Currently my
                > project is pretty much dead in the water because I can't get posts
                > from the server.
                >
                > Let me know (via email if you wish).
                >
                > Alex
                >
                > --- In XMLRPCNET@yahoogroups.com, "charlescookuk" <charlescook@u...>
                > wrote:
                > > Hi Alex - have you tried reporting this to the TypePad people?
                > > Returning dates in this format is invalid XML-RPC.
                > >
                > > - Charles
              • countzero@yahoo.co.uk
                Thanks for the suggestion. I am getting a Cryptographic failure during the build though. It can t find the CookComputing.key file to do the signing of the
                Message 7 of 14 , Jan 13, 2004
                View Source
                • 0 Attachment
                  Thanks for the suggestion.

                  I am getting a Cryptographic failure during the build though. It can't
                  find the 'CookComputing.key' file to do the signing of the assembly.

                  I am using the latest version from your site, 0.8.1.

                  --- In XMLRPCNET@yahoogroups.com, "charlescookuk" <charlescook@u...>
                  wrote:
                  > You could try something along these lines in
                  > XmlRpcSerializer.ParseDateTime:
                  >
                  > DateTime dt;
                  > try
                  > {
                  > dt = DateTime.ParseExact(s, "yyyyMMddThh:mm:ss",
                  > CultureInfo.InvariantCulture);
                  > }
                  > catch (System.FormatException ex)
                  > {
                  > // workaround for TypePad
                  > dt = DateTime.ParseExact(s, "yyyy-MM-ddThh:mm:ssZ",
                  > CultureInfo.InvariantCulture);
                  > }
                  >
                  >
                  > --- In XMLRPCNET@yahoogroups.com, alexhung@m... wrote:
                  > > Charles,
                  > >
                  > > Talked to Ben Trott at TypePad/MT. His reply is that MTv2.65 and
                  > > TypePad supports ISO8601 date format (which is true) but not the
                  > > format given in the XML-RPC spec example.
                  > >
                  > > So... would it be possible for you to add just one more date/time
                  > > format (YYYY-MM-DDThh:mm:ssZ) mapping to the library? Currently my
                  > > project is pretty much dead in the water because I can't get posts
                  > > from the server.
                  > >
                  > > Let me know (via email if you wish).
                  > >
                  > > Alex
                  > >
                  > > --- In XMLRPCNET@yahoogroups.com, "charlescookuk" <charlescook@u...>
                  > > wrote:
                  > > > Hi Alex - have you tried reporting this to the TypePad people?
                  > > > Returning dates in this format is invalid XML-RPC.
                  > > >
                  > > > - Charles
                • charlescook@ukonline.co.uk
                  From the FAQ: 6.3 Why is the key file not included in the distribution? Building XML-RPC.NET from the distribution will fail because of a missing file called
                  Message 8 of 14 , Jan 13, 2004
                  View Source
                  • 0 Attachment
                    From the FAQ:

                    6.3 Why is the key file not included in the distribution?
                    Building XML-RPC.NET from the distribution will fail because of a missing file
                    called CookComputing.key. This contains the public/private key pair used to
                    sign the CookComputing.XmlRpc.dll assembly with a strong name. The file is not
                    distributed because this would enable anyone else to build a malicious version
                    of the assembly and pass it off as originating from Cook Computing.

                    To generate your own key file using the sn.exe tool as follows:

                    sn -k mykeyfile.snk
                    and modify the relevant line in assemblyinfo.cs:

                    [assembly: AssemblyKeyFile("mykeyfile.snk")]

                    Alternatively, comment out this line if you do not need to sign your assembly
                    with a strong name.






                    Quoting countzero@...:

                    > Thanks for the suggestion.
                    >
                    > I am getting a Cryptographic failure during the build though. It can't
                    > find the 'CookComputing.key' file to do the signing of the assembly.
                    >
                    > I am using the latest version from your site, 0.8.1.
                    >
                    > --- In XMLRPCNET@yahoogroups.com, "charlescookuk" <charlescook@u...>
                    > wrote:
                    > > You could try something along these lines in
                    > > XmlRpcSerializer.ParseDateTime:
                    > >
                    > > DateTime dt;
                    > > try
                    > > {
                    > > dt = DateTime.ParseExact(s, "yyyyMMddThh:mm:ss",
                    > > CultureInfo.InvariantCulture);
                    > > }
                    > > catch (System.FormatException ex)
                    > > {
                    > > // workaround for TypePad
                    > > dt = DateTime.ParseExact(s, "yyyy-MM-ddThh:mm:ssZ",
                    > > CultureInfo.InvariantCulture);
                    > > }
                    > >
                    > >
                    > > --- In XMLRPCNET@yahoogroups.com, alexhung@m... wrote:
                    > > > Charles,
                    > > >
                    > > > Talked to Ben Trott at TypePad/MT. His reply is that MTv2.65 and
                    > > > TypePad supports ISO8601 date format (which is true) but not the
                    > > > format given in the XML-RPC spec example.
                    > > >
                    > > > So... would it be possible for you to add just one more date/time
                    > > > format (YYYY-MM-DDThh:mm:ssZ) mapping to the library? Currently my
                    > > > project is pretty much dead in the water because I can't get posts
                    > > > from the server.
                    > > >
                    > > > Let me know (via email if you wish).
                    > > >
                    > > > Alex
                    > > >
                    > > > --- In XMLRPCNET@yahoogroups.com, "charlescookuk" <charlescook@u...>
                    > > > wrote:
                    > > > > Hi Alex - have you tried reporting this to the TypePad people?
                    > > > > Returning dates in this format is invalid XML-RPC.
                    > > > >
                    > > > > - Charles
                    >
                    >
                    >
                    >
                    > Yahoo! Groups Links
                    >
                    > To visit your group on the web, go to:
                    > http://groups.yahoo.com/group/XMLRPCNET/
                    >
                    > To unsubscribe from this group, send an email to:
                    > XMLRPCNET-unsubscribe@yahoogroups.com
                    >
                    > Your use of Yahoo! Groups is subject to:
                    > http://docs.yahoo.com/info/terms/
                    >
                    >
                    >




                    ----------------------------------------------
                    This mail sent through http://www.ukonline.net
                  • countzero@yahoo.co.uk
                    Opps, should have re-read FAQ... my bad :) ... missing file ... used to ... file is not ... malicious version ... assembly ...
                    Message 9 of 14 , Jan 13, 2004
                    View Source
                    • 0 Attachment
                      Opps, should have re-read FAQ... my bad :)

                      --- In XMLRPCNET@yahoogroups.com, charlescook@u... wrote:
                      > From the FAQ:
                      >
                      > 6.3 Why is the key file not included in the distribution?
                      > Building XML-RPC.NET from the distribution will fail because of a
                      missing file
                      > called CookComputing.key. This contains the public/private key pair
                      used to
                      > sign the CookComputing.XmlRpc.dll assembly with a strong name. The
                      file is not
                      > distributed because this would enable anyone else to build a
                      malicious version
                      > of the assembly and pass it off as originating from Cook Computing.
                      >
                      > To generate your own key file using the sn.exe tool as follows:
                      >
                      > sn -k mykeyfile.snk
                      > and modify the relevant line in assemblyinfo.cs:
                      >
                      > [assembly: AssemblyKeyFile("mykeyfile.snk")]
                      >
                      > Alternatively, comment out this line if you do not need to sign your
                      assembly
                      > with a strong name.
                      >
                      >
                      >
                      >
                      >
                      >
                      > Quoting countzero@y...:
                      >
                      > > Thanks for the suggestion.
                      > >
                      > > I am getting a Cryptographic failure during the build though. It can't
                      > > find the 'CookComputing.key' file to do the signing of the assembly.
                      > >
                      > > I am using the latest version from your site, 0.8.1.
                      > >
                      > > --- In XMLRPCNET@yahoogroups.com, "charlescookuk" <charlescook@u...>
                      > > wrote:
                      > > > You could try something along these lines in
                      > > > XmlRpcSerializer.ParseDateTime:
                      > > >
                      > > > DateTime dt;
                      > > > try
                      > > > {
                      > > > dt = DateTime.ParseExact(s, "yyyyMMddThh:mm:ss",
                      > > > CultureInfo.InvariantCulture);
                      > > > }
                      > > > catch (System.FormatException ex)
                      > > > {
                      > > > // workaround for TypePad
                      > > > dt = DateTime.ParseExact(s, "yyyy-MM-ddThh:mm:ssZ",
                      > > > CultureInfo.InvariantCulture);
                      > > > }
                      > > >
                      > > >
                      > > > --- In XMLRPCNET@yahoogroups.com, alexhung@m... wrote:
                      > > > > Charles,
                      > > > >
                      > > > > Talked to Ben Trott at TypePad/MT. His reply is that MTv2.65 and
                      > > > > TypePad supports ISO8601 date format (which is true) but not the
                      > > > > format given in the XML-RPC spec example.
                      > > > >
                      > > > > So... would it be possible for you to add just one more date/time
                      > > > > format (YYYY-MM-DDThh:mm:ssZ) mapping to the library? Currently my
                      > > > > project is pretty much dead in the water because I can't get posts
                      > > > > from the server.
                      > > > >
                      > > > > Let me know (via email if you wish).
                      > > > >
                      > > > > Alex
                      > > > >
                      > > > > --- In XMLRPCNET@yahoogroups.com, "charlescookuk"
                      <charlescook@u...>
                      > > > > wrote:
                      > > > > > Hi Alex - have you tried reporting this to the TypePad people?
                      > > > > > Returning dates in this format is invalid XML-RPC.
                      > > > > >
                      > > > > > - Charles
                      > >
                      > >
                      > >
                      > >
                      > > Yahoo! Groups Links
                      > >
                      > > To visit your group on the web, go to:
                      > > http://groups.yahoo.com/group/XMLRPCNET/
                      > >
                      > > To unsubscribe from this group, send an email to:
                      > > XMLRPCNET-unsubscribe@yahoogroups.com
                      > >
                      > > Your use of Yahoo! Groups is subject to:
                      > > http://docs.yahoo.com/info/terms/
                      > >
                      > >
                      > >
                      >
                      >
                      >
                      >
                      > ----------------------------------------------
                      > This mail sent through http://www.ukonline.net
                    Your message has been successfully submitted and would be delivered to recipients shortly.