以文本方式查看主题

-  计算机科学论坛  (http://bbs.xml.org.cn/index.asp)
--  『 Web Services & Semantic Web Services 』  (http://bbs.xml.org.cn/list.asp?boardid=10)
----  关于这段wsdl的几个问题?请高人赐教  (http://bbs.xml.org.cn/dispbbs.asp?boardid=10&rootid=&id=36162)


--  作者: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/"为何要这样写?在此文件开头定义好不行吗?也有解析器来识别这个吗?匹配成什么阿?


--  作者:whoopee
--  发布时间:8/10/2006 5:53:00 PM

--  
就没人会吗?
W 3 C h i n a ( since 2003 ) 旗 下 站 点
苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
78.125ms