Hi Bruno
I now have RC2, but the NullPointerException remains. Following advice from Jack I now have:
 
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");
 
System.out.println("configuration repository: " + ctx.getAxisConfiguration().getRepository());
 
PurchasingStub stub = new PurchasingStub(ctx,  "http://localhost:8081/axis2/services/Purchasing");
 
[java] configuration repository: file:/C:/Progra~1/Apache/Tomcat5.5/webapps/axis2/WEB-INF/
[java] java.lang.NullPointerException
[java]     at org.apache.axis2.context.ServiceGroupContext.getServiceContext(ServiceGroupContext.java:59)
[java]     at org.apache.axis2.client.ServiceClient.<init>(ServiceClient.java:98)
[java]     at org.apache.axis2.PurchasingStub.<init>(Unknown Source)
[java]     at samples.purchasing1.ClientTest.main(Unknown Source)
 
Any other ideas how I can persuade my client to look at a specific axis2.xml?
 
Many thanks
Rob
----- Original Message -----
Sent: Wednesday, April 26, 2006 2:46 PM
Subject: RE: Axis2: WSS4J - problem getting client to use my axis2.xml

Hi reobert
 
This problem is solved in axis2RC2 or in latest SVN


De : Rob Henley [mailto:[EMAIL PROTECTED]
Envoyé : mercredi 26 avril 2006 15:08
À : [email protected]
Objet : Axis2: WSS4J - problem getting client to use my axis2.xml

I'm using the 0.95 binary release on Windows XP, plus the separately downloaded security sample.
 
Some stuff appeared to be missing from the distribution. I downloaded security-0.95.mar separately via the 'Modules' link and copied under my axis2\WEB-INF\modules, and also got a copy of xalan.jar.
 
My axis2.xml contains:
 
<module ref="security"/>
 
<parameter name="InflowSecurity">
  <action>
    <items>Timestamp</items>
  </action>
</parameter>
 
<parameter name="OutflowSecurity">
  <action>
    <items>Timestamp</items>
  </action>
</parameter>
 
My service is starting ok, but I don't think my client is picking up the security settings. My client code is attempting to pick up the same axis2.xml which my server uses ...
 
  ConfigurationContext ctx = ConfigurationContextFactory.createConfigurationContextFromFileSystem(X, Y); // see below
  PurchasingStub stub = new PurchasingStub(ctx, "http://localhost:8081/axis2/services/Purchasing");  // stub generated from WSDL
 
I've tried various combinations for (X, Y) above. (I looked at the javadocs, but still couldn't be sure what this should look like exactly). Here's what I tried, followed by the various errors I received at runtime:
 
(null, null)
 
     [java] org.apache.axis2.AxisFault: org.apache.axis2.AxisFault: WSDoAllReceiver: Request does not contain required Security header
     [java]     at org.apache.axis2.security.WSDoAllReceiver.invoke(WSDoAllReceiver.java:187)
     [java]     at org.apache.axis2.engine.Phase.invoke(Phase.java:378)
 
ok - that probably isn't surprising. I'm not sure how the client would find the repository if I don't tell it where to look.
 
("C:/Program Files/Apache/Tomcat5.5/webapps/axis2/WEB-INF", "axis2.xml");
("C:\\Program Files\\Apache\\Tomcat5.5\\webapps\\axis2\\WEB-INF", "axis2.xml");
("C:/progra~1/Apache/Tomcat5.5/webapps/axis2/WEB-INF", "axis2.xml");
 
     [java] org.apache.axis2.deployment.DeploymentException: axis2.xml (The system cannot find the file specified); nested exception is:
     [java]     java.io.FileNotFoundException: axis2.xml (The system cannot find the file specified)
     [java]     at org.apache.axis2.deployment.DeploymentEngine.load(DeploymentEngine.java:550)
 
I also tried prefxing axis2.xml with 'conf/', with the same result. (The javadoc suggests this wouldn't be valid anyway).

("C:/Program Files/Apache/Tomcat5.5/webapps/axis2/WEB-INF", null);

     [java] java.lang.NullPointerException
     [java]     at org.apache.axis2.context.ServiceGroupContext.getServiceContext(ServiceGroupContext.java:59)
     [java]     at org.apache.axis2.client.ServiceClient.<init>(ServiceClient.java:97)
     [java]     at org.apache.axis2.PurchasingStub.<init>(Unknown Source)
     [java]     at samples.purchasing1.ClientTest.main(Unknown Source)
 
Has anyone seen a similar problem or have an idea how I can make progress?
Many thanks
Rob

---------------------------------------------------------------------------------------
Wanadoo vous informe que cet e-mail a ete controle par l'anti-virus mail.
Aucun virus connu a ce jour par nos services n'a ete detecte.


Reply via email to