Hi Deepal,
I am using 1.0 and the modified Version service in the examples. Here
are the files: (I can send a separate zip file to you if you like)
--- CUT services.xml ---
<service name="Jian" scope="transportsession">
<description>
This service is to get the running Axis version
</description>
<parameter name="ServiceClass"
locked="false">org.zhen.logbench.Jian</parameter>
<operation name="getVersion">
<messageReceiver
class="org.apache.axis2.rpc.receivers.RPCMessageReceiver" />
</operation>
</service>
--- CUT ---
--- CUT Jian.java ---
package org.zhen.logbench;
import org.apache.axis2.context.ServiceContext;
import org.apache.axis2.context.OperationContext;
import org.apache.axis2.context.MessageContext;
import org.apache.axis2.wsdl.WSDLConstants;
import org.apache.axis2.AxisFault;
public class Jian {
private MessageContext mc;
public void setOperationContext(OperationContext oc) throws
AxisFault {
mc = oc.getMessageContext
(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
}
public String getVersion() throws AxisFault {
return "Hello I am the Jian service ," + " Jian's version is
" + org.apache.axis2.Version.getVersionText() + ", scope = " +
mc.getAxisService().getScope();
}
}
--- CUT ---
The exception I got is
--- CUT exception ---
java.lang.NullPointerException
org.apache.axis2.context.ConfigurationContext.fillServiceContextAndServi
ceGroupContext(ConfigurationContext.java:150)
org.apache.axis2.engine.InstanceDispatcher.invoke
(InstanceDispatcher.java:99)
org.apache.axis2.engine.Phase.invoke(Phase.java:381)
org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:473)
org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:445)
org.apache.axis2.transport.http.util.RESTUtil.invokeAxisEngine
(RESTUtil.java:150)
org.apache.axis2.transport.http.util.RESTUtil.processGetRequest
(RESTUtil.java:138)
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)
--- CUT ---
Any help is much appreciated.
thx
On Jun 12, 2006, at 2:43 AM, Deepal Jayasinghe wrote:
Hi Jian;
Which Axis2 version are you using , is that 1.0 or axis2 current
code base.
If it is current source based you can not just deploy a service in
transport session scope unless you modify axis2.xml. So can you please
check against current code base;
I did the following and did not get any exception;
- I deploy axis2.war in tomcat
- set manageTransportSession parameter to true in axis2.xml
- add scope attribute to version service
- then start tomcat
- go to web app and validate
- I did not get any exception
If you still have the problem please provide a way to regenerate
the issue.
Jian Zhen wrote:
Resending with [axis2] prefix in subject.
Hopefully I am not the only one that has tried "transportsession"
scope?
thx much for any help you can provide
Begin forwarded message:
From: Jian Zhen <[EMAIL PROTECTED]>
Date: June 10, 2006 5:54:16 PM PDT
To: [email protected]
Subject: transportsession examples
Hi,
Does anyone have any source code examples on how to use the
"transportsession" scope?
I tried to make a couple of my services use "transportsession"
scope
and got the following exception:
java.lang.NullPointerException
org.apache.axis2.context.ConfigurationContext.fillServiceContextAndS
er
viceGroupContext(ConfigurationContext.java:150)
org.apache.axis2.engine.InstanceDispatcher.invoke
(InstanceDispatcher.java:99)
org.apache.axis2.engine.Phase.invoke(Phase.java:381)
org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:473)
org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:445)
org.apache.axis2.transport.http.util.RESTUtil.invokeAxisEngine
(RESTUtil.java:150)
org.apache.axis2.transport.http.util.RESTUtil.processGetRequest
(RESTUtil.java:138)
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)
It worked fine if the services are standard "request" scope. Once
I add
scope="transportsession"
to the services.xml, the services are throwing this exception.
Anyone have had luck with using "transportsession" scope?
thx for your help
Jian
--
Jian Zhen <[EMAIL PROTECTED]>
http://www.zhen.org
--
Jian Zhen <[EMAIL PROTECTED]>
http://www.zhen.org
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Thanks,
Deepal
................................................................
~Future is Open~
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Jian Zhen <[EMAIL PROTECTED]>
http://www.zhen.org
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]