<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How can I extract SOAP envelope from raw data using rex in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-extract-SOAP-envelope-from-raw-data-using-rex/m-p/320708#M95836</link>
    <description>&lt;P&gt;If you only want to display the value of the &lt;CODE&gt;soap_envelope&lt;/CODE&gt; fields, you can append this to your search:&lt;BR /&gt;
&lt;CODE&gt;| stats values(soap_envelope) AS soap_envelope&lt;/CODE&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 05 Dec 2017 20:28:20 GMT</pubDate>
    <dc:creator>elliotproebstel</dc:creator>
    <dc:date>2017-12-05T20:28:20Z</dc:date>
    <item>
      <title>How can I extract SOAP envelope from raw data using rex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-extract-SOAP-envelope-from-raw-data-using-rex/m-p/320705#M95833</link>
      <description>&lt;P&gt;I would like to use a rex so I can pull the SOAP Envelope out of raw text and then send it to xmlprettyprint. Can anyone help me with the rex statement that would extract just the soap envelope from the example raw text below?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{"severity":"DEBUG","logger":"org.mule.module.http.internal.HttpMessageLogger","thread":"[dmvproxy-1.0.2-RELEASE].HTTP_Listener_Configuration.worker.790","message":"LISTENER\nPOST \/inolrsproxy HTTP\/1.1\r\nContent-Type: text\/xml; charset=UTF-8\r\nAccept: *\/*\r\nUser-Agent: Apache CXF 3.1.4\r\nX-Takipi-SN: 18480\r\nCache-Control: no-cache\r\nPragma: no-cache\r\nHost: dmv-proxy.dmv-proxy.rancher.internal:8081\r\nConnection: keep-alive\r\nContent-Length: 3413\r\n\r\n&amp;lt;soap:Envelope xmlns:soap=\"http:\/\/schemas.xmlsoap.org\/soap\/envelope\/\"&amp;gt;&amp;lt;soap:Body&amp;gt;&amp;lt;test&amp;gt;testvalue&amp;lt;\/test&amp;gt;&amp;lt;\/soap:Body&amp;gt;&amp;lt;\/soap:Envelope&amp;gt;"}
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 05 Dec 2017 18:25:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-extract-SOAP-envelope-from-raw-data-using-rex/m-p/320705#M95833</guid>
      <dc:creator>msmit205</dc:creator>
      <dc:date>2017-12-05T18:25:37Z</dc:date>
    </item>
    <item>
      <title>Re: How can I extract SOAP envelope from raw data using rex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-extract-SOAP-envelope-from-raw-data-using-rex/m-p/320706#M95834</link>
      <description>&lt;P&gt;Sure. I'd use this:&lt;BR /&gt;
&lt;CODE&gt;... | rex field=_raw "(?&amp;lt;soap_envelope&amp;gt;&amp;lt;soap:Envelope.*\/soap:Envelope&amp;gt;)"&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;If you also want it to remove all the extra escape characters, you could add this to the end:&lt;BR /&gt;
&lt;CODE&gt;| rex mode=sed field=soap_envelope "s/\\\//g"&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Here's where I tested the first part of the regex:&lt;BR /&gt;
&lt;A href="https://regex101.com/r/3SO9zD/1"&gt;https://regex101.com/r/3SO9zD/1&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Dec 2017 19:32:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-extract-SOAP-envelope-from-raw-data-using-rex/m-p/320706#M95834</guid>
      <dc:creator>elliotproebstel</dc:creator>
      <dc:date>2017-12-05T19:32:16Z</dc:date>
    </item>
    <item>
      <title>Re: How can I extract SOAP envelope from raw data using rex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-extract-SOAP-envelope-from-raw-data-using-rex/m-p/320707#M95835</link>
      <description>&lt;P&gt;Thanks for the quick reply. When I run this search in the browser, I still get the standard result with TIME and EVENT columns, and the EVENT looks the same as it did before. How can I get the browser to display just the Soap that has been extracted by rex?&lt;/P&gt;</description>
      <pubDate>Tue, 05 Dec 2017 20:17:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-extract-SOAP-envelope-from-raw-data-using-rex/m-p/320707#M95835</guid>
      <dc:creator>msmit205</dc:creator>
      <dc:date>2017-12-05T20:17:50Z</dc:date>
    </item>
    <item>
      <title>Re: How can I extract SOAP envelope from raw data using rex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-extract-SOAP-envelope-from-raw-data-using-rex/m-p/320708#M95836</link>
      <description>&lt;P&gt;If you only want to display the value of the &lt;CODE&gt;soap_envelope&lt;/CODE&gt; fields, you can append this to your search:&lt;BR /&gt;
&lt;CODE&gt;| stats values(soap_envelope) AS soap_envelope&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Dec 2017 20:28:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-extract-SOAP-envelope-from-raw-data-using-rex/m-p/320708#M95836</guid>
      <dc:creator>elliotproebstel</dc:creator>
      <dc:date>2017-12-05T20:28:20Z</dc:date>
    </item>
  </channel>
</rss>

