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

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

在 java 中解析來自 Amazon SQS 的 XML 通知?

在 java 中解析來自 Amazon SQS 的 XML 通知?

侃侃無極 2022-07-20 12:24:22
語境:我從MWSinto收到通知SQS。我想收聽隊列并處理消息以檢索信息。通知示例:<Notification><NotificationMetaData>    <NotificationType>ReportProcessingFinishedNotification</NotificationType>    <PayloadVersion>1.0</PayloadVersion>    <UniqueId>rwf00-dvSDC-DFAB-sd3frw</UniqueId>    <PublishTime>2019-03-05T12:55:08.965Z</PublishTime>    <SellerId>111111</SellerId></NotificationMetaData><NotificationPayload>    <ReportProcessingFinishedNotification>        <SellerId>111111</SellerId>        <ReportRequestId>11111111111</ReportRequestId>        <ReportType>_GET_FBA_FULFILLMENT_REMOVAL_ORDER_DETAIL_DATA_</ReportType>        <ReportProcessingStatus>DONE_NO_DATA</ReportProcessingStatus>    </ReportProcessingFinishedNotification></NotificationPayload></Notification>問題:目前,我正在按如下方式監聽隊列:@SqsListener(value = "notification-test-queue", deletionPolicy = SqsMessageDeletionPolicy.ON_SUCCESS)public void processSubscription(String xmlNotification) { /*TODO: Some action in here*/}如何正確解析xmlNotification?所有解析器都希望獲得xml帶有頂部鏈接的標識符的主要問題。我試驗了JAXB和DOMParser。我也嘗試從 Github 學習示例
查看完整描述

1 回答

?
明月笑刀無情

TA貢獻1828條經驗 獲得超4個贊

我找到了與我的文檔結構一起工作的庫,開箱即用Jcabi-xml



查看完整回答
反對 回復 2022-07-20
  • 1 回答
  • 0 關注
  • 113 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

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

幫助反饋 APP下載

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

公眾號

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