I've not tried this with Axis2 1.3 yet but you need to have the scripting
.mar in the Axis2 modules folder, or if you just need the support for
inline scripts (that you're showing below) then you could try just
renaming the .mar to a .jar and putting it on your classpath.
...ant
Please respond to [email protected]
To: [email protected]
cc:
Subject: Re: Problems with using JavaScript with Axis2
Hi Deepal,
Thnx for quick response, but I find it hard to believe
that what you
saying is true. Looking into source code ( for
org.apache.axis2.scripting.ScriptReceiver) it seems to me that it
WILL work. The only problem is to resolve ClassNotFound exception,
which I assume maybe result of my "none-standard" deployment of Axis2.
Andrei
On Sep 17, 2007, at 6:57 AM, Deepal jayasinghe wrote:
> hi Andrei ,
> This will not work in Axis2 , you need to do additional stuff to
> make js
> in to a Web service. There is an open source product called "WSO2
> Mashup
> Server " , which has very good support for js (which is built on
> Axis2 )
> you may try that.
>
> Thanks
> Deepal
>> Hi,
>> I wonder if someone will have a sec to help me little bit? I
>> think I figured out how to employ JavaScript with Axis2. I guess key
>> part is service.xml file. Mine version of it looks like this:
>>
>>
>> <service name="MyTest">
>> <description>
>> This is just a Test
>> </description>
>> <operation name="Hello">
>> <parameter name="script.js"><![CDATA[
>> function invoke( inMC, outMC ) {
>> Packages.java.lang.System.out.println( " Hello Axis2" );
>> }
>> ]]></parameter>
>> <messageReceiver
>> class="org.apache.axis2.scripting.ScriptReceiver" />
>> </operation>
>> </service>
>>
>> The problem is that I am getting CNF on
>> org.apache.axis2.scripting.ScriptReceiver class (stack trace at the
>> end of the e-mail). I have noticed that ScriptReceiver is part of
>> Scripting Module (scripting.mar). I guess the question is, do I have
>> to do anything special to make classes from modules available?
>>
>> Any help will be highly appreciated.
>>
>> Very Best regards,
>>
>> Andrei Tchijov
>>
>>
>>
>>
>> org.apache.axis2.deployment.DeploymentException: A
>> ClassNotFoundException error occurred in loading the message receiver
>> org.apache.axis2.scripting.ScriptReceiver
>> at
>> org.apache.axis2.deployment.ServiceBuilder.populateService
>> (ServiceBuilder.java:389)
>>
>> at
>> org.apache.axis2.deployment.repository.util.ArchiveReader.buildServic
>> eGroup(ArchiveReader.java:95)
>>
>> at
>> org.apache.axis2.deployment.repository.util.ArchiveReader.processServ
>> iceGroup(ArchiveReader.java:172)
>>
>> at
>> org.apache.axis2.deployment.ServiceDeployer.deploy
>> (ServiceDeployer.java:78)
>>
>> at
>> org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy
>> (DeploymentFileData.java:137)
>>
>> at
>> org.apache.axis2.deployment.DeploymentEngine.doDeploy
>> (DeploymentEngine.java:571)
>>
>> at
>> org.apache.axis2.deployment.repository.util.WSInfoList.update
>> (WSInfoList.java:141)
>>
>> at
>> org.apache.axis2.deployment.RepositoryListener.update
>> (RepositoryListener.java:318)
>>
>> at
>> org.apache.axis2.deployment.RepositoryListener.checkServices
>> (RepositoryListener.java:220)
>>
>> at
>> org.apache.axis2.deployment.DeploymentEngine.loadServices
>> (DeploymentEngine.java:118)
>>
>> at
>> org.apache.axis2.deployment.WarBasedAxisConfigurator.loadServices
>> (WarBasedAxisConfigurator.java:259)
>>
>> at
>> org.apache.axis2.context.ConfigurationContextFactory.createConfigurat
>> ionContext(ConfigurationContextFactory.java:78)
>>
>> at
>> org.apache.axis2.transport.http.AxisServlet.initConfigContext
>> (AxisServlet.java:500)
>>
>> at
>> org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:
>> 420)
>> at
>> org.mortbay.jetty.servlet.ServletHolder.initServlet
>> (ServletHolder.java:378)
>>
>> at
>> org.mortbay.jetty.servlet.ServletHolder.getServlet
>> (ServletHolder.java:324)
>>
>> at
>> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
>> 400)
>> at
>> org.mortbay.jetty.servlet.ServletHandler.handle
>> (ServletHandler.java:355)
>> at
>> org.mortbay.jetty.handler.ContextHandler.handle
>> (ContextHandler.java:567)
>> at
>> org.mortbay.jetty.handler.HandlerCollection.handle
>> (HandlerCollection.java:126)
>>
>> at
>> org.mortbay.jetty.handler.HandlerWrapper.handle
>> (HandlerWrapper.java:119)
>> at org.mortbay.jetty.Server.handle(Server.java:248)
>> at
>> org.mortbay.jetty.HttpConnection.handlerRequest
>> (HttpConnection.java:360)
>> at
>> org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete
>> (HttpConnection.java:614)
>>
>> at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:
>> 487)
>> at
>> org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:197)
>> at
>> org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:288)
>> at
>> org.mortbay.jetty.nio.SelectChannelConnector
>> $HttpChannelEndPoint.run(SelectChannelConnector.java:805)
>>
>> at
>> org.mortbay.thread.BoundedThreadPool$PoolThread.run
>> (BoundedThreadPool.java:475)
>>
>> Caused by: org.apache.axis2.deployment.DeploymentException: A
>> ClassNotFoundException error occurred in loading the message receiver
>> org.apache.axis2.scripting.ScriptReceiver
>> at
>> org.apache.axis2.deployment.DescriptionBuilder.loadMessageReceiver
>> (DescriptionBuilder.java:194)
>>
>> at
>> org.apache.axis2.deployment.ServiceBuilder.processOperations
>> (ServiceBuilder.java:743)
>>
>> at
>> org.apache.axis2.deployment.ServiceBuilder.populateService
>> (ServiceBuilder.java:316)
>>
>> ... 28 more
>> Caused by: java.lang.ClassNotFoundException:
>> org.apache.axis2.scripting.ScriptReceiver
>> at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
>> at java.security.AccessController.doPrivileged(Native Method)
>> at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>> at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>> at sun.misc.Launcher$AppClassLoader.loadClass
>> (Launcher.java:268)
>> at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>> at java.lang.ClassLoader.loadClassInternal
>> (ClassLoader.java:319)
>> at java.lang.Class.forName0(Native Method)
>> at java.lang.Class.forName(Class.java:164)
>> at org.apache.axis2.util.Loader.loadClass(Loader.java:261)
>> at org.apache.axis2.util.Loader.loadClass(Loader.java:229)
>> at
>> org.apache.axis2.deployment.DescriptionBuilder.loadMessageReceiver
>> (DescriptionBuilder.java:190)
>>
>> ... 30 more
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number
741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU