reading soap header element in payload

2019-09-06 13:46发布

I need to read contents of wsse:Username(which is part of soap header) from following soap payload in mule using message-properties-transformer. I would like to use this variable somewhere else.

Soap Webservice request:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:spel="http://mobistar.be/spellchecker/">
   <soapenv:Header> 
      <wsse:Security soapenv:mustUnderstand="1" >
         <wsse:UsernameToken wsu:Id="UsernameToken-1">
           <wsse:Username>Tester01</wsse:Username>
         </wsse:UsernameToken>
       </wsse:Security>
   </soapenv:Header> 
   <soapenv:Body>
     <spel:CheckSpellingRequest>
        <spel:Text>Please test this blabla</spel:Text>
      </spel:CheckSpellingRequest>
   </soapenv:Body>
</soapenv:Envelope>

Please let me know if we can achieve this in mule?

1条回答
一夜七次
2楼-- · 2019-09-06 13:54

Also use set-variable, set-session-variable or set-property instead of the old message-properties-transformer.

查看更多
登录 后发表回答