gMonthDay xsd type = string ?

Discussion in 'ASP .Net Web Services' started by Michel Posseth [MCP], May 16, 2008.

  1. xsd:gMonthDay is a common type for dates , why is it mapped to a string
    datatype when using wsdl.exe on a WSDL where it is defined as gMonthDay type

    regards

    Michel
     
    Michel Posseth [MCP], May 16, 2008
    #1
    1. Advertising

  2. RE: gMonthDay xsd type = string ? #SOLVED#

    For those of you ever wondering the XSD types are strings and you can parse
    them back and formward using the following code

    Imports System.Runtime.Remoting.Metadata.W3cXsd2001


    VB

    Dim gMonthDay As SoapMonthDay = SoapMonthDay.Parse("--01-08")
    MsgBox(gMonthDay.Value)

    Dim gMonthDay2 As New SoapMonthDay(Now)

    MsgBox(gMonthDay2.ToString)

    C#

    private void Test()

    {

    SoapMonthDay xsdMonthDay = SoapMonthDay.Parse("--01-08");

    Interaction.MsgBox(xsdMonthDay.Value);

    }



    gMonthDay.Value returnds a date variabel





    And the other way around



    private void Test2()

    {

    SoapMonthDay xsdMonthDay = new SoapMonthDay(Now);



    Interaction.MsgBox(xsdMonthDay.ToString);





    }








    "Michel Posseth [MCP]" wrote:

    > xsd:gMonthDay is a common type for dates , why is it mapped to a string
    > datatype when using wsdl.exe on a WSDL where it is defined as gMonthDay type
    >
    > regards
    >
    > Michel
     
    Michel Posseth [MCP], May 21, 2008
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Markus
    Replies:
    1
    Views:
    1,137
    Markus
    Nov 22, 2005
  2. Rick Razzano

    XSD document for XSD defintion

    Rick Razzano, Sep 26, 2003, in forum: XML
    Replies:
    1
    Views:
    505
    C. M. Sperberg-McQueen
    Sep 26, 2003
  3. Replies:
    1
    Views:
    878
    Martin Honnen
    Jan 14, 2004
  4. Peter Aberline

    xsd:any as a child of xsd:all

    Peter Aberline, Apr 5, 2004, in forum: XML
    Replies:
    0
    Views:
    803
    Peter Aberline
    Apr 5, 2004
  5. Bernd Oninger
    Replies:
    1
    Views:
    534
    Henry S. Thompson
    Jun 30, 2004
Loading...

Share This Page