Hi Ruchith
thanks - but with -Daxis2.xml=...\conf\axis2.xml I get the same error as before ...

org.apache.axis2.deployment.DeploymentException: Trying to engage a module which is not available : addressing; nested exception is: ...

So the question is why can't the client find the modules when the server can? I guess the problem is that the client doesn't know where the 'repository' is, where it would expect to find modules\*.mar.

But if I try to specify the repository as the first parameter to createConfigurationContextFromFileSystem ..

ConfigurationContext ctx = ConfigurationContextFactory.createConfigurationContextFromFileSystem(
   "C:\\Progra~1\\Apache\\Tomcat5.5\\webapps\\axis2\\WEB-INF",
   "C:\\Progra~1\\Apache\\Tomcat5.5\\webapps\\axis2\\WEB-INF\\conf\\axis2.xml");

then I get
java.lang.NullPointerException
at org.apache.axis2.context.ServiceGroupContext.getServiceContext(ServiceGroupContext.java:59) at org.apache.axis2.client.ServiceClient.<init>(ServiceClient.java:98)
       at org.apache.axis2.PurchasingStub.<init>(Unknown Source)
       at samples.purchasing1.ClientTest.main(Unknown Source)

I also tried adding the 'mar' files directly to the classpath (clutching at straws :-), but that doesn't help.

Cheers
Rob
----- Original Message ----- From: "Ruchith Fernando" <[EMAIL PROTECTED]>
To: <axis-user@ws.apache.org>
Sent: Sunday, April 30, 2006 7:54 AM
Subject: Re: [Axis2] WSS4J - Trying to engage a module which is not available : addressing


Hi Rob,

Can you please try specifying the path to the axis2.xml as shown below:

java ..... -Daxis2.xml=path/to/axis2.xml

Thanks,
Ruchith

On 4/30/06, Rob Henley <[EMAIL PROTECTED]> wrote:
Hi Ruchith
yes, I specify the module in axis2.xml. See below for relevant section of
the axis2.xml.
Cheers
Rob
----- Original Message -----
From: "Ruchith Fernando" <[EMAIL PROTECTED]>
To: <axis-user@ws.apache.org>
Sent: Saturday, April 29, 2006 7:15 AM
Subject: Re: [Axis2] WSS4J - Trying to engage a module which is not
available : addressing


Hi Rob,

Does your axis2.xml has the entry :
<module ref="security" /> . (If you are using RC4 this is <module
ref="aegis" />)

OR

Do you call engageModule() on the ServiceClient instance?

You MUST do either ONE of these to engage the module.

Thanks,
Ruchith

On 4/29/06, Rob Henley <[EMAIL PROTECTED]> wrote:
> Hi Deepal
> I tried your version, but I get an error from the server "Request does > not
> contain required Security header". This suggests to me that the client
> isn't
> using my axis2.xml, which includes:
>
>     <module ref="security"/>
>     <parameter name="InflowSecurity">
>       <action>
>         <items>Timestamp</items>
>       </action>
>     </parameter>
>     <parameter name="OutflowSecurity">
>       <action>
>         <items>Timestamp</items>
>       </action>
>     </parameter>
>
> By replacing the repo directory with null in the call, the client at > least
> appeared to be attempting to use the security module.
>
> Can you think of anything else I could try?
> Many thanks
> Rob
>
> Here is the full exception I get with the parameters you suggest ...
>
> org.apache.axis2.AxisFault: WSDoAllReceiver: Request does not contain
> required Security header
>         at
> 
org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:286)
>         at org.apache.axis2.PurchasingStub.purchaseOrder(Unknown Source)
>         at samples.purchasing1.ClientTest.main(Unknown Source)
> Caused by: java.lang.Exception: org.apache.axis2.AxisFault:
> WSDoAllReceiver:
> Request does not contain required Security header
>         at
> 
org.apache.axis2.security.WSDoAllReceiver.processMessage(WSDoAllReceiver.java:186)
>         at
> 
org.apache.axis2.security.handler.WSDoAllHandler.invoke(WSDoAllHandler.java:82)
>         at org.apache.axis2.engine.Phase.invoke(Phase.java:378)
> at > org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:471) > at > org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:441)
>         at
> 
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:283)
>         at
> org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:130)
>         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.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:868)
>         at
> 
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:663)
>         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(Unknown Source)
>         at org.apache.axis2.AxisFault.<init>(AxisFault.java:159)
>
> ----- Original Message -----
> From: "Deepal Jayasinghe" <[EMAIL PROTECTED]>
> To: <axis-user@ws.apache.org>
> Sent: Friday, April 28, 2006 5:17 PM
> Subject: Re: [Axis2] WSS4J - Trying to engage a module which is not
> available : addressing
>
>
> > Try following
> > ConfigurationContext ctx =
> > 
ConfigurationContextFactory.createConfigurationContextFromFileSystem(C:\\Progra~1\\Apache\\Tomcat5.5\\webapps\\axis2\\WEB-INF",
> >
> > 
"C:\\Progra~1\\Apache\\Tomcat5.5\\webapps\\axis2\\WEB-INF\\conf\\axis2.xml");
> >
> > Rob Henley wrote:
> >
> >> I am having problems getting a client to work with security (RC2
> >> build). My most promising attempt so far is with the following client
> >> code:
> >>
> >> ConfigurationContext ctx =
> >> ConfigurationContextFactory.createConfigurationContextFromFileSystem(null,
> >>
> >> 
"C:\\Progra~1\\Apache\\Tomcat5.5\\webapps\\axis2\\WEB-INF\\conf\\axis2.xml");
> >> PurchasingStub stub = new PurchasingStub(ctx,
> >> "http://localhost:8081/axis2/services/Purchasing";);
> >>
> >> Other combinations of parameters to
> >> createConfigurationContextFromFileSystem() have all resulted in
> >> either 'Request does not contain required Security header' from the
> >> server (implying to me that the client didn't use the specified
> >> axis2.xml) or a NullPointerException.
> >>
> >> With the above code I get:
> >>
> >> org.apache.axis2.deployment.DeploymentException: Trying to engage a
> >> module which is not available :addressing;
> >> nested exception is:
> >>   org.apache.axis2.AxisFault: Trying to engage a module which is not
> >> available : addressing
> >>   at
> >> 
org.apache.axis2.deployment.DeploymentEngine.loadFromClassPath(DeploymentEngine.java:132)
> >>
> >> addressing.mar etc are available in the modules directory and axis2 > >> is
> >> picking these up ok when I start tomcat. The problem is that the
> >> client is not finding the module. This probably means that the client
> >> has (at last :-) found my axis2.xml, so is a step forward. I've tried
> >> adding all the 'mar' files explicitly to the client classpath but > >> this
> >> doesn't seem to help.
> >>
> >> Possibly I need an environment variable? Any idea gratefully > >> received!
> >> Rob
> >>
> >
> >
> > --
> > Thanks,
> > Deepal
> > ................................................................
> > ~Future is Open~
> >
> >
> >
> >
> >
>
>
>









Reply via email to