Hi all,
I am new to Axis2 and am having some issues trying to figure out how
to make multiple operations work in the same service.
I have the following class
public class GetReport {
.
public OMElement getReport (String authToken,
String reportName,
int fromTime,
int toTime,
String sortColumn) {
.
.
}
public OMElement getRealTimeReport (String authToken) {
.
.
.
}
.
.
}
getRealTimeReport is just a short cut for getReport, basically calls
getReport using some default values.
However, I keep getting the following exception if I use the
getRealTimeReport operation:
java.lang.NullPointerException
org.apache.axis2.description.AxisMessage.getSchemaElement
(AxisMessage.java:109)
org.apache.axis2.transport.http.util.RESTUtil.processGetRequest
(RESTUtil.java:126)
org.apache.axis2.transport.http.AxisRESTServlet.doGet
(AxisRESTServlet.java:36)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
I am using REST style URLs:
http://localhost:8080/logws/rest/GetReport/getRealTimeReport?
authToken=TWP5WYAPU
I get a different exception if I call getReport:
java.lang.NullPointerException
org.apache.axis2.util.SchemaUtil.handleMediaTypeURLEncoded
(SchemaUtil.java:105)
org.apache.axis2.transport.http.util.RESTUtil.processGetRequest
(RESTUtil.java:129)
org.apache.axis2.transport.http.AxisRESTServlet.doGet
(AxisRESTServlet.java:36)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
This all works fine if I have only ONE operation (e.g. get rid of the
getRealTimeReport operation). But every time I try to add another
operation to the service, I get these errors.
My services.xml is very simple:
<service name="GetReport">
<parameter name="ServiceClass"
locked="false">org.abc.test.GetReport</parameter>
<operation name="getReport">
<messageReceiver
class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
</operation>
<operation name="getRealTimeReport">
<messageReceiver
class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
</operation>
</service>
Can anyone tell me what I am doing wrong?
thx very much for your help
--
Jian Zhen <[EMAIL PROTECTED]>
http://www.zhen.org
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]