<?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] cxf endpoint with 2004/08 ws-addressing in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/resolved-cxf-endpoint-with-2004-08-ws-addressing/m-p/2222130#M15852</link>
    <description>Hi all, 
&lt;BR /&gt;took a little time, but I found out by myself, the RequestContext map must be set in a route header
&lt;BR /&gt;Carpe diem
&lt;BR /&gt; Gabriel
&lt;BR /&gt;
&lt;PRE&gt;    &amp;lt;bean id="wsaddrProp" class="org.apache.cxf.ws.addressing.impl.AddressingPropertiesImpl"&amp;gt;&lt;BR /&gt;        &amp;lt;argument value="http://schemas.xmlsoap.org/ws/2004/08/addressing" /&amp;gt;&lt;BR /&gt;    &amp;lt;/bean&amp;gt;&lt;BR /&gt;    &lt;BR /&gt;    &amp;lt;bean id="reqContext" class="java.util.HashMap"&amp;gt;&lt;BR /&gt;        &amp;lt;argument&amp;gt;&lt;BR /&gt;            &amp;lt;map&amp;gt;&lt;BR /&gt;                &amp;lt;entry key="javax.xml.ws.addressing.context"&amp;gt;&lt;BR /&gt;                    &amp;lt;ref component-id="wsaddrProp" /&amp;gt;&lt;BR /&gt;                &amp;lt;/entry&amp;gt;&lt;BR /&gt;            &amp;lt;/map&amp;gt; &lt;BR /&gt;        &amp;lt;/argument&amp;gt;&lt;BR /&gt;    &amp;lt;/bean&amp;gt;&lt;BR /&gt;    &lt;BR /&gt;    &amp;lt;camelcxf:cxfEndpoint id="wsEndpoint" &lt;BR /&gt;                          address="/....Proxy"&lt;BR /&gt;                          xmlns:crabws="h...."&lt;BR /&gt;                          serviceClass="....."&lt;BR /&gt;    &amp;gt;&lt;BR /&gt;        &amp;lt;camelcxf:properties&amp;gt;&lt;BR /&gt;            &amp;lt;entry key="dataFormat" value="PAYLOAD"/&amp;gt;&lt;BR /&gt;        &amp;lt;/camelcxf:properties&amp;gt; &lt;BR /&gt;        &lt;BR /&gt;    &amp;lt;/camelcxf:cxfEndpoint&amp;gt;&lt;BR /&gt;    &lt;BR /&gt;    &amp;lt;camelcxf:cxfEndpoint id="wsService" &lt;BR /&gt;                          address="${ws.endpoint}"&lt;BR /&gt;                          xmlns:crabws="..."&lt;BR /&gt;                          serviceClass="...."&lt;BR /&gt;                          serviceName="..."&lt;BR /&gt;                          endpointName="...."&lt;BR /&gt;                          wsdlURL="classpath:META-INF/wsdl/....wsdl"&lt;BR /&gt;                          &lt;BR /&gt;    &amp;gt;&lt;BR /&gt;        &amp;lt;camelcxf:features&amp;gt;&lt;BR /&gt;            &amp;lt;wsa:addressing xmlns:wsa="http://cxf.apache.org/ws/addressing"/&amp;gt;&lt;BR /&gt;        &amp;lt;/camelcxf:features&amp;gt;&lt;BR /&gt;        &amp;lt;camelcxf:properties&amp;gt;&lt;BR /&gt;            &amp;lt;entry key="dataFormat" value="PAYLOAD"/&amp;gt;&lt;BR /&gt;        &amp;lt;/camelcxf:properties&amp;gt;    &lt;BR /&gt;     &lt;BR /&gt;    &amp;lt;/camelcxf:cxfEndpoint&amp;gt;&lt;BR /&gt;    &lt;BR /&gt;    &amp;lt;camelContext xmlns="http://camel.apache.org/schema/blueprint" id="wsProxyCtx"&amp;gt;&lt;BR /&gt;        &amp;lt;route id="wsProxy" &amp;gt;&lt;BR /&gt;            &amp;lt;from uri="wsEndpoint" /&amp;gt;&lt;BR /&gt;            &amp;lt;to uri="log:ws" /&amp;gt;&lt;BR /&gt;            &amp;lt;setHeader headerName="RequestContext"&amp;gt;&lt;BR /&gt;                &amp;lt;simple&amp;gt;${ref:reqContext}&amp;lt;/simple&amp;gt;&lt;BR /&gt;            &amp;lt;/setHeader&amp;gt;&lt;BR /&gt;            &amp;lt;to uri="wsService" /&amp;gt;&lt;BR /&gt;        &amp;lt;/route&amp;gt;&lt;BR /&gt;    &amp;lt;/camelContext&amp;gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 09 Jul 2012 15:25:18 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2012-07-09T15:25:18Z</dc:date>
    <item>
      <title>[resolved] cxf endpoint with 2004/08 ws-addressing</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-cxf-endpoint-with-2004-08-ws-addressing/m-p/2222129#M15851</link>
      <description>Hello all, 
&lt;BR /&gt;I have another interesting riddle, as well related to cxf and camel, but maybe there's someone who already solved the problem.. 
&lt;BR /&gt;We need to invoke a web service requiring WS-Addressing. By default, I would use following cxf endpoint: 
&lt;BR /&gt; 
&lt;PRE&gt;   &amp;lt;camelcxf:cxfEndpoint id="wsService" &lt;BR /&gt;                          address="${ws.endpoint}"&lt;BR /&gt;                          xmlns:crabws="..."&lt;BR /&gt;                          serviceClass="..."&lt;BR /&gt;                          serviceName="..."&lt;BR /&gt;                          endpointName="..."&lt;BR /&gt;                          wsdlURL="....?WSDL"&lt;BR /&gt;    &amp;gt;&lt;BR /&gt;        &amp;lt;camelcxf:features&amp;gt;&lt;BR /&gt;         &amp;lt;wsa:addressing xmlns:wsa="http://cxf.apache.org/ws/addressing"/&amp;gt;&lt;BR /&gt;        &amp;lt;/camelcxf:features&amp;gt;&lt;BR /&gt;        &amp;lt;camelcxf:properties&amp;gt;&lt;BR /&gt;            &amp;lt;entry key="dataFormat" value="PAYLOAD"/&amp;gt;&lt;BR /&gt;        &amp;lt;/camelcxf:properties&amp;gt;      &lt;BR /&gt;        &amp;lt;camelcxf:outInterceptors&amp;gt;&lt;BR /&gt;            &amp;lt;bean  id="wssOutInterceptor"&lt;BR /&gt;                   class="org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor"&amp;gt;&lt;BR /&gt;                &amp;lt;property name="properties"&amp;gt;&lt;BR /&gt;                    &amp;lt;map&amp;gt;&lt;BR /&gt;                        &amp;lt;entry key="action" value="Timestamp UsernameToken"/&amp;gt;&lt;BR /&gt;                        &amp;lt;entry key="passwordType"  value="PasswordDigest"/&amp;gt;&lt;BR /&gt;                        &amp;lt;entry key="user"  value="${ws.login}"/&amp;gt;&lt;BR /&gt;                        &amp;lt;entry key="passwordCallbackRef"&amp;gt;&lt;BR /&gt;                            &amp;lt;bean id="passwordProvider" class="com.apogado.ws.PasswordProvider"&amp;gt;&lt;BR /&gt;                                &amp;lt;property name="login" value="${ws.login}" /&amp;gt;&lt;BR /&gt;                                &amp;lt;property name="password" value="${ws.password}" /&amp;gt;&lt;BR /&gt;                            &amp;lt;/bean&amp;gt;&lt;BR /&gt;                        &amp;lt;/entry&amp;gt;&lt;BR /&gt;                        &amp;lt;entry key="precisionInMilliseconds"  value="false"/&amp;gt;&lt;BR /&gt;                    &amp;lt;/map&amp;gt;&lt;BR /&gt;                &amp;lt;/property&amp;gt;&lt;BR /&gt;            &amp;lt;/bean&amp;gt; &lt;BR /&gt;        &amp;lt;/camelcxf:outInterceptors&amp;gt;&lt;BR /&gt;    &amp;lt;/camelcxf:cxfEndpoint&amp;gt;&lt;/PRE&gt; 
&lt;BR /&gt;the problem is, that this way the CXF framework uses WSA using namespace 
&lt;A href="http://www.w3.org/2005/08/addressing" target="_blank" rel="nofollow noopener noreferrer"&gt;http://www.w3.org/2005/08/addressing&lt;/A&gt;, but required namespace is 
&lt;A href="http://schemas.xmlsoap.org/ws/2004/08/addressing" target="_blank" rel="nofollow noopener noreferrer"&gt;http://schemas.xmlsoap.org/ws/2004/08/addressing&lt;/A&gt; . The called service is a third party's endpoint, we have no control over it. The WSDL has no WS-Policy statements to enforce using the correct WS-Addressing namespace. 
&lt;BR /&gt; 
&lt;BR /&gt;If we invoke the WS by coded endpoint, it's easy, setting a simple property will do the magic: 
&lt;BR /&gt; 
&lt;PRE&gt;                 AddressingPropertiesImpl addrProps =&lt;BR /&gt;                            new AddressingPropertiesImpl("http://schemas.xmlsoap.org/ws/2004/08/addressing");&lt;BR /&gt;                    ((BindingProvider) this.client).getRequestContext().put("javax.xml.ws.addressing.context", addrProps);&lt;/PRE&gt; 
&lt;BR /&gt;nevertheless we'd like to do proxy services by camel mediation routes, so - the our question is, how to achieve using WS-Addressing 
&lt;A href="http://schemas.xmlsoap.org/ws/2004/08/addressing" target="_blank" rel="nofollow noopener noreferrer"&gt;http://schemas.xmlsoap.org/ws/2004/08/addressing&lt;/A&gt; in the camel cxf endpoint using OSGi blueprint XML or Spring? 
&lt;BR /&gt;Thank in advance for any hit or advice. 
&lt;BR /&gt;Best regards 
&lt;BR /&gt; Gabriel Vince</description>
      <pubDate>Sat, 16 Nov 2024 12:14:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-cxf-endpoint-with-2004-08-ws-addressing/m-p/2222129#M15851</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T12:14:44Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] cxf endpoint with 2004/08 ws-addressing</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-cxf-endpoint-with-2004-08-ws-addressing/m-p/2222130#M15852</link>
      <description>Hi all, 
&lt;BR /&gt;took a little time, but I found out by myself, the RequestContext map must be set in a route header
&lt;BR /&gt;Carpe diem
&lt;BR /&gt; Gabriel
&lt;BR /&gt;
&lt;PRE&gt;    &amp;lt;bean id="wsaddrProp" class="org.apache.cxf.ws.addressing.impl.AddressingPropertiesImpl"&amp;gt;&lt;BR /&gt;        &amp;lt;argument value="http://schemas.xmlsoap.org/ws/2004/08/addressing" /&amp;gt;&lt;BR /&gt;    &amp;lt;/bean&amp;gt;&lt;BR /&gt;    &lt;BR /&gt;    &amp;lt;bean id="reqContext" class="java.util.HashMap"&amp;gt;&lt;BR /&gt;        &amp;lt;argument&amp;gt;&lt;BR /&gt;            &amp;lt;map&amp;gt;&lt;BR /&gt;                &amp;lt;entry key="javax.xml.ws.addressing.context"&amp;gt;&lt;BR /&gt;                    &amp;lt;ref component-id="wsaddrProp" /&amp;gt;&lt;BR /&gt;                &amp;lt;/entry&amp;gt;&lt;BR /&gt;            &amp;lt;/map&amp;gt; &lt;BR /&gt;        &amp;lt;/argument&amp;gt;&lt;BR /&gt;    &amp;lt;/bean&amp;gt;&lt;BR /&gt;    &lt;BR /&gt;    &amp;lt;camelcxf:cxfEndpoint id="wsEndpoint" &lt;BR /&gt;                          address="/....Proxy"&lt;BR /&gt;                          xmlns:crabws="h...."&lt;BR /&gt;                          serviceClass="....."&lt;BR /&gt;    &amp;gt;&lt;BR /&gt;        &amp;lt;camelcxf:properties&amp;gt;&lt;BR /&gt;            &amp;lt;entry key="dataFormat" value="PAYLOAD"/&amp;gt;&lt;BR /&gt;        &amp;lt;/camelcxf:properties&amp;gt; &lt;BR /&gt;        &lt;BR /&gt;    &amp;lt;/camelcxf:cxfEndpoint&amp;gt;&lt;BR /&gt;    &lt;BR /&gt;    &amp;lt;camelcxf:cxfEndpoint id="wsService" &lt;BR /&gt;                          address="${ws.endpoint}"&lt;BR /&gt;                          xmlns:crabws="..."&lt;BR /&gt;                          serviceClass="...."&lt;BR /&gt;                          serviceName="..."&lt;BR /&gt;                          endpointName="...."&lt;BR /&gt;                          wsdlURL="classpath:META-INF/wsdl/....wsdl"&lt;BR /&gt;                          &lt;BR /&gt;    &amp;gt;&lt;BR /&gt;        &amp;lt;camelcxf:features&amp;gt;&lt;BR /&gt;            &amp;lt;wsa:addressing xmlns:wsa="http://cxf.apache.org/ws/addressing"/&amp;gt;&lt;BR /&gt;        &amp;lt;/camelcxf:features&amp;gt;&lt;BR /&gt;        &amp;lt;camelcxf:properties&amp;gt;&lt;BR /&gt;            &amp;lt;entry key="dataFormat" value="PAYLOAD"/&amp;gt;&lt;BR /&gt;        &amp;lt;/camelcxf:properties&amp;gt;    &lt;BR /&gt;     &lt;BR /&gt;    &amp;lt;/camelcxf:cxfEndpoint&amp;gt;&lt;BR /&gt;    &lt;BR /&gt;    &amp;lt;camelContext xmlns="http://camel.apache.org/schema/blueprint" id="wsProxyCtx"&amp;gt;&lt;BR /&gt;        &amp;lt;route id="wsProxy" &amp;gt;&lt;BR /&gt;            &amp;lt;from uri="wsEndpoint" /&amp;gt;&lt;BR /&gt;            &amp;lt;to uri="log:ws" /&amp;gt;&lt;BR /&gt;            &amp;lt;setHeader headerName="RequestContext"&amp;gt;&lt;BR /&gt;                &amp;lt;simple&amp;gt;${ref:reqContext}&amp;lt;/simple&amp;gt;&lt;BR /&gt;            &amp;lt;/setHeader&amp;gt;&lt;BR /&gt;            &amp;lt;to uri="wsService" /&amp;gt;&lt;BR /&gt;        &amp;lt;/route&amp;gt;&lt;BR /&gt;    &amp;lt;/camelContext&amp;gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 09 Jul 2012 15:25:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-cxf-endpoint-with-2004-08-ws-addressing/m-p/2222130#M15852</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-07-09T15:25:18Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] cxf endpoint with 2004/08 ws-addressing</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-cxf-endpoint-with-2004-08-ws-addressing/m-p/2222131#M15853</link>
      <description>thanks for sharing.  Good to know.</description>
      <pubDate>Tue, 10 Jul 2012 11:01:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-cxf-endpoint-with-2004-08-ws-addressing/m-p/2222131#M15853</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-07-10T11:01:54Z</dc:date>
    </item>
  </channel>
</rss>

