Web Service描述语言 WSDL 详解(4)

WSDL的Types栏和Messages栏中的XML Schema

  WSDL数据类型是基于"XML Schema: Datatypes"(XSD)的,现在已经被W3C推荐。这一文档共有三个版本(1999,2000/10,2001),因此必须在namespace属性的<definitions>元素中指明所使用的是哪一个版本。

  

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

  在本文中,我将只考虑2001版本。WSDL标准的推荐者强烈建议使用2001版。

  在本栏和以后各部分,需使用以下简缩或前缀

前缀代表的Namespace描述
Soapenchttp://schemas.xmlsoap.org/soap/encodingSOAP 1.1 encoding
Wsdlhttp://schemas.xmlsoap.org/wsdl/soapWSDL 1.1
Xsdhttp://www.w3.org/2001/XMLSchemaXML Schema

   XSD基类型

  下表是直接从MSTK2文档中取出的,列举了MSTK2所支持的所有XSD基类型。它也告诉在客户端或服务器端的WSDL读取程序如何把XSD类型映射到在VB、C++和IDL中相应的类型。

XSD (Soap)类型变量类型VBC++IDLComments
anyURIVT_BSTRStringBSTRBSTR 
base64BinaryVT_ARRAY | VT_UI1Byte()SAFEARRAYSAFEARRAY(unsigned char) 
BooleanVT_BOOLBooleanVARIANT_BOOLVARIANT_BOOL 
ByteVT_I2Integershortshort转换时验证范围有效性
DateVT_DATEDateDATEDATE时间设为 oo:oo:oo
DateTimeVT_DATEDateDATEDATE 
DoubleVT_R8Doubledoubledouble 
DurationVT_BSTRStringBSTRBSTR不转换和生效
ENTITIESVT_BSTRStringBSTRBSTR不转换和生效
ENTITYVT_BSTRStringBSTRBSTR不转换和生效
FloatVT_R4Singlefloatfloat 
GDayVT_BSTRStringBSTRBSTR不转换和生效
GMonthVT_BSTRStringBSTRBSTR不转换和生效
GMonthDayVT_BSTRStringBSTRBSTR不转换和生效
GYearVT_BSTRStringBSTRBSTR不转换和生效
GYearMonthVT_BSTRStringBSTRBSTR不转换和生效
IDVT_BSTRStringBSTRBSTR不转换和生效
IDREFVT_BSTRStringBSTRBSTR不转换和生效
IDREFSVT_BSTRStringBSTRBSTR不转换和生效
IntVT_I4Longlonglong 
IntegerVT_DECIMALVariantDECIMALDECIMAL转换时范围生效
LanguageVT_BSTRStringBSTRBSTR不转换和生效
LongVT_DECIMALVariantDECIMALDECIMAL转换时范围生效
NameVT_BSTRStringBSTRBSTR不转换和生效
NCNameVT_BSTRStringBSTRBSTR不转换和生效
negativeIntegerVT_DECIMALVariantDECIMALDECIMAL转换时范围生效
NMTOKENVT_BSTRStringBSTRBSTR不转换和生效
NMTOKENSVT_BSTRStringBSTRBSTR不转换和生效
nonNegativeIntegeVT_DECIMALVariantDECIMALDECIMAL转换时范围生效
nonPositiveIntegerVT_DECIMALVariantDECIMADECIMAL转换时范围生效
normalizedStringVT_BSTRStringBSTRBSTR 
NOTATIONVT_BSTRStringBSTRBSTR不转换和生效
NumberVT_DECIMALVariantDECIMALDECIMAL 
positiveIntegerVT_DECIMALVariantDECIMALDECIMAL转换时范围生效
QnameVT_BSTRStringBSTRBSTR不转换和生效
ShortVT_I2Integershortshort 
StringVT_BSTRStringBSTRBSTR 
TimeVT_DATEDateDATEDATE日设为1899年12月30日
TokenVT_BSTRStringBSTRBSTR不转换和生效
unsignedByteVT_UI1Byteunsigned charunsigned char 
UnsignedIntVT_DECIMALVariantDECIMALDECIMAL转换时范围生效
unsignedLongVT_DECIMALVariantDECIMALDECIMAL转换时范围生效
unsignedShortVT_UI4LongLongLong转换时范围生效

  XSD定义了两套内建的数据类型:原始的和派生的。在下文中查阅内建数据类型的层次十分有益:

http://www.w3.org/TR/2001/PR-xmlschema-2-20010330
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值