----- Original Message -----
Sent: Wednesday, July 20, 2005 12:47
PM
Subject: Re: [Axis2]referring to
parameters
Deepal , This might seem preety lenghty....
Thanks for your Reply
My Module.xml
<module name="IVLoggingModule"
class="com.infravio.loggingmodule.LoggingModule">
<inflow>
<handler
name="InFlowLogHandler"
class="com.infravio.loggingmodule.LogHandler">
<order phase="ivloggingPhase"
/>
<parameter name="mobileNo"
locked="xsd:false">981771771</parameter>
</handler>
</inflow>
<outflow>
<handler
name="OutFlowLogHandler"
class="com.infravio.loggingmodule.LogHandler">
<order
phase="ivloggingPhase"/>
&nb
sp; <parameter name="mobileNo"
locked="xsd:false">981771771</parameter>
</handler>
</outflow>
<Outfaultflow>
<handler
name="FaultOutFlowLogHandler"
class="com.infravio.loggingmodule.LogHandler">
<order
phase="ivloggingPhase"/>
<parameter name="mobileNo"
locked="xsd:false">981771771</parameter>
</handler>
</Outfaultflow>
<INfaultflow>
<handler
name="FaultInFlowLogHandler"
class="com.infravio.loggingmodule.LogHandler">
&
nbsp; <order
phase="ivloggingPhase"/>
<parameter name="mobileNo"
locked="xsd:false">981771771</parameter>
</handler>
</INfaultflow>
</module>
"<parameter name="mobileNo"
locked="xsd:false">981771771</parameter>"
I am trying to access this parameter mobileNo in my Hanlder
using:
String mobilename =
(String) ((AxisConfigurationImpl)
msgContext.getSystemContext().getAxisConfiguration())
.getParameter("mobileNo")
.getValue();
When i hit the service ,
i get the following exception
12:03:27,233 ERROR [AxisEngine] Error
Ocurred
java.lang.NullPointerException
at
com.infravio.loggingmodule.LogHandler.invoke(LogHandler.java:26)
at
org.apache.axis2.engine.Phase.invoke(Phase.java:161)
at
org.apache.axis2.engine.AxisEngine.invokePhases(AxisEngine.java:252)
at
org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:118)
at
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostReq
uest(HTTPTransportUtils.java:102)
at
org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:1
70)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:237)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:157)
at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFi
lter.java:75)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:186)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:157)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:214)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:104)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:520)
at
org.apache.catalina.core.StandardContextValve.invokeInternal(Standard
ContextValve.java:198)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
Line Number 26 is
String mobilename
=
(String) ((AxisConfigurationImpl)
msgContext.getSystemContext().getAxisConfiguration())
.getParameter("mobileNo")
.getValue();
Can u direct me further....
Deepal Jayasinghe <[EMAIL PROTECTED]>
wrote:
Hi Vacky;
You can add parameters to handlers in the same
way , the following code snippet will help you do that
<handler name="logging"
class="org.apache.axis2.sample.handlers.LoggingHandler">
<order phase="userphase1"
phaseFirst="true"/>
<parameter name="ServiceClass"
locked="xsd:false">org.apache.axis2.echo.Echo</parameter>
</handler>
Thanks,
Deepal
................................................................
~Future
is Open~
----- Original Message -----
Sent: Wednesday, July 20, 2005 12:17
PM
Subject: referring to
parameters
Hi,
I am able to access the parameters defined in axis2.xml
<parameter name="name">value</parameter>
through the axis engine config...
axis.getParameter("name");
I need to refer to some parameters (say name) through my handlers for
logging purpose... how am i supposed to do this, handler level parameter
declaration and referral...
Any direction or help would be appriciated...
__________________________________________________
Do You
Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
__________________________________________________
Do You
Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com