<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">
<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>
                                <td>
                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px; -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
Soap over Jms - Error: Insufficient configuration for Conduit
</h3>
<span style="margin-bottom: 10px;">
created by <a href="http://community.jboss.org/people/ale2011">ale2011</a> in <i>Beginner's Corner</i> - <a href="http://community.jboss.org/message/645269#645269">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><p>Hello,</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span>I've been following this documentation for SOAP over JMS: </span><a class="jive-link-external-small" href="https://docs.jboss.org/author/display/JBWS/SOAP+over+JMS" target="_blank">https://docs.jboss.org/author/display/JBWS/SOAP+over+JMS</a></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>I'm able to get the server to work but after when I implemented the client, I tried to run it and I have this error: </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><pre class="jive-pre"><code class="jive-code">Jan 8, 2012 7:51:05 PM org.apache.cxf.service.factory.ReflectionServiceFactoryBean buildServiceFromWSDL
INFO: Creating Service {http://soapjms.rd.nsrr.swim.faa.gov/}SoapJmsWeatherImpl from WSDL: <PATH_TO_WSDL>
Invoking getForecast...
Jan 8, 2012 7:51:10 PM org.apache.cxf.phase.PhaseInterceptorChain doDefaultLogging
WARNING: Interceptor for {http://soapjms.rd.nsrr.swim.faa.gov/}SoapJmsWeatherImpl#{http://soapjms.rd.nsrr.swim.faa.gov/}GetForecast has thrown exception, unwinding now
org.apache.cxf.configuration.ConfigurationException: Insufficient configuration for Conduit. Did you configure a
<jms:conduit name="{http://soapjms.rd.nsrr.swim.faa.gov/}SoapJmsWeatherImplPort.jms-conduit"> and set the
jndiConnectionFactoryName ?
          at org.apache.cxf.transport.jms.JMSConfiguration.ensureProperlyConfigured(JMSConfiguration.java:106)
          at org.apache.cxf.transport.jms.JMSConduit.prepare(JMSConduit.java:102)
          at org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage(MessageSenderInterceptor.java:46)
          at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
          at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:484)
          at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:414)
          at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:317)
          at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:269)
          at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
          at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
          at $Proxy25.getForecast(Unknown Source)
          at gov.faa.swim.nsrr.rd.soapjms.Main.main(Main.java:49)
Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: Insufficient configuration for Conduit. Did you configure a
<jms:conduit name="{http://soapjms.rd.nsrr.swim.faa.gov/}SoapJmsWeatherImplPort.jms-conduit"> and set the
jndiConnectionFactoryName ?
          at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:146)
          at $Proxy25.getForecast(Unknown Source)
          at gov.faa.swim.nsrr.rd.soapjms.Main.main(Main.java:49)
Caused by: org.apache.cxf.configuration.ConfigurationException: Insufficient configuration for Conduit. Did you configure a
<jms:conduit name="{http://soapjms.rd.nsrr.swim.faa.gov/}SoapJmsWeatherImplPort.jms-conduit"> and set the
jndiConnectionFactoryName ?
          at org.apache.cxf.transport.jms.JMSConfiguration.ensureProperlyConfigured(JMSConfiguration.java:106)
          at org.apache.cxf.transport.jms.JMSConduit.prepare(JMSConduit.java:102)
          at org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage(MessageSenderInterceptor.java:46)
          at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
          at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:484)
          at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:414)
          at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:317)
          at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:269)
          at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
          at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
          ... 2 more
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>I have created a cxf.xml file that contains the jms:conduit and jms:destination (below), and put it in the /WEB-INF/ directory of my server .WAR file. But somehow JBoss does not read that file.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><pre class="jive-pre"><code class="jive-code jive-xml">...
<span class="jive-xml-tag"><span><jms:conduit name="{</span><a class="jive-link-external-small" href="http://soapjms.rd.nsrr.swim.faa.gov/" target="_blank">http://soapjms.rd.nsrr.swim.faa.gov/</a><span>}SoapJmsWeatherImplPort.jms-conduit"></span></span>
           <span class="jive-xml-tag"><jms:address destinationStyle="queue"
                              jndiConnectionFactoryName="java:activemq/QueueConnectionFactory"
                               jndiDestinationName="java:activemq/queue/GetForecastRequestQueue"
                               jndiReplyDestinationName="java:activemq/queue/GetForecastResponseQueue"></span>
            <span class="jive-xml-tag"><jms:JMSNamingProperty name="java.naming.factory.initial"
                                                                       value="org.apache.activemq.jndi.ActiveMQInitialContextFactory" /></span>
           <span class="jive-xml-tag"><jms:JMSNamingProperty name="java.naming.provider.url" value="vm://localhost" /></span>
           <span class="jive-xml-tag"></jms:address></span>
    <span class="jive-xml-tag"></jms:conduit></span>
    <span class="jive-xml-tag"><span><jms:destination name="{</span><a class="jive-link-external-small" href="http://soapjms.rd.nsrr.swim.faa.gov/" target="_blank">http://soapjms.rd.nsrr.swim.faa.gov/</a><span>}SoapJmsWeatherImplPort.jms-destination"></span></span>
           <span class="jive-xml-tag"><jms:address destinationStyle="queue"
                              jndiConnectionFactoryName="java:activemq/QueueConnectionFactory"
                              jndiDestinationName="java:activemq/queue/GetForecastRequestQueue"
                               jndiReplyDestinationName="java:activemq/queue/GetForecastResponseQueue"></span>
           <span class="jive-xml-tag"><jms:JMSNamingProperty name="java.naming.factory.initial"
                                                                       value="org.apache.activemq.jndi.ActiveMQInitialContextFactory" /></span>
           <span class="jive-xml-tag"><jms:JMSNamingProperty name="java.naming.provider.url" value="vm://localhost" /></span>
           <span class="jive-xml-tag"></jms:address></span>
    <span class="jive-xml-tag"></jms:destination></span>
...
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Here is my client:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><pre class="jive-pre"><code class="jive-code jive-java"><font color="navy"><b>package</b></font> gov.faa.swim.nsrr.rd.soapjms;
 
<font color="navy"><b>import</b></font> java.net.URL;
<font color="navy"><b>import</b></font> javax.xml.namespace.QName;
<font color="navy"><b>import</b></font> org.apache.cxf.Bus;
<font color="navy"><b>import</b></font> org.apache.cxf.BusFactory;
<font color="navy"><b>import</b></font> org.apache.cxf.interceptor.LoggingInInterceptor;
<font color="navy"><b>import</b></font> org.apache.cxf.jaxws.JaxWsProxyFactoryBean;
 
<font color="navy"><b>public</b></font> <font color="navy"><b>final</b></font> <font color="navy"><b>class</b></font> Main <font color="navy">{</font>
     <font color="navy"><b>private</b></font> <font color="navy"><b>static</b></font> <font color="navy"><b>final</b></font> QName SERVICE_NAME = <font color="navy"><b>new</b></font> QName(<font color="red">"http://soapjms.rd.nsrr.swim.faa.gov/"</font>, <font color="red">"SoapJmsWeatherImpl"</font>);
   
     <font color="navy"><b>private</b></font> Main() <font color="navy">{</font>    <font color="navy">}</font>
 
     <font color="navy"><b>public</b></font> <font color="navy"><b>static</b></font> <font color="navy"><b>void</b></font> main(String args[]) <font color="navy"><b>throws</b></font> Exception <font color="navy">{</font>
        URL wsdlURL = SoapJmsWeatherImpl.WSDL_LOCATION;
        Bus bus = BusFactory.newInstance().createBus();
        BusFactory.setThreadDefaultBus(bus);
        try       <font color="navy">{</font>
                  SoapJmsWeatherImpl service = <font color="navy"><b>new</b></font> SoapJmsWeatherImpl(wsdlURL, SERVICE_NAME);
                  System.out.println(<font color="red">"===== Interacting with JMS endpoint ======"</font>);
                  SoapJmsWeatherImplPortType proxy = (SoapJmsWeatherImplPortType) service.getSoapJmsWeatherImplPort();
               
                System.out.println(<font color="red">"\nInvoking getForecast..."</font>);
                proxy.getForecast(<font color="red">"Philadelphia"</font>);
        <font color="navy">}</font>
        finally      <font color="navy">{</font>
                  bus.shutdown(<font color="navy"><b>true</b></font>);
        <font color="navy">}</font>
        System.exit(0);
    <font color="navy">}</font>
<font color="navy">}</font>
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Could someone guide me to the right direction to get this to work? Thanks.</p></div>
<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
<p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/645269#645269">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in Beginner's Corner at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2075">Community</a></p>
</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>