iT邦幫忙

0

WEB SERVICE 透過SOAPUI產生的XML

  • 分享至 

  • xImage
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Body>
      <test:createResponse xmlns:test="http://webservice.test.com/">
         <return>
            <ResponseHeader>
               <USER_ID>00051</USER_ID>
               <NAME>John</NAME>
               <AGE>25</AGE>
            </ResponseHeader>
         </return>
      </test:createResponse>
   </soap:Body>
</soap:Envelope>

上面是webservice接受參數後產生的XML
想請問一下有沒有辦法將
<return> </return>
這個標籤整個拿掉
網路上我只找到 @WebResult(name = "XXX")可以用來將
<return>
置換成
<XXX>
沒看到將標籤整個拿掉的方法

fuzzylee1688 iT邦研究生 3 級 ‧ 2019-08-01 15:41:01 檢舉
感覺<retrun>底下還有其他類型tag, 如:類似<ResponseBody>, 拿掉這一層OK??
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

1 個回答

0
souda
iT邦好手 1 級 ‧ 2019-08-02 08:03:21

要拿掉reponse 的tag 就要透過程式來作曲你要的值.

我要發表回答

立即登入回答