WSDL:生成代理的的WebMethods而不是其他相关的类 [英] wsdl : Generate Proxy for the WebMethods but not the other dependent classes
问题描述
我说,我有一个WebMethod ADDUSER(用户userObject)一个WebService SettingsWebService。
结果User类是在SettingsWebService解决方案。
结果当我产生了SettingsWebService代理它创建ASMX类包含ADDUSER的WebMethod。
结果它还为用户类的类。
Say, I have a WebService SettingsWebService with a WebMethod AddUser(User userObject).
The User class is in the SettingsWebService solution.
When i generate a proxy for the SettingsWebService it creates a class for asmx which contains the AddUser webmethod.
It also generates a class for the User class.
客户端现在使用
Proxy.AddUser(Proxy.User用户)
Proxy.AddUser(Proxy.User user)
界面。
有没有办法告诉WSDL来不为用户生成类的类,这样的签名仍然是:
Is there any way to tell wsdl to not generate a class for the User class, so that the signature remains :
Proxy.AddUser(SettingsWebService.User
用户)
Proxy.AddUser(SettingsWebService.User user)
客户必须将代理和SettingsWebSerice参考dll文件。
The Client will have a reference to the proxy and the SettingsWebSerice dlls.
结果现在我不得不手动删除代码中的代理用户部分类,并添加一个usings参考WebSettings DLL。
Right now I am having to manually remove the code for the User partial class in the proxy and add a usings reference to the WebSettings dll.
搜索结果
在事先非常感谢!
推荐答案
为什么你要这么做?如果它是一个Web服务,你不需要你的代码
Why you need to do this? If it is a web service you don't need to distribute the SettingsWebService.dll with your code
这篇关于WSDL:生成代理的的WebMethods而不是其他相关的类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!