<?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 Passing Variable from tXMLMap to tSendMail in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Passing-Variable-from-tXMLMap-to-tSendMail/m-p/2285367#M58989</link>
    <description>Hi Talend Masters, 
&lt;BR /&gt;I have problem when passing parameters/variable from tXMLMap to tSendMail. 
&lt;BR /&gt;I suppose to set mail input such as To, From, etc from Web Service Consumer then Received and map using tXMLMap then send the variable to tJavaFlex before the variable is setted to tSendMail. 
&lt;BR /&gt;On tXMLMap, I got the request like as follows: 
&lt;BR /&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt; 
&lt;BR /&gt;&amp;lt;tns:MailServiceOperationRequest xmlns:tns=" 
&lt;A href="http://www.talend.org/service/&amp;quot;&amp;gt;&amp;lt;from&amp;gt;theTalend@abc.com&amp;lt;/from&amp;gt;&amp;lt;to&amp;gt;theTalend@abc.com&amp;lt;/to&amp;gt;&amp;lt;cc&amp;gt;theTalend@abc.com&amp;lt;/cc&amp;gt;&amp;lt;attachment&amp;gt;C:/hello.txt&amp;lt;/attachment&amp;gt;&amp;lt;message&amp;gt;theTalend@abc.com&amp;lt;/message&amp;gt;&amp;lt;/tns:MailServiceOperationRequest" target="_blank" rel="nofollow noopener noreferrer"&gt;http://www.talend.org/service/"&amp;gt;&amp;lt;from&amp;gt;theTalend@abc.com&amp;lt;/from&amp;gt;&amp;lt;to&amp;gt;theTalend@abc.com&amp;lt;/to&amp;gt;&amp;lt;cc&amp;gt;theTalend@abc.com&amp;lt;/cc&amp;gt;&amp;lt;attachment&amp;gt;C:/hello.txt&amp;lt;/attachment&amp;gt;&amp;lt;message&amp;gt;theTalend@abc.com&amp;lt;/message&amp;gt;&amp;lt;/tns:MailServiceOperationRequest&lt;/A&gt;&amp;gt; 
&lt;BR /&gt;then I set to tJavaFlex: 
&lt;BR /&gt;String from = context.getProperty("from"); 
&lt;BR /&gt;String to = context.getProperty("to"); 
&lt;BR /&gt;String cc = context.getProperty("cc"); 
&lt;BR /&gt;String attachment = context.getProperty("attachment"); 
&lt;BR /&gt;String message = context.getProperty("from"); 
&lt;BR /&gt;then I set to tSendMail All those as variable. 
&lt;BR /&gt;I got error like this: 
&lt;BR /&gt;at java.util.concurrent.FutureTask.run(Unknown Source) 
&lt;BR /&gt; at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37) 
&lt;BR /&gt; at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:106) 
&lt;BR /&gt; at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:262) 
&lt;BR /&gt; at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:122) 
&lt;BR /&gt; at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceRequest(JettyHTTPDestination.java:344) 
&lt;BR /&gt; at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:310) 
&lt;BR /&gt; at org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:72) 
&lt;BR /&gt; at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:943) 
&lt;BR /&gt; at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:879) 
&lt;BR /&gt; at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117) 
&lt;BR /&gt; at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:250) 
&lt;BR /&gt; at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110) 
&lt;BR /&gt; at org.eclipse.jetty.server.Server.handle(Server.java:345) 
&lt;BR /&gt; at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:441) 
&lt;BR /&gt; at org.eclipse.jetty.server.HttpConnection$RequestHandler.content(HttpConnection.java:936) 
&lt;BR /&gt; at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:801) 
&lt;BR /&gt; at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:224) 
&lt;BR /&gt; at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:51) 
&lt;BR /&gt; at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:586) 
&lt;BR /&gt; at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:44) 
&lt;BR /&gt; at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:598) 
&lt;BR /&gt; at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:533) 
&lt;BR /&gt; at java.lang.Thread.run(Unknown Source) 
&lt;BR /&gt;Caused by: java.lang.NullPointerException 
&lt;BR /&gt; at commonservice1.mailserviceoperation_0_1.MailServiceOperation.tESBProviderRequest_1_LoopProcess(MailServiceOperation.java:2299) 
&lt;BR /&gt; 
&lt;BR /&gt;Please help!! 
&lt;BR /&gt;Thanks a lot</description>
    <pubDate>Tue, 22 Jan 2013 11:19:38 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2013-01-22T11:19:38Z</dc:date>
    <item>
      <title>Passing Variable from tXMLMap to tSendMail</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Passing-Variable-from-tXMLMap-to-tSendMail/m-p/2285367#M58989</link>
      <description>Hi Talend Masters, 
&lt;BR /&gt;I have problem when passing parameters/variable from tXMLMap to tSendMail. 
&lt;BR /&gt;I suppose to set mail input such as To, From, etc from Web Service Consumer then Received and map using tXMLMap then send the variable to tJavaFlex before the variable is setted to tSendMail. 
&lt;BR /&gt;On tXMLMap, I got the request like as follows: 
&lt;BR /&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt; 
&lt;BR /&gt;&amp;lt;tns:MailServiceOperationRequest xmlns:tns=" 
&lt;A href="http://www.talend.org/service/&amp;quot;&amp;gt;&amp;lt;from&amp;gt;theTalend@abc.com&amp;lt;/from&amp;gt;&amp;lt;to&amp;gt;theTalend@abc.com&amp;lt;/to&amp;gt;&amp;lt;cc&amp;gt;theTalend@abc.com&amp;lt;/cc&amp;gt;&amp;lt;attachment&amp;gt;C:/hello.txt&amp;lt;/attachment&amp;gt;&amp;lt;message&amp;gt;theTalend@abc.com&amp;lt;/message&amp;gt;&amp;lt;/tns:MailServiceOperationRequest" target="_blank" rel="nofollow noopener noreferrer"&gt;http://www.talend.org/service/"&amp;gt;&amp;lt;from&amp;gt;theTalend@abc.com&amp;lt;/from&amp;gt;&amp;lt;to&amp;gt;theTalend@abc.com&amp;lt;/to&amp;gt;&amp;lt;cc&amp;gt;theTalend@abc.com&amp;lt;/cc&amp;gt;&amp;lt;attachment&amp;gt;C:/hello.txt&amp;lt;/attachment&amp;gt;&amp;lt;message&amp;gt;theTalend@abc.com&amp;lt;/message&amp;gt;&amp;lt;/tns:MailServiceOperationRequest&lt;/A&gt;&amp;gt; 
&lt;BR /&gt;then I set to tJavaFlex: 
&lt;BR /&gt;String from = context.getProperty("from"); 
&lt;BR /&gt;String to = context.getProperty("to"); 
&lt;BR /&gt;String cc = context.getProperty("cc"); 
&lt;BR /&gt;String attachment = context.getProperty("attachment"); 
&lt;BR /&gt;String message = context.getProperty("from"); 
&lt;BR /&gt;then I set to tSendMail All those as variable. 
&lt;BR /&gt;I got error like this: 
&lt;BR /&gt;at java.util.concurrent.FutureTask.run(Unknown Source) 
&lt;BR /&gt; at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37) 
&lt;BR /&gt; at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:106) 
&lt;BR /&gt; at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:262) 
&lt;BR /&gt; at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:122) 
&lt;BR /&gt; at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceRequest(JettyHTTPDestination.java:344) 
&lt;BR /&gt; at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:310) 
&lt;BR /&gt; at org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:72) 
&lt;BR /&gt; at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:943) 
&lt;BR /&gt; at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:879) 
&lt;BR /&gt; at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117) 
&lt;BR /&gt; at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:250) 
&lt;BR /&gt; at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110) 
&lt;BR /&gt; at org.eclipse.jetty.server.Server.handle(Server.java:345) 
&lt;BR /&gt; at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:441) 
&lt;BR /&gt; at org.eclipse.jetty.server.HttpConnection$RequestHandler.content(HttpConnection.java:936) 
&lt;BR /&gt; at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:801) 
&lt;BR /&gt; at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:224) 
&lt;BR /&gt; at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:51) 
&lt;BR /&gt; at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:586) 
&lt;BR /&gt; at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:44) 
&lt;BR /&gt; at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:598) 
&lt;BR /&gt; at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:533) 
&lt;BR /&gt; at java.lang.Thread.run(Unknown Source) 
&lt;BR /&gt;Caused by: java.lang.NullPointerException 
&lt;BR /&gt; at commonservice1.mailserviceoperation_0_1.MailServiceOperation.tESBProviderRequest_1_LoopProcess(MailServiceOperation.java:2299) 
&lt;BR /&gt; 
&lt;BR /&gt;Please help!! 
&lt;BR /&gt;Thanks a lot</description>
      <pubDate>Tue, 22 Jan 2013 11:19:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Passing-Variable-from-tXMLMap-to-tSendMail/m-p/2285367#M58989</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-01-22T11:19:38Z</dc:date>
    </item>
    <item>
      <title>Re: Passing Variable from tXMLMap to tSendMail</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Passing-Variable-from-tXMLMap-to-tSendMail/m-p/2285368#M58990</link>
      <description>Hi
&lt;BR /&gt;After tXMLMap, you need to use a tExtractXMLField to extract the value of the elements such as To, From etc. 
&lt;BR /&gt;The job looks like:
&lt;BR /&gt;....tXMLMap--tExtractXMLField--tJavaRow
&lt;BR /&gt; |
&lt;BR /&gt;onsubjobok
&lt;BR /&gt; |
&lt;BR /&gt;tSendMail
&lt;BR /&gt;on tJavaRow, set the value to context variables like:
&lt;BR /&gt;context.to=input_row.TO;
&lt;BR /&gt;Please read this online user manual to learn tExtractXMLField component. 
&lt;BR /&gt;
&lt;A href="https://help.talend.com/search/all?query=tExtractXMLField&amp;amp;content-lang=en" rel="nofollow noopener noreferrer"&gt;https://help.talend.com/search/all?query=tExtractXMLField&amp;amp;content-lang=en&lt;/A&gt;
&lt;BR /&gt;Let me know if you have any troubles!
&lt;BR /&gt;Shong</description>
      <pubDate>Thu, 24 Jan 2013 10:27:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Passing-Variable-from-tXMLMap-to-tSendMail/m-p/2285368#M58990</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-01-24T10:27:17Z</dc:date>
    </item>
  </channel>
</rss>

