<?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 Dynamic CXF client parameters in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Dynamic-CXF-client-parameters/m-p/2291968#M65093</link>
    <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;We need to use 1 cxf client with dynamic parameters, for reuse purpose (we will have hundreds of WS to call and shall not use hundreds of cxf components). Context variables won't be sufficient, we need to use headers or properties.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a "normal" cxf component in a route, that works fine. I tried to cute&amp;amp;paste the generated java code into a cJavaDSLPRocessor , without changing anything, just set up "operationName" and "operationNamespace" before, but it fails.&lt;/P&gt;
&lt;P&gt;Here is the code :&lt;/P&gt;
&lt;PRE&gt;.toD(
"cxf://"
						+ 'the_url...'
						+ "?dataFormat=PAYLOAD"
						+ "&amp;amp;allowStreaming=false"
						+ "&amp;amp;wsdlURL="
						+ "http://uwstst01.ga.local:8080/wsdl/sgenvisvpa01.wsdl"
						+ "&amp;amp;serviceName="
						+ "{urn:uniface:applic:services:SGENVISVPA01}SGENVISVPA01Service"
						+ "&amp;amp;endpointName="
						+ "{urn:uniface:applic:services:SGENVISVPA01}SGENVISVPA01"
						+ "&amp;amp;defaultOperationNamespace="
						+ javax.xml.namespace.QName
								.valueOf(
										"{urn:uniface:applic:services:SGENVISVPA01}O_GET_XML")
								.getNamespaceURI()
						+ "&amp;amp;defaultOperationName="
						+ javax.xml.namespace.QName
								.valueOf(
										"{urn:uniface:applic:services:SGENVISVPA01}O_GET_XML")
								.getLocalPart()
						//+ "&amp;amp;headerFilterStrategy=#CXF_PAYLOAD_HEADER_FILTER"
)						&lt;/PRE&gt;
&lt;P&gt;and the error :&lt;/P&gt;
&lt;PRE&gt;org.apache.cxf.binding.soap.SoapFault: {USERVER:doSoapRequest:URBnewStatelessReq}Activation error: (-50, bad interface name: nil or empty)&lt;/PRE&gt;
&lt;P&gt;How can we dynamically set a cxf client ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 09:10:51 GMT</pubDate>
    <dc:creator>Loko</dc:creator>
    <dc:date>2024-11-16T09:10:51Z</dc:date>
    <item>
      <title>Dynamic CXF client parameters</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Dynamic-CXF-client-parameters/m-p/2291968#M65093</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;We need to use 1 cxf client with dynamic parameters, for reuse purpose (we will have hundreds of WS to call and shall not use hundreds of cxf components). Context variables won't be sufficient, we need to use headers or properties.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a "normal" cxf component in a route, that works fine. I tried to cute&amp;amp;paste the generated java code into a cJavaDSLPRocessor , without changing anything, just set up "operationName" and "operationNamespace" before, but it fails.&lt;/P&gt;
&lt;P&gt;Here is the code :&lt;/P&gt;
&lt;PRE&gt;.toD(
"cxf://"
						+ 'the_url...'
						+ "?dataFormat=PAYLOAD"
						+ "&amp;amp;allowStreaming=false"
						+ "&amp;amp;wsdlURL="
						+ "http://uwstst01.ga.local:8080/wsdl/sgenvisvpa01.wsdl"
						+ "&amp;amp;serviceName="
						+ "{urn:uniface:applic:services:SGENVISVPA01}SGENVISVPA01Service"
						+ "&amp;amp;endpointName="
						+ "{urn:uniface:applic:services:SGENVISVPA01}SGENVISVPA01"
						+ "&amp;amp;defaultOperationNamespace="
						+ javax.xml.namespace.QName
								.valueOf(
										"{urn:uniface:applic:services:SGENVISVPA01}O_GET_XML")
								.getNamespaceURI()
						+ "&amp;amp;defaultOperationName="
						+ javax.xml.namespace.QName
								.valueOf(
										"{urn:uniface:applic:services:SGENVISVPA01}O_GET_XML")
								.getLocalPart()
						//+ "&amp;amp;headerFilterStrategy=#CXF_PAYLOAD_HEADER_FILTER"
)						&lt;/PRE&gt;
&lt;P&gt;and the error :&lt;/P&gt;
&lt;PRE&gt;org.apache.cxf.binding.soap.SoapFault: {USERVER:doSoapRequest:URBnewStatelessReq}Activation error: (-50, bad interface name: nil or empty)&lt;/PRE&gt;
&lt;P&gt;How can we dynamically set a cxf client ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 09:10:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Dynamic-CXF-client-parameters/m-p/2291968#M65093</guid>
      <dc:creator>Loko</dc:creator>
      <dc:date>2024-11-16T09:10:51Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic CXF client parameters</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Dynamic-CXF-client-parameters/m-p/2291969#M65094</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;If we understand&amp;nbsp; your requirement very well, you are looking for a solution for dynamic invocation of web service in a ESB route?&lt;/P&gt;
&lt;P&gt;Best regards&lt;/P&gt;
&lt;P&gt;Sabrina&lt;/P&gt;</description>
      <pubDate>Wed, 18 Oct 2017 08:26:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Dynamic-CXF-client-parameters/m-p/2291969#M65094</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-18T08:26:19Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic CXF client parameters</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Dynamic-CXF-client-parameters/m-p/2291970#M65095</link>
      <description>&lt;P&gt;Hello&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;That's it. And I found the solution by myself :&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;in a cJavaDSLProcessor, copy and paste the code generated by Talend when we use a cCxf component :&lt;/P&gt; 
&lt;PRE&gt;.toD("cxf://${in.header.serviceURL}/?"
 + "dataFormat=PAYLOAD"
 + "&amp;amp;wsdlURL=..."
 + "&amp;amp;serviceName=...."
 + "&amp;amp;endpointName=..."
 + "&amp;amp;headerFilterStrategy=#CXF_PAYLOAD_HEADER_FILTER"		
)	&lt;/PRE&gt; 
&lt;P&gt;and the cxfHeaderFilterStrategy object is necessary to remove unwanted headers (from previous components) being passed to this cxf client. So in a cProcessor before the cJavaDSLProcessor we have to reproduce the code that TOS writes with a cxf component :&lt;/P&gt; 
&lt;PRE&gt;import org.apache.camel.component.cxf.common.header.*;
CxfHeaderFilterStrategy consumerSoapHeaderFilter = new CxfHeaderFilterStrategy();
consumerSoapHeaderFilter.setRelayHeaders(false);
registry.put("CXF_PAYLOAD_HEADER_FILTER", consumerSoapHeaderFilter);&lt;/PRE&gt; 
&lt;P&gt;Loko&lt;/P&gt;</description>
      <pubDate>Wed, 18 Oct 2017 08:56:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Dynamic-CXF-client-parameters/m-p/2291970#M65095</guid>
      <dc:creator>Loko</dc:creator>
      <dc:date>2017-10-18T08:56:00Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic CXF client parameters</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Dynamic-CXF-client-parameters/m-p/2291971#M65096</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;Thanks for sharing your solution on forum. We have accepted your solution so that it allows others to see what has worked.&lt;/P&gt;
&lt;P&gt;Best regards&lt;/P&gt;
&lt;P&gt;Sabrina&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Oct 2017 09:43:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Dynamic-CXF-client-parameters/m-p/2291971#M65096</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-24T09:43:07Z</dc:date>
    </item>
  </channel>
</rss>

