使用 SoapExtension 调用其他 webmethod

发布于 2024-08-25 09:23:54 字数 827 浏览 4 评论 0原文

我有一个 WSDL 定义了一个名为 CalendarService 的 Web 服务:

<soap:address location="http://example.com/calendar"/>

WSDL 定义了以下方法:

String setDate(String date)
int setTime(int time)

CalendarService 未部署在任何地方。 CalendarServiceProxy 是从 CalendarService WSDL 生成的代理。


我有一个名为 DummyService 的 Web 服务,可通过“http://example.com 访问/dummy

DummyService 有以下方法:

String dummyMethod(String foo)

DummyService 部署在 IIS 上。


我想知道是否可以编写一个 SoapExtension,以便从 CalendarServiceProxy 对 CalendarService WSDL 中定义的所有方法的所有调用都调用 DummyService 的 dummyMethod 方法。以便方法 dummyMethod 将序列化的传入 SOAP 消息作为参数获取。

I've a WSDL defining a web service named CalendarService:

<soap:address location="http://example.com/calendar"/>

The WSDL defines following methods:

String setDate(String date)
int setTime(int time)

CalendarService is not deployed anywhere.
CalendarServiceProxy is a proxy generated from CalendarService WSDL.


I've a web service named DummyService accessible at "http://example.com/dummy"

DummyService has following methods:

String dummyMethod(String foo)

DummyService is deployed on IIS.


I wonder if it is possible to write a SoapExtension so that all calls from CalendarServiceProxy to all methods defined in the CalendarService WSDL invoke the method dummyMethod of DummyService. So that the method dummyMethod gets as parameter the serialized incoming SOAP message.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

不如归去 2024-09-01 09:23:54

我不认为使用 SoapExtension 是可行的。

然而,对于 WCF 来说,这种事情很有可能发生。


一些 WCF 链接:

I don't believe this is practical using a SoapExtension.

This sort of thing is quite possible with WCF, however.


Some WCF Links:

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文