-- 作者:whoopee
-- 发布时间:7/28/2006 9:50:00 AM
-- 关于这段wsdl的几个问题?请高人赐教
<?xml version="1.0" encoding="UTF-8"?> <definitions name="WeatherService" targetNamespace="http://www.ecerami.com/wsdl/WeatherService.wsdl" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://www.ecerami.com/wsdl/WeatherService.wsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <message name="getWeatherRequest"> <part name="zipcode" type="xsd:string"/> </message> <message name="getWeatherResponse"> <part name="temperature" type="xsd:int"/> </message> <portType name="Weather_PortType"> <operation name="getWeather"> <input message="tns:getWeatherRequest"/> <output message="tns:getWeatherResponse"/> </operation> </portType> <binding name="Weather_Binding" type="tns:Weather_PortType"> <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> <operation name="getWeather"> <soap:operation soapAction=""/> <input> <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:examples:weatherservice" use="encoded"/> </input> <output> <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:examples:weatherservice" use="encoded"/> </output> </operation> </binding> <service name="Weather_Service"> <documentation>WSDL File for Weather Service</documentation> <port binding="tns:Weather_Binding" name="Weather_Port"> <soap:address location="http://localhost:8080/soap/servlet/rpcrouter"/> </port> </service> </definitions> 1.targetNamespace="http://www.ecerami.com/wsdl/WeatherService.wsdl"是不是就是定义本文件的空间的?那还要那个xmlns:tns="http://www.ecerami.com/wsdl/WeatherService.wsdl"干嘛?那个tns是干什么用的哪? 2.xmlns:xsd="http://www.w3.org/2001/XMLSchema",后面那段URI由谁来验证正确性哪?java的xml解析器? 我怎么知道该写2001还是1999哪? 3.encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"为何要这样写?在此文件开头定义好不行吗?也有解析器来识别这个吗?匹配成什么阿?
|