亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

JAXB 將多態 POJO 編組為 XML

JAXB 將多態 POJO 編組為 XML

慕村9548890 2021-10-27 16:49:11
我正在嘗試使用 JAXB 來封送類文件(帶注釋)。在<profile-set>它下面可以有不同的標簽,例如<organization-information-profile><connection-profile><user-information-profile>示例輸出 XML 文件如下一種)    <?xml version="1.0"?>    <request version="2.0" principal="111" credentials="xxxxx">      <target name="TestAPI" operation="create">        <parameter>          <organization>            <qualified-name>some-qualified-name</qualified-name>            <profile-set>              <name>TestOrg</name>              <organization-information-profile>                <name>Organization Information</name>                <qualified-name>/Organization Information</qualified-name>                <last-name>Test</last-name>                <address>some-address</address>                <city>my-city</city>                <province></province>                <postal-code>1111</postal-code>                <country>Timbaktu</country>                <phone-number-day>1111</phone-number-day>                <email-address>[email protected]</email-address>                <attribute name="PhoneNumber1">                  <value context="organization">23333</value>                </attribute>                <attribute name="ShortName">                  <value context="organization">my company</value>                </attribute>                <attribute name="TaxId">                  <value context="organization">myorg</value>                </attribute>              </organization-information-profile>            </profile-set>          </organization>        </parameter>      </target></request>b)
查看完整描述

1 回答

  • 1 回答
  • 0 關注
  • 135 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號