Wcf 动态读取wsdl时获取错误数据
这是我的WCF WSDL文件Wcf 动态读取wsdl时获取错误数据,wcf,wsdl,Wcf,Wsdl,这是我的WCF WSDL文件 <wsdl:portType name="IMyService"> <wsdl:operation name="add"> <wsdl:input wsaw:Action="http://pcname:9000/WcfService/MyService/IMyService/add" message="tns:IMyService_add_InputMessage"/> <
<wsdl:portType name="IMyService">
<wsdl:operation name="add">
<wsdl:input wsaw:Action="http://pcname:9000/WcfService/MyService/IMyService/add"
message="tns:IMyService_add_InputMessage"/>
<wsdl:output wsaw:Action="http://pcname:9000/WcfService/MyService/IMyService/addResponse"
message="tns:IMyService_add_OutputMessage"/>
</wsdl:operation>
<wsdl:operation name="sub">
<wsdl:input wsaw:Action="http://pcname:9000/WcfService/MyService/IMyService/sub"
message="tns:IMyService_sub_InputMessage"/>
<wsdl:output wsaw:Action="http://pcname:9000/WcfService/MyService/IMyService/subResponse"
message="tns:IMyService_sub_OutputMessage"/>
</wsdl:operation>
</wsdl:portType>
错误:
异常:无法从命名空间http://pcname:9000/WcfService/MyService/导入绑定“BasicHttpBinding_IMyService”
内部例外:{缺少元素“http://pcname:9000/WcfService/MyService/:add”。}
为什么在添加函数之前得到:冒号?为什么在http://pcname中有空格?在实际代码中是localhost。我是新的堆栈溢出,而张贴的问题,它是给我一些关于该链接的错误,所以我把它改为pcname。
ServiceDescriptionImportWarnings warning = importer.Import(nmspace, unit1);