简体   繁体   English

在.net3 wcf中,wsdl输出具有一个xmlns:i0,该值在wsdl:service wsdl:port绑定中使用,在哪里进行更改,以便它使用我的目标名称空间

[英]In .net3 wcf the wsdl output has a xmlns:i0 that is used in the wsdl:service wsdl:port binding where do I make changes so it uses my target namespace

In .net3 wcf, the wsdl output has a xmlns:i0 that is used in the wsdl:service wsdl:port binding where do I make changes so it uses my target namespace (xmlns:tns) also the wsdl:binding element is missing what changes need to be made? 在.net3 wcf中,wsdl输出有一个xmlns:i0,该值在wsdl:service wsdl:port绑定中使用,在哪里进行更改,因此它使用了我的目标名称空间(xmlns:tns),而wsdl:binding元素缺少了什么需要进行更改吗?

I've added namepsaces to all the wcf attributes that take a namespace in their constructors. 我已经为所有在构造函数中采用名称空间的wcf属性添加了名称空间。

I have a feeling that they are both interlinked as the wsdl:binding is missing from my wsdl and the wsdl:port is 我感觉它们都是相互链接的,因为我的wsdl中缺少wsdl:binding,而wsdl:port是

<wsdl:port name="aaaaa.bbbbb.ccccc.ddddd.HelloService" binding="i0:aaaaa.bbbbb.ccccc.ddddd.HelloService"/>

In the wsld:definations i have 在wsld:definations我有

... xmlns:tns="http://aaaaa.bbbbb.ccccc.ddddd" xmlns:i0="http://tempuri.org" ...

so how do I get rid of the xmlns:i0 and ensure that the binding in my port uses the same namespace 所以我该如何摆脱xmlns:i0并确保端口中的绑定使用相同的名称空间

I found the answer 15mins after posting 我在发布15分钟后找到了答案

its the bindingNamespace in the endpoint configuration eg 它在端点配置中的bindingNamespace例如

endpoint binding="basicHttpBinding" bindingNamespace="aaaaa.bbbbb.ccccc.ddddd" name="aaaaa.bbbbb.ccccc.ddddd.HelloService" contract="aaaaa.bbbbb.ccccc.ddddd.IHelloService" 端点binding =“ basicHttpBinding” bindingNamespace =“ aaaaa.bbbbb.ccccc.ddddd” name =“ aaaaa.bbbbb.ccccc.ddddd.HelloService” contract =“ aaaaa.bbbbb.ccccc.ddddd.IHelloService”

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM