<?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: [resolved] SOAP header in tJavaRow in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/resolved-SOAP-header-in-tJavaRow/m-p/2213216#M10558</link>
    <description>Hello,&lt;BR /&gt;I could do it like this :&lt;BR /&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;java.util.Collection&amp;lt;org.apache.cxf.headers.Header&amp;gt; soapHeaders = &lt;BR /&gt;((java.util.Collection&amp;lt;org.apache.cxf.headers.Header&amp;gt;) globalMap.get("tESBProviderRequest_1_HEADERS_SOAP"));&lt;BR /&gt;java.util.Iterator&amp;lt;org.apache.cxf.headers.Header&amp;gt; it = soapHeaders.iterator();&lt;BR /&gt;org.apache.cxf.headers.Header h = (org.apache.cxf.headers.Header) it.next();&amp;nbsp;&lt;BR /&gt;/*get the key*/&lt;BR /&gt;Node n1;&lt;BR /&gt;row2.key =&amp;nbsp; ((Element) h.getName());&lt;BR /&gt;/*get the value*/&lt;BR /&gt;org.w3c.dom.NodeList nl = ((org.w3c.dom.Element) h.getObject()).getChildNodes();&lt;BR /&gt;row2.value = nl.item(0).getTextContent().toString();&lt;BR /&gt;/*if you have multiple items*/&lt;BR /&gt;org.apache.cxf.headers.Header h = (org.apache.cxf.headers.Header) it.next(); &lt;BR /&gt;.....&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;</description>
    <pubDate>Fri, 23 Jan 2015 17:20:53 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-01-23T17:20:53Z</dc:date>
    <item>
      <title>[resolved] SOAP header in tJavaRow</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-SOAP-header-in-tJavaRow/m-p/2213213#M10555</link>
      <description>Hi
&lt;BR /&gt;I wanted to access the soap headers from a tESBProviderRequest. I have the tESBReq connected to a tJavaRow and then connected to a tXmlMap but it doesnt necessarily have to be like this, I am just looking to extract the header values.
&lt;BR /&gt;My request envelope looks like this&amp;nbsp;
&lt;BR /&gt;
&lt;BR /&gt;&amp;lt;Envelope xmlns=""&amp;gt;
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;lt;Header&amp;gt;
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;securityHeader xmlns=""&amp;gt;
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;username xmlns=""&amp;gt;&amp;lt;/username&amp;gt;
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;hased_password xmlns=""&amp;gt;&amp;lt;/hased_password&amp;gt;
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/securityHeader&amp;gt;
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;lt;/Header&amp;gt;
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;lt;Body&amp;gt;
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;getRequest xmlns=""&amp;gt;
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;ID xmlns=""&amp;gt;100103308911W600&amp;lt;/ID&amp;gt;
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/getRequest&amp;gt;
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;lt;/Body&amp;gt;
&lt;BR /&gt;&amp;lt;/Envelope&amp;gt;&amp;nbsp;&amp;nbsp;
&lt;BR /&gt;How can I retrieve the values of username and password from the header?&amp;nbsp;
&lt;BR /&gt;When I print out the input_row it only prints out the body, no headers.
&lt;BR /&gt;I did try a couple of other threads which suggested "((java.util.Collection&amp;lt;org.apache.cxf.headers.Header&amp;gt;) globalMap.get("tESBProviderRequest_1_HEADERS_SOAP"))" however I cant figure out the way to extract the values.
&lt;BR /&gt;Appreciate the help.
&lt;BR /&gt;Thanks</description>
      <pubDate>Sat, 16 Nov 2024 11:21:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-SOAP-header-in-tJavaRow/m-p/2213213#M10555</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T11:21:00Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] SOAP header in tJavaRow</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-SOAP-header-in-tJavaRow/m-p/2213214#M10556</link>
      <description>Any responses? I have the same problem</description>
      <pubDate>Wed, 21 Jan 2015 12:43:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-SOAP-header-in-tJavaRow/m-p/2213214#M10556</guid>
      <dc:creator>Elosi_SCR</dc:creator>
      <dc:date>2015-01-21T12:43:38Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] SOAP header in tJavaRow</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-SOAP-header-in-tJavaRow/m-p/2213215#M10557</link>
      <description>I ended up just doing this but I would still like to explore a neater refactor of the implementation if possible:
&lt;BR /&gt;
&lt;PRE&gt;java.util.Collection&amp;lt;org.apache.cxf.headers.Header&amp;gt; soapHeaders = ((java.util.Collection&amp;lt;org.apache.cxf.headers.Header&amp;gt;) globalMap.get("tESBProviderRequest_1_HEADERS_SOAP"));&lt;BR /&gt;Iterator&amp;lt;org.apache.cxf.headers.Header&amp;gt; it = soapHeaders.iterator();&lt;BR /&gt;org.apache.cxf.headers.Header h = (org.apache.cxf.headers.Header) it.next();&lt;BR /&gt;Node n1,n2;&lt;BR /&gt;n1 = &amp;nbsp;((Element) h.getObject());&lt;BR /&gt;NodeList nl = ((Element) h.getObject()).getChildNodes();&lt;BR /&gt;var1 = nl.item(1 /* Just trial and error to get this number */ ).getTextContent().trim(); &amp;nbsp;&amp;nbsp;&lt;BR /&gt;var2 = nl.item(3 /* same here */ ).getTextContent().trim(); &amp;nbsp;&lt;/PRE&gt;</description>
      <pubDate>Wed, 21 Jan 2015 23:59:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-SOAP-header-in-tJavaRow/m-p/2213215#M10557</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-01-21T23:59:22Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] SOAP header in tJavaRow</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-SOAP-header-in-tJavaRow/m-p/2213216#M10558</link>
      <description>Hello,&lt;BR /&gt;I could do it like this :&lt;BR /&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;java.util.Collection&amp;lt;org.apache.cxf.headers.Header&amp;gt; soapHeaders = &lt;BR /&gt;((java.util.Collection&amp;lt;org.apache.cxf.headers.Header&amp;gt;) globalMap.get("tESBProviderRequest_1_HEADERS_SOAP"));&lt;BR /&gt;java.util.Iterator&amp;lt;org.apache.cxf.headers.Header&amp;gt; it = soapHeaders.iterator();&lt;BR /&gt;org.apache.cxf.headers.Header h = (org.apache.cxf.headers.Header) it.next();&amp;nbsp;&lt;BR /&gt;/*get the key*/&lt;BR /&gt;Node n1;&lt;BR /&gt;row2.key =&amp;nbsp; ((Element) h.getName());&lt;BR /&gt;/*get the value*/&lt;BR /&gt;org.w3c.dom.NodeList nl = ((org.w3c.dom.Element) h.getObject()).getChildNodes();&lt;BR /&gt;row2.value = nl.item(0).getTextContent().toString();&lt;BR /&gt;/*if you have multiple items*/&lt;BR /&gt;org.apache.cxf.headers.Header h = (org.apache.cxf.headers.Header) it.next(); &lt;BR /&gt;.....&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Fri, 23 Jan 2015 17:20:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-SOAP-header-in-tJavaRow/m-p/2213216#M10558</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-01-23T17:20:53Z</dc:date>
    </item>
  </channel>
</rss>

