从真实对象创建 ASMX 存根对象的实例
我有一个公开多个对象的 ASMX Web 服务。我有该对象的真实实例,并且我想实例化从中填充的存根对象。显然,这样的功能已经存在,因为当 Web 服务返回一个值时,它会创建存根并填充它。我只需要手动做同样的事情。
有想法吗?
I have an ASMX web service that exposes several objects. I have a real instance of that object, and I would like to instantiate a stub object that is populated from it. Clearly there is such functionality already, because when the web service returns a value it is creating the stub and populating it. I just need to do the same thing manually.
Ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你说
但事实并非如此。 Web 服务使用 XML Serializer 将对象序列化为 SOAP 消息,然后将其发送到客户端。在客户端,SOAP 被反序列化回一个对象,尽管这次它是一个代理对象。
You said
This is not true. The web service uses the XML Serializer to serialize the object into a SOAP message, then sends it to the client. At the client side, the SOAP is deserialized back into an object, though this time, it's a proxy object.