<html>
<head>
    <base href="https://docs.jboss.org/author">
            <link rel="stylesheet" href="/author/s/en/2172/19/5/_/styles/combined.css?spaceKey=TEIID&amp;forWysiwyg=true" type="text/css">
    </head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
    <h2><a href="https://docs.jboss.org/author/display/TEIID/Web+Service+Data+Sources">Web Service Data Sources</a></h2>
    <h4>Page <b>edited</b> by             <a href="https://docs.jboss.org/author/display/~shawkins">Steven Hawkins</a>
    </h4>
        <br/>
                         <h4>Changes (31)</h4>
                                 
    
<div id="page-diffs">
                    <table class="diff" cellpadding="0" cellspacing="0">
    
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">h1. {color:#000000}{*}Web Service Data Sources{*}{color} <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">h1. {*}Web Service Data Sources{*} <br></td></tr>
            <tr><td class="diff-unchanged" > <br></td></tr>
            <tr><td class="diff-changed-lines" ><span class="diff-changed-words"><span class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">{color:#333333}</span>Web</span> service data sources use a Teiid specific JCA connector &quot;teiid-connector-ws.rar&quot;, which is deployed into the AS7.x during installation. There are many ways to create the file data source, using <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">CLI,&amp;nbsp;{color}{color:#005e8f}[{color:#005e8f}AdminShell{color}|AdminShell]{color}{color:#333333},</span> <span class="diff-added-words"style="background-color: #dfd;">CLI,&amp;nbsp;[AdminShell],</span> admin-console etc. The example shown below uses the CLI tool, as this works in both Standalone and Domain <span class="diff-changed-words">modes.<span class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">{color}</span></span> <br></td></tr>
            <tr><td class="diff-unchanged" > <br></td></tr>
            <tr><td class="diff-changed-lines" ><span class="diff-changed-words"><span class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">{color:#333333}</span>Execute</span> following command <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">using&amp;nbsp;{color}{color:#005e8f}[{color:#005e8f}CLI{color}|https://docs.jboss.org/author/display/AS7/Admin+Guide#AdminGuide-RunningtheCLI]{color}{color:#333333}&amp;nbsp;once</span> <span class="diff-added-words"style="background-color: #dfd;">using&amp;nbsp;[CLI|https://docs.jboss.org/author/display/AS7/Admin+Guide#AdminGuide-RunningtheCLI]&amp;nbsp;once</span> you connected to the Server. Make sure you provide the correct endpoint and other properties below. Add any additional properties required by the connector by duplicating the &quot;connection-definitions&quot; command below. Edit the JNDI name to match the JNDI name you used in <span class="diff-changed-words">VDB.<span class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">{color}</span></span> <br></td></tr>
            <tr><td class="diff-unchanged" >{code} <br>batch <br></td></tr>
            <tr><td class="diff-unchanged" >/subsystem=resource-adapters/resource-adapter=wsDS:add(archive=teiid-connector-ws.rar, transaction-support=NoTransaction) <br></td></tr>
            <tr><td class="diff-unchanged" >/subsystem=resource-adapters/resource-adapter=wsDS/connection-definitions=wsDS:add(jndi-name=java:/wsDS, class-name=org.teiid.resource.adapter.ws.WSManagedConnectionFactory, enabled=true, use-java-context=true) <br></td></tr>
            <tr><td class="diff-unchanged" >/subsystem=resource-adapters/resource-adapter=wsDS/connection-definitions=wsDS/config-properties=EndPoint:add(value={end_point}) <br></td></tr>
            <tr><td class="diff-unchanged" >/subsystem=resource-adapters/resource-adapter=wsDS/connection-definitions=wsDS:enable <br></td></tr>
            <tr><td class="diff-unchanged" >runbatch <br>{code} <br>{info} <br></td></tr>
            <tr><td class="diff-changed-lines" ><span class="diff-changed-words"><span class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">{color:#333333}</span>To</span> find out all the properties that are supported by this Web Service Connector execute the following command in the <span class="diff-changed-words">CLI.<span class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">{color}</span></span> <br></td></tr>
            <tr><td class="diff-changed-lines" ><span class="diff-changed-words">{code}/subsystem=teiid:read-rar-description(rar-name=teiid-connector-ws.rar){code}<span class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">{color:#333333}</span>The</span> Web Service Data Source supports specifying a WSDL using the Wsdl property.&amp;nbsp; If the Wsdl property is set, then the ServiceName, EndPointName, and NamespaceUri properties should also be set.&amp;nbsp; The Wsdl property may be a URL or file location or the WSDL to <span class="diff-changed-words">use.{<span class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">color}{</span>info}</span> <br></td></tr>
            <tr><td class="diff-unchanged" >{warning} <br></td></tr>
            <tr><td class="diff-changed-lines" ><span class="diff-changed-words"><span class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">{color:#333333}</span>As</span> of AS 7.1 CR1b release the above does not work without restarting the Server. This issue will be fixed before 7.2 <span class="diff-changed-words">Final.{<span class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">color}{</span>warning}</span> <br></td></tr>
            <tr><td class="diff-unchanged" >{tip:title=Developer&#39;s Tip} <br></td></tr>
            <tr><td class="diff-changed-lines" ><span class="diff-changed-words"><span class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">{color:#333333}</span>If</span> the JBoss AS 7.x is running in standalone mode, you can also manually edit the &quot;&lt;jboss-install&gt;/standalone/configuration/standalone-teiid.xml&quot; file and add the XML configuration defined in &quot;&lt;jboss-install&gt;/docs/teiid/datasources/web-service&quot; directory under &quot;resource-adapters&quot; subsystem. Shutdown the server before you edit this file, and restart after the modifications are <span class="diff-changed-words">done.{<span class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">color}{</span>tip}</span> <br></td></tr>
            <tr><td class="diff-unchanged" > <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">h3. {color:#000000}{*}CXF Configuration{*}{color} <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">h3. {*}CXF Configuration{*} <br></td></tr>
            <tr><td class="diff-unchanged" > <br></td></tr>
            <tr><td class="diff-changed-lines" ><span class="diff-changed-words"><span class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">{color:#333333}</span>Each</span> web service data source may choose a particular CXF config file and port configuration. <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">The&amp;nbsp;{color}{color:#333333}{{{}ConfigFile{}}}{color}{color:#333333}&amp;nbsp;config</span> <span class="diff-added-words"style="background-color: #dfd;">The&amp;nbsp;{{{}ConfigFile{}}}&amp;nbsp;config</span> property specifies the Spring XML configuration file for the CXF Bus and port configuration to be used by connections. If no config file is specified then the system default configuration will be <span class="diff-changed-words">used.<span class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">{color}</span></span> <br></td></tr>
            <tr><td class="diff-unchanged" > <br></td></tr>
            <tr><td class="diff-changed-lines" ><span class="diff-changed-words"><span class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">{color:#333333}</span>Only</span> 1 port configuration can be used by this data source. You may explicitly set the local name of the port QName to use via <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">the&amp;nbsp;{color}{color:#333333}{{{}ConfigName{}}}{color}{color:#333333}&amp;nbsp;property.</span> <span class="diff-added-words"style="background-color: #dfd;">the&amp;nbsp;{{{}ConfigName{}}}&amp;nbsp;property.</span> The namespace URI for the QName in your config file should <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">be{color}{color:#005e8f}[{color:#005e8f}http://teiid.org{color}|http://teiid.org]{color}{color:#333333}.</span> <span class="diff-added-words"style="background-color: #dfd;">be\[http://teiid.org\|http://teiid.org\].</span> See the sections on WS-Security, Logging, etc. for examples of using the CXF configuration <span class="diff-changed-words">file.<span class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">{color}</span></span> <br></td></tr>
            <tr><td class="diff-unchanged" >{code:lang=xml|title=Sample Spring XML Configuration To Set Timeouts}&lt;beans xmlns=&quot;http://www.springframework.org/schema/beans&quot; <br>                xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >&lt;/beans&gt; <br>{code} <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">{color:#333333}In the conduit name \{{color}{color:#005e8f}[{color:#005e8f}http://teiid.org{color}|http://teiid.org]{color}{color:#333333}}configName.http-conduit, the namespace,&amp;nbsp;{color}{color:#005e8f}[{color:#005e8f}http://teiid.org{color}|http://teiid.org]{color}{color:#333333}, is not configurable. The local name is followed by .http-conduit. It will be based upon the configName setting, with a default value of teiid.{color} <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">In the conduit name \{\[http://teiid.org\|http://teiid.org\]}configName.http-conduit, the namespace,&amp;nbsp;\[http://teiid.org\|http://teiid.org\], is not configurable. The local name is followed by .http-conduit. It will be based upon the configName setting, with a default value of teiid. <br></td></tr>
            <tr><td class="diff-unchanged" > <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">{color:#333333}See the&amp;nbsp;{color}{color:#005e8f}[{color:#005e8f}CXF documentation{color}|http://cxf.apache.org/docs/]{color}{color:#333333}&amp;nbsp;for all possible configuration options.{color} <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">See the&amp;nbsp;\[CXF documentation\|http://cxf.apache.org/docs/\]&amp;nbsp;for all possible configuration options. <br></td></tr>
            <tr><td class="diff-unchanged" >{note} <br></td></tr>
            <tr><td class="diff-changed-lines" ><span class="diff-changed-words"><span class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">{color:#333333}</span>The</span> CXF configuration is currently only applicable to non-binary web service <span class="diff-changed-words">calls.{<span class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">color}{</span>note}</span> <br></td></tr>
            <tr><td class="diff-unchanged" > <br></td></tr>
            <tr><td class="diff-changed-lines" >h3. <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">{color:#000000}{*}WS-Security{*}{color}</span> <span class="diff-added-words"style="background-color: #dfd;">{*}WS-Security{*}</span> <br></td></tr>
            <tr><td class="diff-unchanged" > <br></td></tr>
            <tr><td class="diff-changed-lines" ><span class="diff-changed-words"><span class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">{color:#333333}</span>To</span> enable the use of WS-Security, <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">the&amp;nbsp;{color}{color:#333333}{{{}SecurityType{}}}{color}{color:#333333}&amp;nbsp;should</span> <span class="diff-added-words"style="background-color: #dfd;">the&amp;nbsp;{{{}SecurityType{}}}&amp;nbsp;should</span> be set to WSSecurity. At this time Teiid does not expect a WSDL to describe the service being used. Thus a Spring XML configuration file is not only required, it must instead contain all of the relevant policy configuration. And just as with the general configuration, each data source is limited to specifying only a single port configuration to <span class="diff-changed-words">use.<span class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">{color}</span></span> <br></td></tr>
            <tr><td class="diff-unchanged" >{code} <br>batch <br></td></tr>
            <tr><td class="diff-unchanged" >/subsystem=resource-adapters/resource-adapter=wsDS:add(archive=teiid-connector-ws.rar, transaction-support=NoTransaction) <br></td></tr>
            <tr><td class="diff-unchanged" >/subsystem=resource-adapters/resource-adapter=wsDS/connection-definitions=wsDS:add(jndi-name=java:/wsDS, class-name=org.teiid.resource.adapter.ws.WSManagedConnectionFactory, enabled=true, use-java-context=true) <br></td></tr>
            <tr><td class="diff-unchanged" >/subsystem=resource-adapters/resource-adapter=wsDS/connection-definitions=wsDS/config-properties=ConfigFile:add(value=${jboss.server.home.dir}/standalone/configuration/xxx-jbossws-cxf.xml) <br></td></tr>
            <tr><td class="diff-unchanged" >/subsystem=resource-adapters/resource-adapter=wsDS/connection-definitions=wsDS/config-properties=ConfigName:add(value=port_x) <br></td></tr>
            <tr><td class="diff-unchanged" >/subsystem=resource-adapters/resource-adapter=wsDS/connection-definitions=wsDS/config-properties=SecurityType:add(value=WSSecurity) <br></td></tr>
            <tr><td class="diff-unchanged" >/subsystem=resource-adapters/resource-adapter=wsDS/connection-definitions=wsDS:enable <br></td></tr>
            <tr><td class="diff-unchanged" >runbatch <br>{code} <br></td></tr>
            <tr><td class="diff-changed-lines" ><span class="diff-changed-words"><span class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">{color:#333333}</span>Corresponding</span> xxx-jbossws-cxf.xml file that adds a timestamp to the SOAP <span class="diff-changed-words">header<span class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">{color}</span></span> <br></td></tr>
            <tr><td class="diff-unchanged" >{code:title=Example WS-Security enabled data source} <br>&lt;beans xmlns=&quot;http://www.springframework.org/schema/beans&quot; <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >&lt;/beans&gt; <br>{code} <br></td></tr>
            <tr><td class="diff-changed-lines" ><span class="diff-changed-words"><span class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">{color:#333333}</span>Note</span> that the client port configuration is matched to the data source instance by the QName <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">\{{color}{color:#005e8f}[{color:#005e8f}http://teiid.org{color}|http://teiid.org]{color}{color:#333333}}port_x.</span> <span class="diff-added-words"style="background-color: #dfd;">\{\[http://teiid.org\|http://teiid.org\]}port_x.</span> The configuration may contain other port configurations with different local <span class="diff-changed-words">names.<span class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">{color}</span></span> <br></td></tr>
            <tr><td class="diff-unchanged" > <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">{color:#333333}For more information on configuring CXF interceptors, please consult the&amp;nbsp;{color}{color:#005e8f}[{color:#005e8f}CXF documentation{color}|https://cwiki.apache.org/CXF20DOC/ws-security.html]{color}{color:#333333}&amp;nbsp;or the&amp;nbsp;{color}{color:#005e8f}[{color:#005e8f}JBossWS-CXF documentation{color}|http://community.jboss.org/wiki/JBossWS-StackCXFUserGuide#WSSecurity]{color}{color:#333333}.{color} <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">For more information on configuring CXF interceptors, please consult the&amp;nbsp;[CXF documentation|https://cwiki.apache.org/CXF20DOC/ws-security.html]&amp;nbsp;or the&amp;nbsp;[JBossWS-CXF documentation|http://community.jboss.org/wiki/JBossWS-StackCXFUserGuide#WSSecurity]. <br></td></tr>
            <tr><td class="diff-unchanged" > <br></td></tr>
            <tr><td class="diff-changed-lines" >h3. <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">{color:#000000}{*}Logging{*}{color}</span> <span class="diff-added-words"style="background-color: #dfd;">{*}Logging{*}</span> <br></td></tr>
            <tr><td class="diff-unchanged" > <br></td></tr>
            <tr><td class="diff-changed-lines" ><span class="diff-changed-words"><span class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">{color:#333333}</span>The</span> CXF config property may also be used to control the logging of requests and responses for specific or all ports. Logging, when enabled, will be performed at an INFO level to the org.apache.cxf.interceptor <span class="diff-changed-words">context.<span class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">{color}</span></span> <br></td></tr>
            <tr><td class="diff-unchanged" >{code:title=Example logging data source} <br>batch <br></td></tr>
            <tr><td class="diff-unchanged" >/subsystem=resource-adapters/resource-adapter=wsDS:add(archive=teiid-connector-ws.rar, transaction-support=NoTransaction) <br></td></tr>
            <tr><td class="diff-unchanged" >/subsystem=resource-adapters/resource-adapter=wsDS/connection-definitions=wsDS:add(jndi-name=java:/wsDS, class-name=org.teiid.resource.adapter.ws.WSManagedConnectionFactory, enabled=true, use-java-context=true) <br></td></tr>
            <tr><td class="diff-unchanged" >/subsystem=resource-adapters/resource-adapter=wsDS/connection-definitions=wsDS/config-properties=ConfigFile:add(value=${jboss.server.home.dir}/standalone/configuration/xxx-jbossws-cxf.xml) <br></td></tr>
            <tr><td class="diff-unchanged" >/subsystem=resource-adapters/resource-adapter=wsDS/connection-definitions=wsDS/config-properties=ConfigName:add(value=port_x) <br></td></tr>
            <tr><td class="diff-unchanged" >/subsystem=resource-adapters/resource-adapter=wsDS/connection-definitions=wsDS:enable <br></td></tr>
            <tr><td class="diff-unchanged" >runbatch <br>{code} <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">{color:#333333}Corresponding xxx-jbossws-cxf.xml{color} <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">Corresponding xxx-jbossws-cxf.xml <br></td></tr>
            <tr><td class="diff-unchanged" >{code:title=Example logging data source}&lt;beans xmlns=&quot;http://www.springframework.org/schema/beans&quot; <br>       xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >&lt;/beans&gt;{code} <br> <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">h3. {color:#000000}{*}Transport Settings{*}{color} <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">h3. {*}Transport Settings{*} <br></td></tr>
            <tr><td class="diff-unchanged" > <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">{color:#333333}The CXF config property may also be used to control low level aspects of the HTTP transport. See the&amp;nbsp;{color}{color:#005e8f}[{color:#005e8f}CXF documentation{color}|http://cxf.apache.org/docs/client-http-transport-including-ssl-support.html]{color}{color:#333333}&amp;nbsp;for all possible options.{color} <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">The CXF config property may also be used to control low level aspects of the HTTP transport. See the&amp;nbsp;[CXF documentation|http://cxf.apache.org/docs/client-http-transport-including-ssl-support.html]&amp;nbsp;for all possible options. <br></td></tr>
            <tr><td class="diff-unchanged" >{code:title=Example Disabling Hostname Verification} <br>&lt;beans xmlns=&quot;http://www.springframework.org/schema/beans&quot; <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
    
            </table>
    </div>                            <h4>Full Content</h4>
                    <div class="notificationGreySide">
        <h1><a name="WebServiceDataSources-%7B%7DWebServiceDataSources%7B%7D"></a><b>Web Service Data Sources</b></h1>

<p>Web service data sources use a Teiid specific JCA connector "teiid-connector-ws.rar", which is deployed into the AS7.x during installation. There are many ways to create the file data source, using CLI,&nbsp;<a href="/author/display/TEIID/AdminShell" title="AdminShell">AdminShell</a>, admin-console etc. The example shown below uses the CLI tool, as this works in both Standalone and Domain modes.</p>

<p>Execute following command using&nbsp;<a href="https://docs.jboss.org/author/display/AS7/Admin+Guide#AdminGuide-RunningtheCLI" class="external-link" rel="nofollow">CLI</a>&nbsp;once you connected to the Server. Make sure you provide the correct endpoint and other properties below. Add any additional properties required by the connector by duplicating the "connection-definitions" command below. Edit the JNDI name to match the JNDI name you used in VDB.</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false" style="font-size:12px; font-family: ConfluenceInstalledFont,monospace;">
batch
/subsystem=resource-adapters/resource-adapter=wsDS:add(archive=teiid-connector-ws.rar, transaction-support=NoTransaction)
/subsystem=resource-adapters/resource-adapter=wsDS/connection-definitions=wsDS:add(jndi-name=java:/wsDS, class-name=org.teiid.resource.adapter.ws.WSManagedConnectionFactory, enabled=true, use-java-context=true)
/subsystem=resource-adapters/resource-adapter=wsDS/connection-definitions=wsDS/config-properties=EndPoint:add(value={end_point})
/subsystem=resource-adapters/resource-adapter=wsDS/connection-definitions=wsDS:enable
runbatch
</pre>
</div></div>
<div class='panelMacro'><table class='infoMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="/author/images/icons/emoticons/information.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>To find out all the properties that are supported by this Web Service Connector execute the following command in the CLI.<br/>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false" style="font-size:12px; font-family: ConfluenceInstalledFont,monospace;">/subsystem=teiid:read-rar-description(rar-name=teiid-connector-ws.rar)</pre>
</div></div>The Web Service Data Source supports specifying a WSDL using the Wsdl property.&nbsp; If the Wsdl property is set, then the ServiceName, EndPointName, and NamespaceUri properties should also be set.&nbsp; The Wsdl property may be a URL or file location or the WSDL to use.</td></tr></table></div>
<div class='panelMacro'><table class='warningMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="/author/images/icons/emoticons/forbidden.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>As of AS 7.1 CR1b release the above does not work without restarting the Server. This issue will be fixed before 7.2 Final.</td></tr></table></div>
<div class='panelMacro'><table class='tipMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="/author/images/icons/emoticons/check.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td><b>Developer's Tip</b><br />If the JBoss AS 7.x is running in standalone mode, you can also manually edit the "&lt;jboss-install&gt;/standalone/configuration/standalone-teiid.xml" file and add the XML configuration defined in "&lt;jboss-install&gt;/docs/teiid/datasources/web-service" directory under "resource-adapters" subsystem. Shutdown the server before you edit this file, and restart after the modifications are done.</td></tr></table></div>

<h3><a name="WebServiceDataSources-%7B%7DCXFConfiguration%7B%7D"></a><b>CXF Configuration</b></h3>

<p>Each web service data source may choose a particular CXF config file and port configuration. The&nbsp;<tt>ConfigFile</tt>&nbsp;config property specifies the Spring XML configuration file for the CXF Bus and port configuration to be used by connections. If no config file is specified then the system default configuration will be used.</p>

<p>Only 1 port configuration can be used by this data source. You may explicitly set the local name of the port QName to use via the&nbsp;<tt>ConfigName</tt>&nbsp;property. The namespace URI for the QName in your config file should be[http://teiid.org&#124;http://teiid.org]. See the sections on WS-Security, Logging, etc. for examples of using the CXF configuration file.</p>
<div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>Sample Spring XML Configuration To Set Timeouts</b></div><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: xml; gutter: false" style="font-size:12px; font-family: ConfluenceInstalledFont,monospace;">&lt;beans xmlns="http://www.springframework.org/schema/beans"
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                xmlns:http-conf="http://cxf.apache.org/transports/http/configuration"
                xsi:schemaLocation="http://cxf.apache.org/transports/http/configuration
                http://cxf.apache.org/schemas/configuration/http-conf.xsd
                http://www.springframework.org/schema/beans
                http://www.springframework.org/schema/beans/spring-beans.xsd"&gt;

        &lt;http-conf:conduit name="{http://teiid.org}configName.http-conduit"&gt;
                &lt;http-conf:client ConnectionTimeout="120000" ReceiveTimeout="240000"/&gt;
        &lt;/http-conf:conduit&gt;
&lt;/beans&gt;
</pre>
</div></div>
<p>In the conduit name {[http://teiid.org&#124;http://teiid.org]}configName.http-conduit, the namespace,&nbsp;[http://teiid.org&#124;http://teiid.org], is not configurable. The local name is followed by .http-conduit. It will be based upon the configName setting, with a default value of teiid.</p>

<p>See the&nbsp;[CXF documentation&#124;http://cxf.apache.org/docs/]&nbsp;for all possible configuration options.</p>
<div class='panelMacro'><table class='noteMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="/author/images/icons/emoticons/warning.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>The CXF configuration is currently only applicable to non-binary web service calls.</td></tr></table></div>

<h3><a name="WebServiceDataSources-%7B%7DWSSecurity%7B%7D"></a><b>WS-Security</b></h3>

<p>To enable the use of WS-Security, the&nbsp;<tt>SecurityType</tt>&nbsp;should be set to WSSecurity. At this time Teiid does not expect a WSDL to describe the service being used. Thus a Spring XML configuration file is not only required, it must instead contain all of the relevant policy configuration. And just as with the general configuration, each data source is limited to specifying only a single port configuration to use.</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false" style="font-size:12px; font-family: ConfluenceInstalledFont,monospace;">
batch
/subsystem=resource-adapters/resource-adapter=wsDS:add(archive=teiid-connector-ws.rar, transaction-support=NoTransaction)
/subsystem=resource-adapters/resource-adapter=wsDS/connection-definitions=wsDS:add(jndi-name=java:/wsDS, class-name=org.teiid.resource.adapter.ws.WSManagedConnectionFactory, enabled=true, use-java-context=true)
/subsystem=resource-adapters/resource-adapter=wsDS/connection-definitions=wsDS/config-properties=ConfigFile:add(value=${jboss.server.home.dir}/standalone/configuration/xxx-jbossws-cxf.xml)
/subsystem=resource-adapters/resource-adapter=wsDS/connection-definitions=wsDS/config-properties=ConfigName:add(value=port_x)
/subsystem=resource-adapters/resource-adapter=wsDS/connection-definitions=wsDS/config-properties=SecurityType:add(value=WSSecurity)
/subsystem=resource-adapters/resource-adapter=wsDS/connection-definitions=wsDS:enable
runbatch
</pre>
</div></div>
<p>Corresponding xxx-jbossws-cxf.xml file that adds a timestamp to the SOAP header</p>
<div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>Example WS-Security enabled data source</b></div><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false" style="font-size:12px; font-family: ConfluenceInstalledFont,monospace;">
&lt;beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:jaxws="http://cxf.apache.org/jaxws"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
          http://www.springframework.org/schema/beans/spring-beans.xsd
          http://cxf.apache.org/jaxws
          http://cxf.apache.org/schemas/jaxws.xsd"&gt;

    &lt;jaxws:client name="{http://teiid.org}port_x"
        createdFromAPI="true"&gt;
        &lt;jaxws:outInterceptors&gt;
            &lt;bean/&gt;
            &lt;ref bean="Timestamp_Request"/&gt;
        &lt;/jaxws:outInterceptors&gt;
    &lt;/jaxws:client&gt;

    &lt;bean

        id="Timestamp_Request"&gt;
        &lt;constructor-arg&gt;
            &lt;map&gt;
                &lt;entry key="action" value="Timestamp"/&gt;
            &lt;map&gt;
        &lt;/constructor-arg&gt;
    &lt;/bean&gt;

&lt;/beans&gt;
</pre>
</div></div>
<p>Note that the client port configuration is matched to the data source instance by the QName {[http://teiid.org&#124;http://teiid.org]}port_x. The configuration may contain other port configurations with different local names.</p>

<p>For more information on configuring CXF interceptors, please consult the&nbsp;<a href="https://cwiki.apache.org/CXF20DOC/ws-security.html" class="external-link" rel="nofollow">CXF documentation</a>&nbsp;or the&nbsp;<a href="http://community.jboss.org/wiki/JBossWS-StackCXFUserGuide#WSSecurity" class="external-link" rel="nofollow">JBossWS-CXF documentation</a>.</p>

<h3><a name="WebServiceDataSources-%7B%7DLogging%7B%7D"></a><b>Logging</b></h3>

<p>The CXF config property may also be used to control the logging of requests and responses for specific or all ports. Logging, when enabled, will be performed at an INFO level to the org.apache.cxf.interceptor context.</p>
<div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>Example logging data source</b></div><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false" style="font-size:12px; font-family: ConfluenceInstalledFont,monospace;">
batch
/subsystem=resource-adapters/resource-adapter=wsDS:add(archive=teiid-connector-ws.rar, transaction-support=NoTransaction)
/subsystem=resource-adapters/resource-adapter=wsDS/connection-definitions=wsDS:add(jndi-name=java:/wsDS, class-name=org.teiid.resource.adapter.ws.WSManagedConnectionFactory, enabled=true, use-java-context=true)
/subsystem=resource-adapters/resource-adapter=wsDS/connection-definitions=wsDS/config-properties=ConfigFile:add(value=${jboss.server.home.dir}/standalone/configuration/xxx-jbossws-cxf.xml)
/subsystem=resource-adapters/resource-adapter=wsDS/connection-definitions=wsDS/config-properties=ConfigName:add(value=port_x)
/subsystem=resource-adapters/resource-adapter=wsDS/connection-definitions=wsDS:enable
runbatch
</pre>
</div></div>
<p>Corresponding xxx-jbossws-cxf.xml</p>
<div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>Example logging data source</b></div><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false" style="font-size:12px; font-family: ConfluenceInstalledFont,monospace;">&lt;beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:jaxws="http://cxf.apache.org/jaxws"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
          http://www.springframework.org/schema/beans/spring-beans.xsd
          http://cxf.apache.org/jaxws
          http://cxf.apache.org/schemas/jaxws.xsd"&gt;

    &lt;jaxws:client name="{http://teiid.org}port_y"
        createdFromAPI="true"&gt;
        &lt;jaxws:features&gt;
            &lt;bean/&gt;
        &lt;/jaxws:features&gt;
    &lt;/jaxws:client&gt;

&lt;/beans&gt;</pre>
</div></div>

<h3><a name="WebServiceDataSources-%7B%7DTransportSettings%7B%7D"></a><b>Transport Settings</b></h3>

<p>The CXF config property may also be used to control low level aspects of the HTTP transport. See the&nbsp;<a href="http://cxf.apache.org/docs/client-http-transport-including-ssl-support.html" class="external-link" rel="nofollow">CXF documentation</a>&nbsp;for all possible options.</p>
<div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>Example Disabling Hostname Verification</b></div><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false" style="font-size:12px; font-family: ConfluenceInstalledFont,monospace;">
&lt;beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:http-conf="http://cxf.apache.org/transports/http/configuration"
       xsi:schemaLocation="http://cxf.apache.org/transports/http/configuration
                           http://cxf.apache.org/schemas/configuration/http-conf.xsd
                           http://www.springframework.org/schema/beans
                             http://www.springframework.org/schema/beans/spring-beans.xsd"&gt;

  &lt;http-conf:conduit name="{http://teiid.org}port_z.http-conduit"&gt;
     &lt;!-- WARNING ! disableCNcheck=true should NOT be used in production --&gt;
     &lt;http-conf:tlsClientParameters disableCNcheck="true" /&gt;

  &lt;/http-conf:conduit&gt;
&lt;/beans&gt;
</pre>
</div></div>
    </div>
        <div id="commentsSection" class="wiki-content pageSection">
        <div style="float: right;" class="grey">
                        <a href="https://docs.jboss.org/author/users/removespacenotification.action?spaceKey=TEIID">Stop watching space</a>
            <span style="padding: 0px 5px;">|</span>
                <a href="https://docs.jboss.org/author/users/editmyemailsettings.action">Change email notification preferences</a>
</div>
        <a href="https://docs.jboss.org/author/display/TEIID/Web+Service+Data+Sources">View Online</a>
        |
        <a href="https://docs.jboss.org/author/pages/diffpagesbyversion.action?pageId=55476955&revisedVersion=2&originalVersion=1">View Changes</a>
                |
        <a href="https://docs.jboss.org/author/display/TEIID/Web+Service+Data+Sources?showComments=true&amp;showCommentArea=true#addcomment">Add Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>