问题描述
我们必须与64位托管的第三方Web服务进行交互Apache服务器运行JVM 1.6。 我正在利用WSDL.exe生成代理类(Reference.cs)。 当我利用这个引用时我注意到我的肥皂体元素不是完全限定的。 来自第三方的WSDL有elementFormDefault =" qualified"。 是否有WSDL.exe中的一个错误,它确实生成了一个类,它将生成一个消息,其中所有子元素都是完全限定的? 我已经生成了消息,但是代理类并对其进行了修改格式化子元素使它们完全合格。 我将此消息发送到服务并且它有效。
We have to interface with a third party web service hosted on a 64bit Apache Server running JVM 1.6. I am utilizing WSDL.exe to generate a proxy class (Reference.cs). When I utilize this reference I notice that my soap body elements are not fully qualified. The WSDL from the third party has elementFormDefault="qualified". Is there a bug in WSDL.exe that it does generate a class that will generate a message that has all the child elements fully qualified? I have taken the message generated but the proxy class and altered it to format the child elements making them fully qualified. I sent this message to the service and it worked.
有效的代码(肥皂体)
< n1:DoSomething xmlns:n1 =" http://www.myuri.com/ DoSomething /">
<n1:DoSomething xmlns:n1="http://www.myuri.com/ DoSomething /">
< n1:dTitle> MyTitle< / n1:dTitle>
<n1:dTitle>MyTitle</n1:dTitle>
< n1:dType> ; MyType< / n1:dType>
<n1:dType>MyType</n1:dType>
< / n1:DoSomething>
不起作用的代码(肥皂体)
< DoSomething xmlns =" http ://www.myuri.com/DoSomething /">
<DoSomething xmlns="http://www.myuri.com/ DoSomething /">
< dTitle> MyTitle< / dTitle>
<dTitle>MyTitle</dTitle>
< dType> MyType< / dType>
<dType>MyType</dType>
< / DoSomething>
推荐答案
这篇关于WSDL.exe不尊重elementFormDefault =" qualified" WSDL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!