从WSDL中如何选择取得Operation Method,并且运行?

therock2003 therock2003 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
假设有一个关于查询汇率的Web Service,它的WSDL如下:
WSDL(片断):
<message name="getRate1">
<part name="country1" type="xsd:string" />
<part name="country2" type="xsd:string" />
</message>
<message name="getRate2">
<part name="country1" type="xsd:string" />
<part name="country2" type="xsd:string" />
<part name="date" type="xsd:string" />
</message>
<message name="getRate3">
<part name="currency1" type="xsd:string" />
<part name="currency2" type="xsd:string" />
</message>
<message name="getRate4">
<part name="currency1" type="xsd:string" />
<part name="currency2" type="xsd:string" />
<part name="date" type="xsd:string" />
</message>


一个查询汇率Web Application得到这个Web Service的WSDL后,怎样判断并且从四个相近的Method中选择一个需要的method呢?注意,Application 是在Run time 获得这个WSDL的,在开发这个Web application的时候是不知道WSDL的内容的.
我也不想在Run time的时候产生动态的Java 代码.因为开发太费功夫了.
谢谢.
...全文

相关推荐

评论 4
收藏 已收藏
分享
返回顶部
therock2003
Java EE 67,535 成员 225,843 内容