WSDL - 无输入 - 最佳实践 [英] WSDL - no input - best practice

查看:34
本文介绍了WSDL - 无输入 - 最佳实践的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发 SOAP 网络服务.其中一个函数是 isAlive().它没有输入参数.WSDL 的最佳实践是什么?我试过了...

I'm developing a SOAP web service. One of the functions is isAlive(). It has no input parameters. What's best practice for the WSDL? I tried...

<wsdl:operation name="isAlive">
    <wsdl:output message="tns1:isAliveMessage"/>
</wsdl:operation>

...但是由于缺少输入,我的一个工具出现了解析错误.我发现了几个例子,其中定义了输入和消息并且相应的类型定义为空,即 <xsd:complexType name="somename"/>.这样更好吗?

...but got a parse error in one of my tools because of the missing input. I found a couple of examples where an input and a message was defined and the corresponding type definition was empty, i.e. <xsd:complexType name="somename"/>. Is this better?

谢谢!

推荐答案

你肯定需要一个输入消息——服务器怎么能告诉你要调用什么操作.

You definitely need an input message - how else could the server tell what operation you want to call.

如果您使用文档样式(您应该这样做),则输入消息应该是没有内容的单个元素.

If you use document style (which you should), the input message should be a single element with no content.

这篇关于WSDL - 无输入 - 最佳实践的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆