当前位置:编程学习 > C#/ASP.NET >>

“WSDL” 是不是可以被所有的“语言生成类”

<?xml version="1.0" encoding="utf-8" ?> 
- <wsdl:definitions name="GatherService" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:tns="http://tempuri.org/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:i0="http://www.yostec.com/" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata">
- <wsp:Policy wsu:Id="NetTcpBinding_GatherService_policy">
- <wsp:ExactlyOne>
- <wsp:All>
  <msb:BinaryEncoding xmlns:msb="http://schemas.microsoft.com/ws/06/2004/mspolicy/netbinary1" /> 
- <sp:TransportBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
- <wsp:Policy>
- <sp:TransportToken>
- <wsp:Policy>
- <msf:WindowsTransportSecurity xmlns:msf="http://schemas.microsoft.com/ws/2006/05/framing/policy">
  <msf:ProtectionLevel>EncryptAndSign</msf:ProtectionLevel> 
  </msf:WindowsTransportSecurity>
  </wsp:Policy>
  </sp:TransportToken>
- <sp:AlgorithmSuite>
- <wsp:Policy>
  <sp:Basic256 /> 
  </wsp:Policy>
  </sp:AlgorithmSuite>
- <sp:Layout>
- <wsp:Policy>
  <sp:Strict /> 
  </wsp:Policy>
  </sp:Layout>
  </wsp:Policy>
  </sp:TransportBinding>
  <wsaw:UsingAddressing /> 
  </wsp:All>
  </wsp:ExactlyOne>
  </wsp:Policy>
  <wsdl:import namespace="http://www.yostec.com/" location="http://localhost:9998/GatherService?wsdl=wsdl0" /> 
  <wsdl:types /> 
- <wsdl:binding name="BasicHttpBinding_GatherService" type="i0:GatherService">
  <soap:binding transport="http://schemas.xmlsoap.org/soap/http" /> 
- <wsdl:operation name="Add">
  <soap:operation soapAction="http://www.yostec.com/GatherService/Add" style="document" /> 
- <wsdl:input>
  <soap:body use="literal" /> 
  </wsdl:input>
- <wsdl:output>
  <soap:body use="literal" /> 
  </wsdl:output>
  </wsdl:operation>
  </wsdl:binding>
- <wsdl:binding name="NetTcpBinding_GatherService" type="i0:GatherService">
  <wsp:PolicyReference URI="#NetTcpBinding_GatherService_policy" /> 
  <soap12:binding transport="http://schemas.microsoft.com/soap/tcp" /> 
- <wsdl:operation name="Add">
  <soap12:operation soapAction="http://www.yostec.com/GatherService/Add" style="document" /> 
- <wsdl:input>
  <soap12:body use="literal" /> 
  </wsdl:input>
- <wsdl:output>
  <soap12:body use="literal" /> 
  </wsdl:output>
  </wsdl:operation>
  </wsdl:binding>
- <wsdl:service name="GatherService">
- <wsdl:port name="BasicHttpBinding_GatherService" binding="tns:BasicHttpBinding_GatherService">
  <soap:address location="http://localhost:9998/GatherService" /> 
  </wsdl:port>
- <wsdl:port name="NetTcpBinding_GatherService" binding="tns:NetTcpBinding_GatherService">
  <soap12:address location="net.tcp://localhost:9999/GatherService" /> 
- <wsa10:EndpointReference>
  <wsa10:Address>net.tcp://localhost:9999/GatherService</wsa10:Address> 
- <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity">
  <Upn>StarryCheng-PC\Administrator</Upn> 
  </Identity>
  </wsa10:EndpointReference>
  </wsdl:port>
  </wsdl:service>
  </wsdl:definitions>

比如,如上“WCF”发布的服务,可不可以被“Java/Delphi/Object-C”等语言调用??? --------------------编程问答-------------------- WSDL的作用呢??? --------------------编程问答-------------------- 是的,这绝对是可以做到的 --------------------编程问答--------------------
引用 2 楼 wanghui0380 的回复:
是的,这绝对是可以做到的


大师,WSDL上有基于“TCP”的,不是只有基于Http的才可以吗???

而且该“WSDL”上也没有指出方法“Add”的参数。 --------------------编程问答-------------------- WSDL 是啥? --------------------编程问答-------------------- Google --------------------编程问答-------------------- WSDL 基于 tcp? 学习了。。。 --------------------编程问答-------------------- WSDL:Web Service Definition Language

就是定义web Service的,我所了解的基本就是web method。method的参数,已经返回值。
和web service位置,实现语言,会有协议没有关系。

如果WSDL符合标准,所有语言调用都没有问题。至于是不是能帮忙生成类,就看是不是有工具帮忙了。 --------------------编程问答--------------------
引用 7 楼 findcaiyzh 的回复:
WSDL:Web Service Definition Language

就是定义web Service的,我所了解的基本就是web method。method的参数,已经返回值。
和web service位置,实现语言,会有协议没有关系。

如果WSDL符合标准,所有语言调用都没有问题。至于是不是能帮忙生成类,就看是不是有工具帮忙了。


“WSDL符合标准”:可以走Tcp  吗???    大师,您怎么看???
补充:.NET技术 ,  ASP.NET
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,