[jboss-user] [JNDI and Naming] - Soap over JMS using JBOSS - Error: scheme java not recognized

ale2011 do-not-reply at jboss.com
Wed Dec 7 13:14:50 EST 2011


ale2011 [http://community.jboss.org/people/ale2011] created the discussion

"Soap over JMS using JBOSS - Error: scheme java not recognized"

To view the discussion, visit: http://community.jboss.org/message/640402#640402

--------------------------------------------------------------
Hello,

I'm a newbie with web services and Jboss. I am trying to develop a simple Soap over JMS weather service with Jboss. 
- I integrated activeMQ with Jboss ( http://activemq.apache.org/integrating-apache-activemq-with-jboss.html link)
- Implemented the server and deployed it
- Generate the client codes , and my main class is as below (I followed this  https://docs.jboss.org/author/display/JBWS/SOAP+over+JMS tutorial)

public static void main(String args[]) throws Exception {
        URL wsdlURL = new URL("file:/C:/jboss/jboss.6.0.0.Final/server/default/data/wsdl/SoapOverJms_JmsOnly.war/soapjmsweatherimpl.wsdl");
        System.out.println(wsdlURL);
        
        if (args.length > 0)  { 
            File wsdlFile = new File(args[0]);
            try {
                if (wsdlFile.exists()) {
                    wsdlURL = wsdlFile.toURI().toURL();
                } else {
                    wsdlURL = new URL(args[0]);
                }
            } catch (MalformedURLException e) {
                e.printStackTrace();
            }
        }
      
        SoapJmsWeatherImpl ss = new SoapJmsWeatherImpl(wsdlURL, SERVICE_NAME);
        Bus bus = BusFactory.newInstance().createBus();
        BusFactory.setThreadDefaultBus(bus);
 
        try {
            SoapJmsWeatherImplPort proxy = (SoapJmsWeatherImplPort) ss.getPort(new QName("http://soapoverjms.nsrr.swim.faa.gov/", "SoapJmsWeatherImplPort"), SoapJmsWeatherImplPort.class);
 
            System.out.println("\nInvoking getForecast...");
            proxy.getForecast("Philadelphia");
        }
        finally
        {
            bus.shutdown(true);
        }
        System.exit(0);
    }


After I execute the client, I got this error: 

Exception in thread "main" 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


I could post more codes if neccessary. 
Could anyone explain why this exception was thrown? Any ideas/help would be appreciate.
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/640402#640402]

Start a new discussion in JNDI and Naming at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2083]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20111207/96cf79af/attachment.html 


More information about the jboss-user mailing list