Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > gMonthDay xsd type = string ?

Reply
Thread Tools

gMonthDay xsd type = string ?

 
 
Michel Posseth [MCP]
Guest
Posts: n/a
 
      05-16-2008
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
 
Reply With Quote
 
 
 
 
Michel Posseth [MCP]
Guest
Posts: n/a
 
      05-21-2008
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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
XSD type derived via restriction in same namespace as restricted type? burkley@gmail.com XML 7 09-18-2007 01:51 PM
XML + XSD: Is it possible to get all errors against the XSD? Markus Java 1 11-22-2005 02:53 PM
xsd:any as a child of xsd:all Peter Aberline XML 0 04-05-2004 03:38 PM
referencing another XSD file within an XSD file JavaDeveloper@nowhere.com XML 1 01-14-2004 05:22 PM
XSD document for XSD defintion Rick Razzano XML 1 09-26-2003 12:41 AM



Advertisments