欢迎使用CSDN-markdown编辑器

来源:互联网 发布:心理测试 软件 编辑:程序博客网 时间:2024/06/10 20:00

关于jax-ws 使用wsdl文件数组对象定义:maxOccurs=”unbounded”

在项目实际开发webservice服务端时,被强制要求以指定格式声明集合对象,如:

<s:element maxOccurs="unbounded" minOccurs="0" name="SIZE_DATA" type="tns:SIZE_DATA"/>          <s:element maxOccurs="unbounded" minOccurs="0" name="PRODUCTAREADATAS" type="tns:PRODUCTAREADATAS"/>          <s:element maxOccurs="unbounded" minOccurs="0" name="REMARK_DATA" type="tns:REMARK_DATA"/>          <s:complexType name="SIZE_DATA">        <s:sequence>          <s:element maxOccurs="1" minOccurs="0" name="SIZE" type="s:string"/>          <s:element maxOccurs="1" minOccurs="0" name="EANUPC" type="s:string"/>          <s:element maxOccurs="1" minOccurs="0" name="ARTICLE_ID" type="s:string"/>          <s:element maxOccurs="1" minOccurs="0" name="WEIGHT" type="s:string"/>          <s:element maxOccurs="1" minOccurs="0" name="LENGTH" type="s:string"/>          <s:element maxOccurs="1" minOccurs="0" name="WIDTH" type="s:string"/>          <s:element maxOccurs="1" minOccurs="0" name="HEIGHT" type="s:string"/>          <s:element maxOccurs="1" minOccurs="0" name="INCASEMENT" type="s:string"/>          <s:element maxOccurs="1" minOccurs="0" name="VOLUME" type="s:string"/>          <s:element maxOccurs="1" minOccurs="0" name="REMARKA1" type="s:string"/>          <s:element maxOccurs="1" minOccurs="0" name="REMARKA2" type="s:string"/>          <s:element maxOccurs="1" minOccurs="0" name="REMARKA3" type="s:string"/>        </s:sequence>      </s:complexType>      <s:complexType name="PRODUCTAREADATAS">        <s:sequence>          <s:element maxOccurs="1" minOccurs="0" name="PRODUCTAREACODE" type="s:string"/>          <s:element maxOccurs="1" minOccurs="0" name="PRODUCTAREADES" type="s:string"/>          <s:element maxOccurs="1" minOccurs="0" name="INITIALONMARKET" type="s:string"/>          <s:element maxOccurs="1" minOccurs="0" name="NEWONMARKET" type="s:string"/>          <s:element maxOccurs="1" minOccurs="0" name="ORDERSTART" type="s:string"/>          <s:element maxOccurs="1" minOccurs="0" name="ORDEREND" type="s:string"/>          <s:element maxOccurs="1" minOccurs="0" name="REMARKC1" type="s:string"/>          <s:element maxOccurs="1" minOccurs="0" name="REMARKC2" type="s:string"/>          <s:element maxOccurs="1" minOccurs="0" name="REMARKC3" type="s:string"/>          <s:element maxOccurs="1" minOccurs="0" name="REMARKC4" type="s:string"/>        </s:sequence>      </s:complexType>      <s:complexType name="REMARK_DATA">        <s:sequence>          <s:element maxOccurs="1" minOccurs="0" name="REMARKB1" type="s:string"/>          <s:element maxOccurs="1" minOccurs="0" name="REMARKB2" type="s:string"/>          <s:element maxOccurs="1" minOccurs="0" name="REMARKB3" type="s:string"/>          <s:element maxOccurs="1" minOccurs="0" name="REMARKB4" type="s:string"/>          <s:element maxOccurs="1" minOccurs="0" name="REMARKB5" type="s:string"/>        </s:sequence>

http://blog.csdn.net/jiandanfeng2/article/details/53439748

根据所提供链接中第二种方法,实现了这种格式。

原创粉丝点击