Why does Microsoft map XSD xs: integer to a string when importing WSDL?

A look at WDSL on a web service. xml claims that the data type is an integer, however when the web method is called, the method expects a string, the WDSL code below

<System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, DataType:="integer", Order:=0)> _

Public Property ID() As String
    Get
        Return Me.ID
    End Get
    Set(value As String)
        Me.ID= value
    End Set
End Property

It is right? I'm confused about why a string is required for transmission if serialization is talking about the type of an integer?

My experience tells me that on their side, that is, the server, they will pass the string to an integer? right?

thanks

+4
source share
1 answer

This turns out to be a surprisingly good question regarding some of the intricacies of XSD and how it can be mapped to .NET, such as C # or VB.NET.

XSD WSDL xs:integer. XML- xs: integer . xs: int, 32 .

WSDL xs:int, WSDL Int32.

xs:integer, , , ( ), " , , , " .

.NET BigInteger, , xs:intger , , string. , , , , .

. , gYearMonth DateTime, . string.

Microsoft WSDL.

, , ? ?

. ():

  • , , "john"
  • SOAP
  • , SOAP
  • , , . WCF, , .
  • - ( )
  • -
  • .... , , SOAP
+2

Source: https://habr.com/ru/post/1606922/


All Articles