Help coderanch get a
new server
by contributing to the fundraiser

zoran jeremic

Greenhorn
+ Follow
since Oct 31, 2010
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by zoran jeremic

Ivan Krizsan wrote:Hi!
Just curious: Why do you use Axis to create a web service when you can have Tuscany do that for you?
Tuscany will, as far as I know, even use Axis when exposing web services.
Best wishes!



That was my primary idea. However, I found a lot of difficulties to configure Tuscany to expose a web service to the external web application, so I tried in this way that seems like easier solution at the moment. Now I'm back to the Tuscany. I solved the problem by migrating from 1.6 to 2.0 version, and it works now.

Thanks.
13 years ago

Ivan Krizsan wrote:

I can tell from the stacktrace that you are not developing a typical web service, but a SCA application using Apache Tuscany.
Getting the Apache Tuscany dependencies right is not a trivial task - I would recommend using Maven and working from one of their samples, using the pom file from the sample that is closest to what you are trying to accomplish.
Best wishes!



This is Tuscany SCA application that I'm trying to wrap within typical web service (I'm using Axis2). The main reason for this is it has to be used by PHP application and I didn't found a stable support in PHP for SCA services.
However, I think that this is not a problem with Tuscany libraries, but with how eclipse plugin for Axis2 pack these libraries. Probably it is missing some manifest information for these jars. If I manually copy these libraries somewhere on the classpath, it works fine.

Zoran
13 years ago
Hi,

I need some help on developing Web service application. I'm using axis 2 to develop Web service. I have axis.war on glassfish 3 server. I have created a web server application in Netbeans and I have deployed it on server using axis plugin. My application is dependent on some jar libraries. I added it to the compile libraries list in NetBeansTenb, but they are not available to the web service. I checked, and all jars are there. AAR file is in /WEB-INF/services, and jar files are inside of the AAR in lib directory.

When I'm using SoapUI NetBeans plugin to test it, I got errors indicating that class from library is not available.
This is the error I got when I'm trying to access web service through the browser window:

INFO: [ERROR] The endpoint reference (EPR) for the Operation not found is /axis2/services/UserManagementWS?wsdl/setCurrentUser?username=ddd and the WSA Action = null

and this is error I got when I try to test service using soapUI plugin for NetBeans:

INFO: [ERROR] Exception occurred while trying to invoke service method setCurrentUser
java.lang.ExceptionInInitializerError
at com.corridor.services.user.UserManagementWS.setCurrentUser(UserManagementWS.java:21)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:194)
at org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver.invokeBusinessLogic(RPCInOnlyMessageReceiver.java:63)
at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:114)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:173)
at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:167)
at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:142)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:431)
at org.apache.catalina.core.StandardWrapperValve.preInvoke(StandardWrapperValve.java:462)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:139)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:186)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:719)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:657)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:96)
at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:98)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:187)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:719)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:657)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:651)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1030)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:142)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:719)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:657)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:651)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1030)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:325)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:242)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:180)
at com.sun.grizzly.http.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:633)
at com.sun.grizzly.http.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:570)
at com.sun.grizzly.http.DefaultProcessorTask.process(DefaultProcessorTask.java:827)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:152)
at com.sun.enterprise.v3.services.impl.GlassfishProtocolChain.executeProtocolFilter(GlassfishProtocolChain.java:71)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:103)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:89)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:67)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:56)
at com.sun.grizzly.util.WorkerThreadImpl.processTask(WorkerThreadImpl.java:325)
at com.sun.grizzly.util.WorkerThreadImpl.run(WorkerThreadImpl.java:184)
Caused by: org.osoa.sca.ServiceRuntimeException: java.lang.NullPointerException
at org.apache.tuscany.sca.node.impl.NodeImpl.<init>(NodeImpl.java:204)
at org.apache.tuscany.sca.node.impl.NodeFactoryImpl.createSCANodeFromClassLoader(NodeFactoryImpl.java:37)
at org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.init(DefaultSCADomain.java:178)
at org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.<init>(DefaultSCADomain.java:100)
at org.apache.tuscany.sca.host.embedded.SCADomain.createNewInstance(SCADomain.java:182)
at org.apache.tuscany.sca.host.embedded.SCADomain.newInstance(SCADomain.java:63)
at com.corridor.app.ServiceLocator.<init>(ServiceLocator.java:40)
at com.corridor.app.ServiceLocator.<clinit>(ServiceLocator.java:27)
... 46 more
Caused by: java.lang.NullPointerException
at org.apache.tuscany.sca.node.impl.RuntimeBootStrapper.start(RuntimeBootStrapper.java:116)
at org.apache.tuscany.sca.node.impl.NodeImpl.initRuntime(NodeImpl.java:473)
at org.apache.tuscany.sca.node.impl.NodeImpl.<init>(NodeImpl.java:197)
... 53 more
INFO: [ERROR] org.apache.axis2.AxisFault


How can I make these jars visible for my web service?

Thanks
Zoran
13 years ago