2
我想學習wsdl
作爲一個新鮮。我沒有完全理解XML或任何事情。我只知道基礎知識。我看到wsdl中的基本類型通常是xml模式,因此使用xsd:string
等。爲什麼'tns'前綴在wsdl文件的類型元素中不需要?
我的問題是:
在WSDL類型的元素,它裏面不使用tns
前綴就像是用於操作元素。爲什麼?
我附上了教程網站的摘錄。
<xs:schema
xmlns:xs= "http://www.w3.org/2001/XMLSchema"
targetNamespace= "http://jenkov.com/MyService/schema"
xmlns:tns= "http://jenkov.com/MyService/schema">
<xs:element name="latestTutorialRequest" type="typeLatestTutorialRequest"/>
<xs:complexType name="typeLatestTutorialRequest">
<xs:sequence>
<xs:element name="date" type="xs:date"/>
</xs:sequence>
</xs:complexType>
<xs:element name="latestTutorialResponse" type="xs:string"/>
<xs:element name="invalidDateError" type="xs:string"/>
</xs:schema>
不是應該..
<xs:schema
xmlns:xs= "http://www.w3.org/2001/XMLSchema"
targetNamespace= "http://jenkov.com/MyService/schema"
xmlns:tns= "http://jenkov.com/MyService/schema">
<xs:element name="latestTutorialRequest" type="**tns:typeLatestTutorialRequest**"/>
<xs:complexType name="typeLatestTutorialRequest">
<xs:sequence>
<xs:element name="date" type="xs:date"/>
</xs:sequence>
</xs:complexType>
<xs:element name="latestTutorialResponse" type="xs:string"/>
<xs:element name="invalidDateError" type="xs:string"/>
</xs:schema>