我对WCF世界很陌生。
我一直在寻找并试图理解WCF生成的WSDL文件。我正在寻找的原因是我们的Java和PHP客户端在导入WSDL时遇到了问题。
有人可以帮助我解决以下问题:
- <xsd:schema targetNamespace="http://tempuri.org/Imports">
<xsd:import schemaLocation="http://localhost:13818/WCFService2/Service.svc?xsd=xsd0" namespace="http://tempuri.org/" />
<xsd:import schemaLocation="http://localhost:13818/WCFService2/Service.svc?xsd=xsd1" namespace="http://schemas.microsoft.com/2003/10/Serialization/" />
<xsd:import schemaLocation="http://localhost:13818/WCFService2/Service.svc?xsd=xsd2" namespace="http://schemas.datacontract.org/2004/07/EvalServiceLibrary" />
</xsd:schema>
查询1
根据上面的条件,生成导入schemalocation标记?它是基于数据合同和成员的数量还是某些(这是什么?)
- <wsdl:message name="IEvalService_SubmitEval_InputMessage">
<wsdl:part name="parameters" element="tns:SubmitEval" />
</wsdl:message>
- <wsdl:message name="IEvalService_SubmitEval_OutputMessage">
<wsdl:part name="parameters" element="tns:SubmitEvalResponse" />
</wsdl:message>
查询2: 我没有任何消息名称IEvalService_SubmitEval_InputMessage。如何产生以上?什么是零件名称和元素?
<wsdl:portType name="IEvalService">
- <wsdl:operation name="SubmitEval">
<wsdl:input wsaw:Action="http://tempuri.org/IEvalService/SubmitEval" message="tns:IEvalService_SubmitEval_InputMessage" />
<wsdl:output wsaw:Action="http://tempuri.org/IEvalService/SubmitEvalResponse" message="tns:IEvalService_SubmitEval_OutputMessage" />
</wsdl:operation>
</wsdl:portType>
查询3:
你可以告诉我上面wsdl片段中的“tns:IEvalService_SubmitEval_InputMessage”是什么?
Fianally:
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: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">
是否可以从WCF代码中删除上述不必要的命名空间?我只知道如何更改名称空间。
谢谢你。
答案 0 :(得分:0)
tns
可能代表目标命名空间 - 它是WSDL文档中定义的元素的前缀。它只是对第二个问题中定义的消息的引用。导入WSDL时您的客户有什么错误?所有这些部分都是有效的。