axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "robert lazarski" <robertlazar...@gmail.com>
Subject Re: Axis2: simple service fails to work
Date Mon, 25 Sep 2006 18:21:52 GMT
What does  http://localhost:7070/axis2/ show ?

Robert

On 9/25/06, D. Kreft <dan@kreft.net> wrote:
> I'm trying to whip-up a bare-bones service that will demonstrate
> Axis2's inability to cope with complex data types returned by service
> methods using RPCMessageReceiver and now I can't even get *that* to
> work (what a way to start off the week). Here's the service
> implementation:
>
> public class TestService {
>     public String[] getArrayOfStrings() {
>         return new String[] {"Hello", "World"};
>     }
>
>     public int getInt() {
>         return 1;
>     }
>
>     public Object getObject() {
>         return new Object();
>     }
>
>     public String getString() {
>         return "Hello World";
>     }
> }
>
> And here's the services.xml:
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
>
> <service name="test">
>     <parameter name="ServiceClass" locked="false">
>         TestService
>     </parameter>
>
>     <operation name="getArrayOfStrings">
>         <messageReceiver
> class="org.apache.axis2.rpc.receivers.RPCMessageReceiver" />
>     </operation>
>
>     <operation name="getInt">
>         <messageReceiver
> class="org.apache.axis2.rpc.receivers.RPCMessageReceiver" />
>     </operation>
>
>     <operation name="getObject">
>         <messageReceiver
> class="org.apache.axis2.rpc.receivers.RPCMessageReceiver" />
>     </operation>
>
>     <operation name="getString">
>         <messageReceiver
> class="org.apache.axis2.rpc.receivers.RPCMessageReceiver" />
>     </operation>
> </service>
>
> And the listing of my .aar file:
>
> % jar -tf test.aar
> META-INF/
> META-INF/MANIFEST.MF
> META-INF/services.xml
> src/
> src/TestService.java
> TestService.class
>
> I started Tomcat (and thus Axis2) from scratch, with only the default
> 'version' service and then used the web admin CGI to upload the
> service. Immediately, I saw the following in the catalina.out:
>
> - Error in schema generating null
> java.lang.NullPointerException
>         at org.apache.ws.java2wsdl.Java2WSDLUtils.namespaceFromClassName(Java2WSDLUtils.java:51)
>         at org.apache.ws.java2wsdl.Java2WSDLUtils.schemaNamespaceFromClassName(Java2WSDLUtils.java:77)
>         at org.apache.ws.java2wsdl.SchemaGenerator.<init>(SchemaGenerator.java:77)
>         at org.apache.axis2.deployment.util.Utils.fillAxisService(Utils.java:209)
>         at org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBuilder.java:149)
>         at org.apache.axis2.deployment.repository.util.ArchiveReader.buildServiceGroup(ArchiveReader.java:76)
>         at org.apache.axis2.deployment.repository.util.ArchiveReader.processServiceGroup(ArchiveReader.java:118)
>         at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:620)
>         at org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:195)
>         at org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:207)
>         at org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:155)
>         at org.apache.axis2.deployment.RepositoryListener.startListener(RepositoryListener.java:199)
>         at org.apache.axis2.deployment.scheduler.SchedulerTask.checkRepositary(SchedulerTask.java:61)
>         at org.apache.axis2.deployment.scheduler.SchedulerTask.run(SchedulerTask.java:68)
>         at org.apache.axis2.deployment.scheduler.Scheduler$SchedulerTimerTask.run(Scheduler.java:76)
>         at java.util.TimerThread.mainLoop(Timer.java:512)
>         at java.util.TimerThread.run(Timer.java:462)
>
> But yet Axis2 is still able to generate a WSDL (which I won't bother to paste).
>
> Calling http://localhost:7070/axis2/services/test/getInt results in a
> "resource not found" error, with no accompanying stack trace or error
> messaging in my catalina.out.
>
> When I try to call getInt() (or any other method, for that matter) via
> a Perl SOAP client, I get the exception pasted below. Can anyone see
> what it is that I'm doing wrong?
>
> -dan
>
> org.apache.axis2.AxisFault: null; nested exception is:
>         java.lang.NullPointerException
>         at org.apache.axis2.AxisFault.makeFault(AxisFault.java:318)
>         at org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:136)
>         at org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.receive(AbstractInOutSyncMessageReceiver.java:37)
>         at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:454)
>         at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:284)
>         at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:136)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
>         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
>         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
>         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
>         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
>         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:526)
>         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
>         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
>         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
>         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
>         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
>         at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
>         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
>         at java.lang.Thread.run(Thread.java:595)
> Caused by: java.lang.NullPointerException
>         at org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:84)
>         ... 21 more
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message