如何在javax WebMethod中删除序列元素?

时间:2018-08-02 19:30:16

标签: java xsd sequence

我有声明的方法

@WebMethod
@Oneway
public void notifyStatusChanged(@WebParam(name = "rdid") @XmlElement(required = true, nillable = false)
                                Integer rdid,
                                @WebParam(name = "entityType") @XmlElement(required = true, nillable = false)
                                EntityEnumType entityType,
                                @WebParam(name = "oldStatusId") @XmlElement(required = true, nillable = false)
                                Integer oldStatusId,
                                @WebParam(name = "newStatusId") @XmlElement(required = true, nillable = false)
                                Integer newStatusId,
                                @WebParam(name = "message") @XmlElement(required = false, nillable = false)
                                String message) {}

然后我创建xsd:

<xsd:complexType name="notifyStatusChanged">
    <xsd:sequence>
      <xsd:element name="rdid" type="xsd:int"/>
      <xsd:element name="entityType" type="ns0:entityEnumType"/>
      <xsd:element name="oldStatusId" type="xsd:int"/>
      <xsd:element name="newStatusId" type="xsd:int"/>
      <xsd:element name="message" type="xsd:string" minOccurs="0"/>
    </xsd:sequence>
  </xsd:complexType>

如何使用javax注释从xsd中删除元素<xsd:sequence>?我希望我的方案看起来像这样:

<xsd:complexType name="notifyStatusChanged">
          <xsd:element name="rdid" type="xsd:int"/>
          <xsd:element name="entityType" type="ns0:entityEnumType"/>
          <xsd:element name="oldStatusId" type="xsd:int"/>
          <xsd:element name="newStatusId" type="xsd:int"/>
          <xsd:element name="message" type="xsd:string" minOccurs="0"/>
      </xsd:complexType>

0 个答案:

没有答案