草庐IT

xml - 肥皂用户界面 : is it possible to autogenerate the value from an element in a SOAP message?

coder 2024-06-23 原文

使用 SoapUI 可以将 Soap XML 消息发送到 WCF 服务。 我有以下 SOAP 消息:

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:my="http://myserviceprovider">
   <soap:Header/>
   <soap:Body>
      <my:ProcessOrder>
         <my:Orders>
            <my:Order>
               <my:id>randomid_1234567890</my:id>
               <my:data>ABC</my:data>
            </my:Order>
         </my:Orders>
      </my:ProcessOrder>
   </soap:Body>
</soap:Envelope>

因为 WCF 服务需要 my:id 的唯一 ID,我想知道 SoapUI 是否提供自动生成随机 GUID 的功能?

最佳答案

这将生成一个全局唯一的 id:

${=java.util.UUID.randomUUID()}

关于xml - 肥皂用户界面 : is it possible to autogenerate the value from an element in a SOAP message?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3724904/

有关xml - 肥皂用户界面 : is it possible to autogenerate the value from an element in a SOAP message?的更多相关文章

随机推荐