WSDL 中的可选消息部分 [英] Optional Message Parts in WSDL

查看:28
本文介绍了WSDL 中的可选消息部分的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的 wsdl:message 我有两个参数,名字和姓氏:

In my wsdl:message i got two parameters, firstname and lastname:

<message name="setName">
  <part name="firstname" type="xsd:string"></part>
  <part name="lastname" type="xsd:string"></part>
</message> 

我想根据需要定义firstname"部分,将lastname"部分定义为可选.我该怎么做?

I want to define the "firstname" part as required, and the "lastname" part as optional. How do i do that?

推荐答案

在 WSDL 中的部分不能是可选的.他们总是需要的.如果您需要可选部件,则必须创建一个引用 XSD complexType 的部件,然后该复合类型可以具有可选元素.

In WSDL parts can not be optional. They are always required. If you need optional parts, you will have to create one part that refers to a XSD complexType that then can have optional elements.

这篇关于WSDL 中的可选消息部分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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