<!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 using JBOSS - Error: scheme java not recognized
</h3>
<span style="margin-bottom: 10px;">
created by <a href="http://community.jboss.org/people/ale2011">ale2011</a> in <i>JNDI and Naming</i> - <a href="http://community.jboss.org/message/640402#640402">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>I'm a newbie with web services and Jboss. I am trying to develop a simple Soap over JMS weather service with Jboss. </p><p>- I integrated activeMQ with Jboss (<a class="jive-link-external-small" href="http://activemq.apache.org/integrating-apache-activemq-with-jboss.html">link</a>)</p><p>- Implemented the server and deployed it</p><p>- Generate the client codes , and my main class is as below (I followed this <a class="jive-link-external-small" href="https://docs.jboss.org/author/display/JBWS/SOAP+over+JMS">tutorial</a>)</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>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 = <font color="navy"><b>new</b></font> URL(<font color="red">"file:/C:/jboss/jboss.6.0.0.Final/server/default/data/wsdl/SoapOverJms_JmsOnly.war/soapjmsweatherimpl.wsdl"</font>);
        System.out.println(wsdlURL);
       
        <font color="navy"><b>if</b></font> (args.length > 0)  <font color="navy">{</font>
            File wsdlFile = <font color="navy"><b>new</b></font> File(args[0]);
            <font color="navy"><b>try</b></font> <font color="navy">{</font>
                <font color="navy"><b>if</b></font> (wsdlFile.exists()) <font color="navy">{</font>
                    wsdlURL = wsdlFile.toURI().toURL();
                <font color="navy">}</font> <font color="navy"><b>else</b></font> <font color="navy">{</font>
                    wsdlURL = <font color="navy"><b>new</b></font> URL(args[0]);
                <font color="navy">}</font>
            <font color="navy">}</font> <font color="navy"><b>catch</b></font> (MalformedURLException e) <font color="navy">{</font>
                e.printStackTrace();
            <font color="navy">}</font>
        <font color="navy">}</font>
     
        SoapJmsWeatherImpl ss = <font color="navy"><b>new</b></font> SoapJmsWeatherImpl(wsdlURL, SERVICE_NAME);
        Bus bus = BusFactory.newInstance().createBus();
        BusFactory.setThreadDefaultBus(bus);
 
        <font color="navy"><b>try</b></font> <font color="navy">{</font>
            SoapJmsWeatherImplPort proxy = (SoapJmsWeatherImplPort) ss.getPort(<font color="navy"><b>new</b></font> QName(<font color="red">"http://soapoverjms.nsrr.swim.faa.gov/"</font>, <font color="red">"SoapJmsWeatherImplPort"</font>), SoapJmsWeatherImplPort.class);
 
            System.out.println(<font color="red">"\nInvoking getForecast..."</font>);
            proxy.getForecast(<font color="red">"Philadelphia"</font>);
        <font color="navy">}</font>
        <font color="navy"><b>finally</b></font>
        <font color="navy">{</font>
            bus.shutdown(<font color="navy"><b>true</b></font>);
        <font color="navy">}</font>
        System.exit(0);
    <font color="navy">}</font>
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>After I execute the client, I got this error: </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><pre class="jive-pre"><code class="jive-code jive-java">Exception in thread <font color="red">"main"</font> javax.xml.ws.soap.SOAPFaultException: javax.naming.NamingException: scheme java not recognized
    at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:146)
    at $Proxy31.getForecast(Unknown Source)
    at gov.faa.swim.nsrr.soapoverjms.MainClient.main(MainClient.java:59)
Caused by: java.lang.RuntimeException: javax.naming.NamingException: scheme java not recognized
    at org.apache.cxf.transport.jms.JMSFactory.getConnectionFactoryFromJndi(JMSFactory.java:87)
    at org.apache.cxf.transport.jms.JMSConfiguration.getOrCreateWrappedConnectionFactory(JMSConfiguration.java:433)
    at org.apache.cxf.transport.jms.JMSConfiguration.ensureProperlyConfigured(JMSConfiguration.java:104)
    at org.apache.cxf.transport.jms.JMSConduit.prepare(JMSConduit.java:101)
    at org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage(MessageSenderInterceptor.java:46)
    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:516)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:313)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:265)
    at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
    at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
    ... 2 more
Caused by: javax.naming.NamingException: scheme java not recognized
    at org.apache.activemq.jndi.ReadOnlyContext.lookup(ReadOnlyContext.java:221)
    at javax.naming.InitialContext.lookup(Unknown Source)
    at org.springframework.jndi.JndiTemplate$1.doInContext(JndiTemplate.java:154)
    at org.springframework.jndi.JndiTemplate.execute(JndiTemplate.java:87)
    at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:152)
    at org.apache.cxf.transport.jms.JMSFactory.getConnectionFactoryFromJndi(JMSFactory.java:75)
    ... 12 more
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>I could post more codes if neccessary. </p><p>Could anyone explain why this exception was thrown? Any ideas/help would be appreciate.</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/640402#640402">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JNDI and Naming at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2083">Community</a></p>
</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>