[Axis2 1.0] SGCCalculator sample

2006-05-10 Thread Rob Henley



Hi - I seem to get a couple of errors with the 
SGCCalculator:
1. out-of-the-box I get a 'log4j not properly 
initialised' error. I 'fxied' this by modifying the supplied client to turn off 
logging for the moment.
2. more seriously i get a 'module not found' when 
the client tries to engage the addressing module (trace below)

 [java] Exception in thread 
"main" org.apache.axis2.AxisFault: Module not found 
[java] at 
org.apache.axis2.description.AxisService.engageModule(AxisService.java:395) 
[java] at 
org.apache.axis2.client.ServiceClient.engageModule(ServiceClient.java:279) 
[java] at sample.sgccalculator.CalcClient.main(Unknown 
Source)

A few questions:

i) should this sample work out of the box? If so, 
how does the client know where to find the module? (My understanding is that it 
would need to get the location of a 'repository' from somewhere?)
ii) is there any help on these samples - e.g. what 
they do, which data bindings they exercise etc.
iii) which ones have people got to work :-)

Many thanks
Rob


Re: axis-wsdl2java task problem

2006-05-10 Thread Rob Henley

Hi James
I'm not an expert, but I had a similar problem. I generated a server 
skeleton using java2wsdl and then added my implementation code, but of 
course next time I run java2wsdl it is overwritten. I have a directory 
structure something like:


axis2
  samples
 mySample ... MySkeleton.java
 src
org.apache.axis2 ... MySkeleton.java

I keep all my own code in the 'parent' directory (e.g. mySample), so first 
time around after running wsdl2java I moved the generated skeleton to this 
top level. Subsequently if i regenerate the code I just delete or rename the 
newly-generated skeleton (its a good idea to check it still has the same 
'interface' as your 'original'). When you build it doesn't seem to matter 
whether the file is in a subdirectory corresponding to its package name or 
not, so this seems like a simple way to keep your generated code separate 
from the stuff you've modified.


Cheers
Rob



- Original Message - 
From: James Armstrong [EMAIL PROTECTED]

To: axis-user@ws.apache.org
Sent: Wednesday, May 10, 2006 4:51 PM
Subject: re: axis-wsdl2java task problem



Hi,
I am using Axis wsdl2java to autogenerate needed stubs to that I can
deploy my web service using axis-admin task. The wsdl2java keeps on
over-writing my java source that java2wsdl used to generate the wsdl. Can 
I

tell it not to do that?!

Here is my axis-wsdl2java target:

target name=wsdl2java depends=java2wsdl description=Generates
a SOAP stubs.
mkdir dir=my source root/ !-- when I point output at
my original source root wsdl2java overwrites my java source--
axis-wsdl2java output=my source root
serverside=${serverside} url=${wsdl.file} deployscope=${deployscope}
helpergen=${helpergen} debug=true all=${all}/
echo message=wsdl2java has finished/
custom-modifyWsdd wsddaction=${wsdd}
wscodebehind=${classname}/
echo message=modifyWsdd has been completed./
/target

Here are my property definitions:

property name=url value=${wsdl.file} description=The URL to fetch 
and

generate the WSDL for. The URL can be remote or a local file./
property name=deployscope value=Application description=This
optional attribute adds scope to deploy.xml. The options are Application,
Request, Session./
property name=serverside value=true description=Generate
server-side bindings for the web service. The default is false./
property name=helpergen value=true description=Turns Helper
class generation on or off. The default is false./
property name=all value=true description=Generates code for
all elements, even unreferenced ones. The default is false/
property name=output value=${autogenerated.src}
description=The output directory for generated files./
property name=target.build.jar.name value=ecweb.jar/

Problem: Axis overwrites my java source with autogenerated code. Is there
anyway around this?
james










Re: [Axis2 1.0] SGCCalculator sample

2006-05-10 Thread Rob Henley

Hi Eran
excellent - actually i had read it, but I'd forgotten :-(. I've got this 
working in 2 ways:


1. (as described in http://ws.apache.org/axis2/1_0/userguide3.html), by 
setting ConfigurationContext.

2. by setting -Daxis2.repo on the java command line

BUT the above page also says .. There are two ways of (engaging addressing 
for the Client). One is to get the addressing-version.mar from modules 
folder of the std-bin distribution. And then making that available in your 
classpath.


I added addressing-1.0.mar to the classpath I supply on the java command 
line and it doesn't help. I guess I'm missing something?


I also had to edit the supplied client to give the full (versioned) name of 
the module, i.e.


serviceClient.engageModule(new QName(addressing-1.0));

I'm not sure this is explained anywhere (?). All good stuff though ... 
thanks again!

Rob

- Original Message - 
From: Eran Chinthaka [EMAIL PROTECTED]

To: axis-user@ws.apache.org
Sent: Wednesday, May 10, 2006 5:17 PM
Subject: Re: [Axis2 1.0] SGCCalculator sample





[Axis2 1.0] deployment problem?

2006-05-08 Thread Rob Henley



I have a simple doc-literal WSDL from which I 
generate client stub and server code using the xmlbeans data binding. I complete 
the skeleton and write a client 'main'. I then buildand deploy an aar to 
Axis2 under tomcat.

In 0.94, 0.95 and RC2 this was working fine, but 
in 1.0 when I run the client I get an error from 
the server, which includes ...

 org.apache.axis2.AxisFault: Transport error 
500 . Error Message is ...
 The server encountered an 
internal error () that prevented it from fulfilling this request.
 
javax.servlet.ServletException: Servlet execution threw an 
exception
 
... broot cause/b 
prejava.lang.NoClassDefFoundError: 
samples/purchasing1/PurchaseOrderDocument

In the axis2 services 
directory,purchasing1.aar does include 
samples\purchasing1\PurchaseOrderDocument.class. Also, the Services view http://localhost:8080/axis2/services/listServicesshows 
me my Purchasing service with a status of Active and an available operation 
purchaseOrder.

Any ideas what has changed in 1.0 and how I can 
find out why my service no longer sees my PurchaseOrderDocument 
class?

My aar contains the file meta-inf\services.xml as 
follows ...

!-- This file was auto-generated from WSDL 
--!-- by the Apache Axis2 version: #axisVersion# #today# 
--serviceGroupservice 
name="Purchasing"messageReceiversmessageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out" 
class="org.apache.axis2.PurchasingMessageReceiverInOut"//messageReceiversparameter 
name="ServiceClass" 
locked="false"org.apache.axis2.PurchasingSkeleton/parameteroperation 
name="purchaseOrder" mep="http://www.w3.org/2004/08/wsdl/in-out"actionMapping/actionMapping/operation/service/serviceGroup

Many thanks!
Rob


Re: [Axis2 1.0] deployment problem?

2006-05-08 Thread Rob Henley

Thanks Ajith
yes, I do have all those. When the errors says it can't find my 
PurchaseOrderDocument class, are you saying this might really mean it can't 
find some other class which this depends on?


I did find one problem though. I was using my existing 
ServiceSkeleton.java and I hadn't noticed that the generated one now 
implements an interface. In my case this now looks like this ...


public class PurchasingSkeleton implements PurchasingSkeletonInterface{

When I add the 'implements' clause, I now get a Data binding error from 
the server at runtime - but the error message doesn't give any details.


I'm going to try the default adb data binding instead. It didn't work in 
0.94 but I'm hoping it is better now - I noticed there are a couple of 
restrictions in the release notes, but my example is very simple.


Cheers
Rob
- Original Message - 
From: Ajith Ranabahu [EMAIL PROTECTED]

To: axis-user@ws.apache.org
Sent: Monday, May 08, 2006 1:55 PM
Subject: Re: [Axis2 1.0] deployment problem?


Hi Rob,
do you have all the XMLBeans generated classes in your aar file ? I
mean all these files with the .xsb extension and all ?

On 5/8/06, Rob Henley [EMAIL PROTECTED] wrote:


I have a simple doc-literal WSDL from which I generate client stub and
server code using the xmlbeans data binding. I complete the skeleton and
write a client 'main'. I then build and deploy an aar to Axis2 under 
tomcat.


In 0.94, 0.95 and RC2 this was working fine, but in 1.0 when I run the
client I get an error from the server, which includes ...

  org.apache.axis2.AxisFault: Transport error 500 . Error Message is ...
The server encountered an internal error () that prevented it from
fulfilling this request.
   javax.servlet.ServletException: Servlet execution threw an 
exception

  ... broot cause/b prejava.lang.NoClassDefFoundError:
samples/purchasing1/PurchaseOrderDocument

In the axis2 services directory,  purchasing1.aar does include
samples\purchasing1\PurchaseOrderDocument.class. Also, the
Services view
http://localhost:8080/axis2/services/listServices shows me
my Purchasing service with a status of Active and an available operation
purchaseOrder.

Any ideas what has changed in 1.0 and how I can find out why my service no
longer sees my PurchaseOrderDocument class?

My aar contains the file meta-inf\services.xml as follows ...

!-- This file was auto-generated from WSDL --
!-- by the Apache Axis2 version: #axisVersion# #today# --
serviceGroup
service name=Purchasing
messageReceivers
messageReceiver
mep=http://www.w3.org/2004/08/wsdl/in-out;
class=org.apache.axis2.PurchasingMessageReceiverInOut/
/messageReceivers
parameter name=ServiceClass
locked=falseorg.apache.axis2.PurchasingSkeleton/parameter
operation name=purchaseOrder
mep=http://www.w3.org/2004/08/wsdl/in-out;
actionMapping/actionMapping
/operation
/service
/serviceGroup

Many thanks!

Rob



--
Ajith Ranabahu






Re: [Axis2 1.0] deployment problem?

2006-05-08 Thread Rob Henley
: [Axis2 1.0] deployment problem?


Hmm..
Are you sure tha you are using the 1.0 jars ? We had the interface
generation as the default for a very short time in the SVN and ten
switched back to the older no-interface mode as the default. So
unless you specify the -ssi flag no interface will be generated!

Here is a suggession. Codegen from scratch from the latest jars and
implement the skeleton. use the generated build file to generate the
aar file. I have a feeling that there is a mix of old and new classes
in your aar which may be the problem

Ajith



On 5/8/06, Rob Henley [EMAIL PROTECTED] wrote:

Thanks Ajith
yes, I do have all those. When the errors says it can't find my
PurchaseOrderDocument class, are you saying this might really mean it 
can't

find some other class which this depends on?

I did find one problem though. I was using my existing
ServiceSkeleton.java and I hadn't noticed that the generated one now
implements an interface. In my case this now looks like this ...

public class PurchasingSkeleton implements PurchasingSkeletonInterface{

When I add the 'implements' clause, I now get a Data binding error from
the server at runtime - but the error message doesn't give any details.

I'm going to try the default adb data binding instead. It didn't work in
0.94 but I'm hoping it is better now - I noticed there are a couple of
restrictions in the release notes, but my example is very simple.

Cheers
Rob
- Original Message -
From: Ajith Ranabahu [EMAIL PROTECTED]
To: axis-user@ws.apache.org
Sent: Monday, May 08, 2006 1:55 PM
Subject: Re: [Axis2 1.0] deployment problem?


Hi Rob,
do you have all the XMLBeans generated classes in your aar file ? I
mean all these files with the .xsb extension and all ?

On 5/8/06, Rob Henley [EMAIL PROTECTED] wrote:

 I have a simple doc-literal WSDL from which I generate client stub and
 server code using the xmlbeans data binding. I complete the skeleton and
 write a client 'main'. I then build and deploy an aar to Axis2 under
 tomcat.

 In 0.94, 0.95 and RC2 this was working fine, but in 1.0 when I run the
 client I get an error from the server, which includes ...

   org.apache.axis2.AxisFault: Transport error 500 . Error Message is ...
 The server encountered an internal error () that prevented it from
 fulfilling this request.
javax.servlet.ServletException: Servlet execution threw an
 exception
   ... broot cause/b prejava.lang.NoClassDefFoundError:
 samples/purchasing1/PurchaseOrderDocument

 In the axis2 services directory,  purchasing1.aar does include
 samples\purchasing1\PurchaseOrderDocument.class. Also, the
 Services view
 http://localhost:8080/axis2/services/listServices shows me
 my Purchasing service with a status of Active and an available operation
 purchaseOrder.

 Any ideas what has changed in 1.0 and how I can find out why my service 
 no

 longer sees my PurchaseOrderDocument class?

 My aar contains the file meta-inf\services.xml as follows ...

 !-- This file was auto-generated from WSDL --
 !-- by the Apache Axis2 version: #axisVersion# #today# --
 serviceGroup
 service name=Purchasing
 messageReceivers
 messageReceiver
 mep=http://www.w3.org/2004/08/wsdl/in-out;
 class=org.apache.axis2.PurchasingMessageReceiverInOut/
 /messageReceivers
 parameter name=ServiceClass
 locked=falseorg.apache.axis2.PurchasingSkeleton/parameter
 operation name=purchaseOrder
 mep=http://www.w3.org/2004/08/wsdl/in-out;
 actionMapping/actionMapping
 /operation
 /service
 /serviceGroup

 Many thanks!

 Rob


--
Ajith Ranabahu








--
Ajith Ranabahu






Fw: [Axis2] WSS4J - Trying to engage a module which is not available : addressing

2006-05-03 Thread Rob Henley

Hi guys
I've been trying for a while now to get the security module to work (either 
using my own code or the security sample). I was encouraged when I was told 
that 0.95 had a known problem which was addressed in RC2, but I get the same 
problem(s) in RC2 (described below). I'm currently using:


axis2.war, std-bin from and http://people.apache.org/~deepal/axis2/1.0-RC2/
security, addressing modules from 
http://people.apache.org/~deepal/maven/ws/axis2/mars/


I have a (working) client and server, generated from WSDL. These work fine 
without security.


I'm pretty sure the client sees the correct axis2.xml (where the security 
module is engaged and the required security settings are specified). I can 
do this either by specifying -Daxis2.xml=... on the java command line or by 
supplying the axis2.xml path as the 2nd parameter to 
createConfigurationContextFromFileSystem in the client source.


I think my problem is that the client is not finding a 'repository'.

If I don't specify a repository I get the Trying to engage a module ... 
errors, which seems reasonable since I haven't told the client where to 
look.


If I specify the repository as the 1st parameter to 
createConfigurationContextFromFileSystem then I get a NullPointerException

from ServiceGroupContext.getServiceContext(ServiceGroupContext.java:59)

On the face of it this looks like a bug in Axis2. Can anyone tell me:
- have I missed something (e.g. did I get the security module from the wrong 
place? Am I missing some environment settings?)

- how I might get any more information about the cause of the problem
- whether I should try RC4
- if anyone could send me any simple client code which works for them?

Many thanks
Rob
- Original Message - 
From: Rob Henley [EMAIL PROTECTED]

To: axis-user@ws.apache.org
Sent: Sunday, April 30, 2006 9:33 PM
Subject: Re: [Axis2] WSS4J - Trying to engage a module which is not 
available : addressing




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
 itemsTimestamp/items
   /action
 /parameter
 parameter name=OutflowSecurity
   action
 itemsTimestamp/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

Re: [Axis2] WSS4J - Trying to engage a module which is not available : addressing

2006-04-30 Thread Rob Henley

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
 itemsTimestamp/items
   /action
 /parameter
 parameter name=OutflowSecurity
   action
 itemsTimestamp/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

Re: [Axis2] WSS4J - Trying to engage a module which is not available : addressing

2006-04-29 Thread Rob Henley

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
itemsTimestamp/items
  /action
/parameter
parameter name=OutflowSecurity
  action
itemsTimestamp/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

Re: [Axis2]: ws.commons.om.OMException missing from RC2?

2006-04-28 Thread Rob Henley

Hi Ruchith
sorry - I didn't mean to imply I was using the 0.95 jars. As far as I know 
I'm only using the RC2 jars. With these I get file not found for 
OMException. I observed that this class appeared to have been present in the 
0.95 axiom-api jar but not in the corresponding RC2 jar.


I am using the std-bin and axis2.war from the first of the links which Bruno 
kindly sent me below. Should I also be downloading the 'jars' link?

Download locations :

* binary and source distributions -

http://people.apache.org/~deepal/axis2/

* jars

http://people.apache.org/~deepal/maven/ws/axis2/jars/

* mars (addressing and security)

http://people.apache.org/~deepal/maven/ws/axis2/mars/

Cheers
Rob
- Original Message - 
From: Ruchith Fernando [EMAIL PROTECTED]

To: axis-user@ws.apache.org
Sent: Friday, April 28, 2006 12:25 PM
Subject: Re: [Axis2]: ws.commons.om.OMException missing from RC2?


Hi Rob,

You cannot use the 0.95 jar/mars with RC stuff.
Please try all the jars/mars from the latest RC and the axiom-*.jars
from that particular RC.

Thanks,
Ruchith

On 4/28/06, Rob Henley [EMAIL PROTECTED] wrote:


Hi there
trying to work around a problem with WSS4J I picked up the RC2 binaries. I
now get a FileNotFound for:

org/apache/ws/commons/om/OMException

Looks like this used to be in axiom-api-0.95.jar but is not in
axiom-api-1.0-RC2.jar.

Has anyone else seen this problem?
Cheers

Rob







Re: [Axis2]: ws.commons.om.OMException missing from RC2?

2006-04-28 Thread Rob Henley

Hi Ruchith
fixed - I had an old addressing.mar lying around!
Many thanks
Rob
- Original Message - 
From: Ruchith Fernando [EMAIL PROTECTED]

To: axis-user@ws.apache.org
Sent: Friday, April 28, 2006 12:25 PM
Subject: Re: [Axis2]: ws.commons.om.OMException missing from RC2?


Hi Rob,

You cannot use the 0.95 jar/mars with RC stuff.
Please try all the jars/mars from the latest RC and the axiom-*.jars
from that particular RC.

Thanks,
Ruchith

On 4/28/06, Rob Henley [EMAIL PROTECTED] wrote:


Hi there
trying to work around a problem with WSS4J I picked up the RC2 binaries. I
now get a FileNotFound for:

org/apache/ws/commons/om/OMException

Looks like this used to be in axiom-api-0.95.jar but is not in
axiom-api-1.0-RC2.jar.

Has anyone else seen this problem?
Cheers

Rob







Re: Axis2: WSS4J - problem getting client to use my axis2.xml

2006-04-28 Thread Rob Henley



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 - 
  From: 
  bruno 
  (wanadoo) 
  To: axis-user@ws.apache.org 
  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À: axis-user@ws.apache.orgObjet: 
  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 
  itemsTimestamp/items 
  /action/parameter
  
  parameter 
  name="OutflowSecurity" action 
  itemsTimestamp/items 
  /action/parameter
  
  
  My service is starting ok, but I don't think my 
  client is picking up the securitysettings. 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
  

Re: [Axis2] WSS4J - Trying to engage a module which is not available : addressing

2006-04-28 Thread Rob Henley

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
   itemsTimestamp/items
 /action
   /parameter
   parameter name=OutflowSecurity
 action
   itemsTimestamp/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

Axis2: WSS4J - problem getting client to use my axis2.xml

2006-04-26 Thread Rob Henley



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 
itemsTimestamp/items 
/action/parameter

parameter name="OutflowSecurity" 
action 
itemsTimestamp/items 
/action/parameter


My service is starting ok, but I don't think my 
client is picking up the securitysettings. 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


Re: Axis2: WSS4J - problem getting client to use my axis2.xml

2006-04-26 Thread Rob Henley



Thanks - thats useful. Is 'axis2RC2' a binary 
distribution which I can download?
Cheers
Rob

  - Original Message - 
  From: 
  bruno 
  (wanadoo) 
  To: axis-user@ws.apache.org 
  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À: axis-user@ws.apache.orgObjet: 
  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 
  itemsTimestamp/items 
  /action/parameter
  
  parameter 
  name="OutflowSecurity" action 
  itemsTimestamp/items 
  /action/parameter
  
  
  My service is starting ok, but I don't think my 
  client is picking up the securitysettings. 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
  

Re: Axis2: WSS4J - problem getting client to use my axis2.xml

2006-04-26 Thread Rob Henley
Hi Jack - I read that too but it never occurred to me to repeat the whole 
path. When I do this I get the 'nullpointer' error, so as bruno says there 
is probably also an axis2 bug in the 0.95 release. Hopefully with your 
syntax and a later build it will all work :-)

Many thanks
Rob
- Original Message - 
From: Jack [EMAIL PROTECTED]

To: axis-user@ws.apache.org
Sent: Wednesday, April 26, 2006 2:40 PM
Subject: Re: Axis2: WSS4J - problem getting client to use my axis2.xml


I think you need to do this javadoc says you are not allowed to give
one relative to other so:

String X = 
E:\\jboss-4.0.3SP1\\server\\axistest\\deploy\\axis2.war\\WEB-INF;
String Y = 
E:\\jboss-4.0.3SP1\\server\\axistest\\deploy\\axis2.war\\WEB-INF\\conf\\axis2.xml;

   configContext =
ConfigurationContextFactory.createConfigurationContextFromFileSystem(X,
Y);


Cheers
Jack...


On 26/04/06, Rob Henley [EMAIL PROTECTED] wrote:


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
itemsTimestamp/items
  /action
/parameter

parameter name=OutflowSecurity
  action
itemsTimestamp/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



--
Cheers
Jack...

The claim natural is not synonymous with safe.






Re: [Axis2] - 0.95 - Couldn't get security sample to work

2006-03-23 Thread Rob Henley

Hi Ajith
I think this is the complete list below. I just saw another post suggesting 
that a firewall could be the problem, so I'll try with this turned off. 
(hope there are no hackers reading this mail list :-)

Cheers
Rob

   [junit] [ERROR] TEST 
org.apache.axis2.security.AddressingMTOMSecurityTest FAILED

   [junit] Running org.apache.axis2.security.MTOMOptimizedSecurityTest
   [junit] Tests run: 2, Failures: 2, Errors: 0, Time elapsed: 6.77 sec
   [junit] [ERROR] TEST org.apache.axis2.security.MTOMOptimizedSecurityTest 
FAILED

   [junit] Running org.apache.axis2.security.Scenario1Test
   [junit] Tests run: 2, Failures: 2, Errors: 0, Time elapsed: 6.729 sec
   [junit] [ERROR] TEST org.apache.axis2.security.Scenario1Test FAILED
   [junit] Running org.apache.axis2.security.Scenario2aTest
   [junit] Tests run: 2, Failures: 2, Errors: 0, Time elapsed: 6.63 sec
   [junit] [ERROR] TEST org.apache.axis2.security.Scenario2aTest FAILED
   [junit] Running org.apache.axis2.security.Scenario2Test
   [junit] Tests run: 2, Failures: 2, Errors: 0, Time elapsed: 6.639 sec
   [junit] [ERROR] TEST org.apache.axis2.security.Scenario2Test FAILED
   [junit] Running org.apache.axis2.security.Scenario3Test
   [junit] Tests run: 2, Failures: 2, Errors: 0, Time elapsed: 6.67 sec
   [junit] [ERROR] TEST org.apache.axis2.security.Scenario3Test FAILED
   [junit] Running org.apache.axis2.security.Scenario4Test
   [junit] Tests run: 2, Failures: 2, Errors: 0, Time elapsed: 6.61 sec
   [junit] [ERROR] TEST org.apache.axis2.security.Scenario4Test FAILED
   [junit] Running org.apache.axis2.security.Scenario5Test
   [junit] Tests run: 2, Failures: 2, Errors: 0, Time elapsed: 6.559 sec
   [junit] [ERROR] TEST org.apache.axis2.security.Scenario5Test FAILED
   [junit] Running org.apache.axis2.security.Scenario6Test
   [junit] Tests run: 2, Failures: 2, Errors: 0, Time elapsed: 6.549 sec
   [junit] [ERROR] TEST org.apache.axis2.security.Scenario6Test FAILED
   [junit] Running org.apache.axis2.security.Scenario7Test
   [junit] Tests run: 2, Failures: 2, Errors: 0, Time elapsed: 6.62 sec
   [junit] [ERROR] TEST org.apache.axis2.security.Scenario7Test FAILED
   [junit] Running org.apache.axis2.swa.EchoRawSwATest
- Original Message - 
From: Ajith Ranabahu [EMAIL PROTECTED]

To: axis-user@ws.apache.org
Sent: Thursday, March 23, 2006 12:12 PM
Subject: Re: [Axis2] - 0.95 - Couldn't get security sample to work



Hi Rob,
What are the tests that are failing ?

On 3/23/06, Rob Henley [EMAIL PROTECTED] wrote:


Again, very similar for me! Today svn update appeared to work 
successully.

I tried 'maven dist-std-bin', then (when I saw the followup mail) 'maven
clean jar'. In both cases I got a number of test failures followed by the
same final message I got yesterday:

BUILD FAILED
File.. C:\Documents and
Settings\rhenley\.maven\cache\maven-multiproject-plugin-1.3.1\plugin.jelly
Element... maven:reactor
Line.. 217
Column 9
Unable to obtain goal [multiproject:install-callback] -- C:\Documents and
Settings\rhenley\.maven\cache\maven-test-plugin-1.6.2\plugin.jelly:181:54:
fail There were test failures.

This is with JDK 1.5 and today's SVN.

Cheers

Rob



- Original Message -
From: Ali Sadik Kumlali
To: axis-user@ws.apache.org

Sent: Thursday, March 23, 2006 11:42 AM
Subject: Re: [Axis2] - 0.95 - Couldn't get security sample to work

Again quick answer! Thank you Ruchith. When I ran maven clean jar, I 
got

the following error. I had the same error yesterday.

Thanks a lot,

Ali Sadik Kumlali

---
...
is2_java\modules\integration\test-resources\SOAP12Testing\SOAP12TestServiceC\bui
ld\classes
[copy] Copying 1 file to
D:\mydocuments\programming\java\mywork\axis2_java\m
odules\integration\test-resources\SOAP12Testing\SOAP12TestServiceC\build\classes
\META-INF
[jar] Building jar:
D:\mydocuments\programming\java\mywork\axis2_java\module
s\integration\target\Repository\services\SOAP12TestServiceC.jar
[delete] Deleting directory
D:\mydocuments\programming\java\mywork\axis2_jav
a\modules\integration\test-resources\SOAP12Testing\SOAP12TestServiceC\build

test:test:
[junit] Running org.apache.axis2.async.AsyncServiceTest
[junit] Tests run: 1, Failures: 0, Errors: 1, Time e lapsed: 1,781 
sec

[junit] [ERROR] Test
org.apache.axis2.async.AsyncServiceTest FAILED
[junit] Running
org.apache.axis2.engine.AxisServiceBuilderTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 1,297 sec
[junit] Running
org.apache.axis2.engine.CallUnregisteredServiceTest
[junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 2,078 sec
[junit] [ERROR] Test
org.apache.axis2.engine.CallUnregisteredServiceTe st FAI
LED
[junit] Running
org.apache.axis2.engine.CharactersetEncodingTest
[junit] Tests run: 11, Failures: 0, Errors: 11, Time elapsed: 1,891 
sec

[junit] [ERROR] Test
org.apache.axis2.engine.CharactersetEncodingTest FAILED

[junit] Running

Re: [Axis2] - 0.95 - Couldn't get security sample to work

2006-03-23 Thread Rob Henley

Turning off the firewall made no difference (for me).
Cheers
Rob
- Original Message - 
From: Rob Henley [EMAIL PROTECTED]

To: axis-user@ws.apache.org
Sent: Thursday, March 23, 2006 12:49 PM
Subject: Re: [Axis2] - 0.95 - Couldn't get security sample to work



Hi Ajith
I think this is the complete list below. I just saw another post 
suggesting that a firewall could be the problem, so I'll try with this 
turned off. (hope there are no hackers reading this mail list :-)

Cheers
Rob

   [junit] [ERROR] TEST 
org.apache.axis2.security.AddressingMTOMSecurityTest FAILED

   [junit] Running org.apache.axis2.security.MTOMOptimizedSecurityTest
   [junit] Tests run: 2, Failures: 2, Errors: 0, Time elapsed: 6.77 sec
   [junit] [ERROR] TEST 
org.apache.axis2.security.MTOMOptimizedSecurityTest FAILED

   [junit] Running org.apache.axis2.security.Scenario1Test
   [junit] Tests run: 2, Failures: 2, Errors: 0, Time elapsed: 6.729 sec
   [junit] [ERROR] TEST org.apache.axis2.security.Scenario1Test FAILED
   [junit] Running org.apache.axis2.security.Scenario2aTest
   [junit] Tests run: 2, Failures: 2, Errors: 0, Time elapsed: 6.63 sec
   [junit] [ERROR] TEST org.apache.axis2.security.Scenario2aTest FAILED
   [junit] Running org.apache.axis2.security.Scenario2Test
   [junit] Tests run: 2, Failures: 2, Errors: 0, Time elapsed: 6.639 sec
   [junit] [ERROR] TEST org.apache.axis2.security.Scenario2Test FAILED
   [junit] Running org.apache.axis2.security.Scenario3Test
   [junit] Tests run: 2, Failures: 2, Errors: 0, Time elapsed: 6.67 sec
   [junit] [ERROR] TEST org.apache.axis2.security.Scenario3Test FAILED
   [junit] Running org.apache.axis2.security.Scenario4Test
   [junit] Tests run: 2, Failures: 2, Errors: 0, Time elapsed: 6.61 sec
   [junit] [ERROR] TEST org.apache.axis2.security.Scenario4Test FAILED
   [junit] Running org.apache.axis2.security.Scenario5Test
   [junit] Tests run: 2, Failures: 2, Errors: 0, Time elapsed: 6.559 sec
   [junit] [ERROR] TEST org.apache.axis2.security.Scenario5Test FAILED
   [junit] Running org.apache.axis2.security.Scenario6Test
   [junit] Tests run: 2, Failures: 2, Errors: 0, Time elapsed: 6.549 sec
   [junit] [ERROR] TEST org.apache.axis2.security.Scenario6Test FAILED
   [junit] Running org.apache.axis2.security.Scenario7Test
   [junit] Tests run: 2, Failures: 2, Errors: 0, Time elapsed: 6.62 sec
   [junit] [ERROR] TEST org.apache.axis2.security.Scenario7Test FAILED
   [junit] Running org.apache.axis2.swa.EchoRawSwATest
- Original Message - 
From: Ajith Ranabahu [EMAIL PROTECTED]

To: axis-user@ws.apache.org
Sent: Thursday, March 23, 2006 12:12 PM
Subject: Re: [Axis2] - 0.95 - Couldn't get security sample to work



Hi Rob,
What are the tests that are failing ?

On 3/23/06, Rob Henley [EMAIL PROTECTED] wrote:


Again, very similar for me! Today svn update appeared to work 
successully.

I tried 'maven dist-std-bin', then (when I saw the followup mail) 'maven
clean jar'. In both cases I got a number of test failures followed by 
the

same final message I got yesterday:

BUILD FAILED
File.. C:\Documents and
Settings\rhenley\.maven\cache\maven-multiproject-plugin-1.3.1\plugin.jelly
Element... maven:reactor
Line.. 217
Column 9
Unable to obtain goal [multiproject:install-callback] -- C:\Documents 
and

Settings\rhenley\.maven\cache\maven-test-plugin-1.6.2\plugin.jelly:181:54:
fail There were test failures.

This is with JDK 1.5 and today's SVN.

Cheers

Rob



- Original Message -
From: Ali Sadik Kumlali
To: axis-user@ws.apache.org

Sent: Thursday, March 23, 2006 11:42 AM
Subject: Re: [Axis2] - 0.95 - Couldn't get security sample to work

Again quick answer! Thank you Ruchith. When I ran maven clean jar, I 
got

the following error. I had the same error yesterday.

Thanks a lot,

Ali Sadik Kumlali

---
...
is2_java\modules\integration\test-resources\SOAP12Testing\SOAP12TestServiceC\bui
ld\classes
[copy] Copying 1 file to
D:\mydocuments\programming\java\mywork\axis2_java\m
odules\integration\test-resources\SOAP12Testing\SOAP12TestServiceC\build\classes
\META-INF
[jar] Building jar:
D:\mydocuments\programming\java\mywork\axis2_java\module
s\integration\target\Repository\services\SOAP12TestServiceC.jar
[delete] Deleting directory
D:\mydocuments\programming\java\mywork\axis2_jav
a\modules\integration\test-resources\SOAP12Testing\SOAP12TestServiceC\build

test:test:
[junit] Running org.apache.axis2.async.AsyncServiceTest
[junit] Tests run: 1, Failures: 0, Errors: 1, Time e lapsed: 1,781 
sec

[junit] [ERROR] Test
org.apache.axis2.async.AsyncServiceTest FAILED
[junit] Running
org.apache.axis2.engine.AxisServiceBuilderTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 1,297 
sec

[junit] Running
org.apache.axis2.engine.CallUnregisteredServiceTest
[junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 2,078 
sec

[junit] [ERROR] Test
org.apache.axis2

Re: [Axis2] wss4j

2006-03-22 Thread Rob Henley

Tried to build SVN yesterday, but hit this problem:

BUILD FAILED
File.. C:\Documents and 
Settings\rhenley\.maven\cache\maven-multiproject-plugin-1.3.1\plugin.jelly

Element... maven:reactor
Line.. 217
Column 9
Unable to obtain goal [multiproject:install-callback] -- C:\Documents and 
Settings\rhenley\.maven\cache\maven-test-plugin-1.6.\plugin.jelly:181:54: 
fail There were test failures.


Similar looking problem was seen last year and attributed to a bad version 
of maven and/or using JDK1.5. The JDK1.5 issue was marked as fixed in 0.92 
(http://issues.apache.org/jira/browse/AXIS2-193) and I think I have a good 
version of maven (1.0.2).


Possibly the commons-axiom build had the same problem yesterday? ...

http://vmgump.apache.org/gump/public/ws-axis2-commons/ws-commons-axiom/gump_work/build_ws-axis2-commons_ws-commons-axiom.html

Does anyone know if the problem is in SVN? Otherwise, it must be me :-(
Many thanks
Rob

- Original Message - 
From: Rob Henley [EMAIL PROTECTED]

To: axis-user@ws.apache.org
Sent: Tuesday, March 21, 2006 12:58 PM
Subject: Re: [Axis2] wss4j



Hi Deepal
I'm using 0.94. I will try to build from SVN, otherwise I'll wait for the 
0.95 release.

Cheers
Rob
- Original Message - 
From: Deepal Jayasinghe [EMAIL PROTECTED]

To: axis-user@ws.apache.org
Sent: Tuesday, March 21, 2006 12:46 PM
Subject: Re: [Axis2] wss4j



Hi Rob;

Are you working on current SVN code base or 0.94 release, I am sure that
I fixed this issues after 0.94 release.


Rob Henley wrote:


Hi Ruchith
many thanks - great explanation!

I know my server-side (tomcat) repository is ok, so I tried pointing
my client there:

ccf.createConfigurationContextFromFileSystem(C:/progra~1/Apache/Tomcat5.5/webapps/axis2/WEB-INF);

_serviceClient = new org.apache.axis2.client.ServiceClient(ctx,
_service);

Now I get a different error
[java] java.lang.NullPointerException
[java] at
org.apache.axis2.context.ServiceGroupContext.getServiceContext(ServiceGroupContext.java:58)

[java] at
org.apache.axis2.client.ServiceClient.init(ServiceClient.java:105)
[java] at org.apache.axis2.PurchasingStub.init(Unknown Source)
[java] at samples.purchasing1.ClientTest.main(Unknown Source)

Have you seen anything like this before?
Cheers
Rob
- Original Message - From: Ruchith Fernando
[EMAIL PROTECTED]
To: axis-user@ws.apache.org
Sent: Tuesday, March 21, 2006 2:23 AM
Subject: Re: [Axis2] wss4j


Hi Rob,

Yes the repository is just a directory with a certain structure as
shown below:

repo_dir
  |
 +- services/
  |  |
  | +- foo.aar
  | +- bar.aar
  |
  |- modules/
  |  |
  | +- a.mar
  | +- b.mar
  |
  |- conf/
|
   +-axis2.xml

I addition to the above you can have optional 'lib' directories at
each service, module and repo level holding the common jars to be used
in each scope.

Thanks,
Ruchith

On 3/20/06, Rob Henley [EMAIL PROTECTED] wrote:


Hi Ruchith,
thanks! I'll try a later version.

Just to clarify, I was thinking a repository was just a directory which
conformed to a specific structure, for instance with sub-directories
called
modules, lib etc. It sounds like I haven't understood this properly.
Can you
tell me where it is described?

Many thanks
Rob
- Original Message -
From: Ruchith Fernando [EMAIL PROTECTED]
To: axis-user@ws.apache.org
Sent: Monday, March 20, 2006 12:53 PM
Subject: Re: [Axis2] wss4j


Hi Rob,


 java.lang.ClassNotFoundException:
 org.apache.ws.security.transform.STRTransform

 I can see that this class is in wss4j-SNAPSHOT.jar, which in turn
is in  my
 security.mar in the modules directory. Extracting the jar into the 
 lib

 directory seems to solve the problem, but presumably that isn't the
 right
 thing to do?

No, you should not have to do that.

In your scenario only the security module should contain the
wss4j-SNAPSHOT.jar in its 'lib' directory and you should not be
required to add it to your classpath separately. This sounds like a
module classloading problem Deepal what do you think?

Also can you send the complete stack trace of
 java.lang.ClassNotFoundException:
 org.apache.ws.security.transform.STRTransform



 The client code to set the configurationContext seemed to be for a
 version
 other than 0.94. My attempt looks like this:

  ConfigurationContextFactory ccf = new ConfigurationContextFactory();
  ConfigurationContext ctx =
 ccf.createConfigurationContextFromFileSystem(C:/axis2);
   _serviceClient = new org.apache.axis2.client.ServiceClient(ctx,
 _service);

 (Just to get things working, I dropped this straight into the
 PurchasingStub
 constructor generated by wsdl2java. C:/axis2 is where I unzipped
axis.  It
 contains axis2.xml and subdirectories lib, modules etc.)

 The client classpath includes all the jars in the lib directory, but 
 I

 haven't set anything else specifically in the environment when the
 client

Re: [Axis2] wss4j

2006-03-22 Thread Rob Henley

Hi, right I tried it again with the same results but ...

1. I'm not sure I've understood what you mean by 'try a build online'. I was 
online when I did the build, so maven downloaded the jars it needed etc. But 
did you mean something more than that?
2. I tried to update my source. The doc says to run svn update, but I got 
this (error?) ...

C:\apache\axis2svn update
svn: REPORT request failed on '/repos/asf/!svn/vcc/default'
svn: REPORT of '/repos/asf/!svn/vcc/default': 200 OK (http://svn.apache.org)

So, I'm not sure if this worked or not. (Just to be clear axis2 is the 
directory I created yesterday with svn co, and contains maven.xml etc.)


3. I did hit an earlier build problem yesterday, which could be a clue ...

BUILD FAILED

File.. C:\Documents and 
Settings\rhenley\.maven\cache\maven-multiproject-plugin-1.3.1\plugin.jelly


Element... maven:reactor

Line.. 217

Column 9

Unable to obtain goal [multiproject:install-callback] --  
C:\apache\axis2\modules\security\maven.xml:39:110: copy Warning: Could not 
find file C:\Documents and 
Settings\rhenley\.maven\repository\bouncycastle\jars\bcprov-jdk13-128.jar to 
copy.



I 'fixed' this by manually downloading bcprov-jdk13-128.jar from 
http://www.bouncycastle.org/download/.


Rob
- Original Message - 
From: Eran Chinthaka [EMAIL PROTECTED]

To: axis-user@ws.apache.org
Sent: Wednesday, March 22, 2006 9:52 AM
Subject: Re: [Axis2] wss4j



I just checked the Axis2 and Axiom builds and they are successful for me.

can you try a build online.

Chinthaka

Rob Henley wrote:

Tried to build SVN yesterday, but hit this problem:

BUILD FAILED
File.. C:\Documents and 
Settings\rhenley\.maven\cache\maven-multiproject-plugin-1.3.1\plugin.jelly

Element... maven:reactor
Line.. 217
Column 9
Unable to obtain goal [multiproject:install-callback] -- C:\Documents and 
Settings\rhenley\.maven\cache\maven-test-plugin-1.6.\plugin.jelly:181:54: 
fail There were test failures.


Similar looking problem was seen last year and attributed to a bad 
version of maven and/or using JDK1.5. The JDK1.5 issue was marked as 
fixed in 0.92 (http://issues.apache.org/jira/browse/AXIS2-193) and I 
think I have a good version of maven (1.0.2).


Possibly the commons-axiom build had the same problem yesterday? ...

http://vmgump.apache.org/gump/public/ws-axis2-commons/ws-commons-axiom/gump_work/build_ws-axis2-commons_ws-commons-axiom.html

Does anyone know if the problem is in SVN? Otherwise, it must be me :-(
Many thanks
Rob










Re: [Axis2] wss4j

2006-03-21 Thread Rob Henley

Hi Ruchith
many thanks - great explanation!

I know my server-side (tomcat) repository is ok, so I tried pointing my 
client there:


ccf.createConfigurationContextFromFileSystem(C:/progra~1/Apache/Tomcat5.5/webapps/axis2/WEB-INF);
_serviceClient = new org.apache.axis2.client.ServiceClient(ctx, _service);

Now I get a different error
[java] java.lang.NullPointerException
[java] at 
org.apache.axis2.context.ServiceGroupContext.getServiceContext(ServiceGroupContext.java:58)
[java] at 
org.apache.axis2.client.ServiceClient.init(ServiceClient.java:105)

[java] at org.apache.axis2.PurchasingStub.init(Unknown Source)
[java] at samples.purchasing1.ClientTest.main(Unknown Source)

Have you seen anything like this before?
Cheers
Rob
- Original Message - 
From: Ruchith Fernando [EMAIL PROTECTED]

To: axis-user@ws.apache.org
Sent: Tuesday, March 21, 2006 2:23 AM
Subject: Re: [Axis2] wss4j


Hi Rob,

Yes the repository is just a directory with a certain structure as shown 
below:


repo_dir
  |
 +- services/
  |  |
  | +- foo.aar
  | +- bar.aar
  |
  |- modules/
  |  |
  | +- a.mar
  | +- b.mar
  |
  |- conf/
|
   +-axis2.xml

I addition to the above you can have optional 'lib' directories at
each service, module and repo level holding the common jars to be used
in each scope.

Thanks,
Ruchith

On 3/20/06, Rob Henley [EMAIL PROTECTED] wrote:

Hi Ruchith,
thanks! I'll try a later version.

Just to clarify, I was thinking a repository was just a directory which
conformed to a specific structure, for instance with sub-directories 
called
modules, lib etc. It sounds like I haven't understood this properly. Can 
you

tell me where it is described?

Many thanks
Rob
- Original Message -
From: Ruchith Fernando [EMAIL PROTECTED]
To: axis-user@ws.apache.org
Sent: Monday, March 20, 2006 12:53 PM
Subject: Re: [Axis2] wss4j


Hi Rob,


 java.lang.ClassNotFoundException:
 org.apache.ws.security.transform.STRTransform

 I can see that this class is in wss4j-SNAPSHOT.jar, which in turn is in 
 my

 security.mar in the modules directory. Extracting the jar into the lib
 directory seems to solve the problem, but presumably that isn't the 
 right

 thing to do?

No, you should not have to do that.

In your scenario only the security module should contain the
wss4j-SNAPSHOT.jar in its 'lib' directory and you should not be
required to add it to your classpath separately. This sounds like a
module classloading problem Deepal what do you think?

Also can you send the complete stack trace of
 java.lang.ClassNotFoundException:
 org.apache.ws.security.transform.STRTransform



 The client code to set the configurationContext seemed to be for a 
 version

 other than 0.94. My attempt looks like this:

  ConfigurationContextFactory ccf = new ConfigurationContextFactory();
  ConfigurationContext ctx =
 ccf.createConfigurationContextFromFileSystem(C:/axis2);
   _serviceClient = new org.apache.axis2.client.ServiceClient(ctx,
 _service);

 (Just to get things working, I dropped this straight into the
 PurchasingStub
 constructor generated by wsdl2java. C:/axis2 is where I unzipped axis. 
 It

 contains axis2.xml and subdirectories lib, modules etc.)

 The client classpath includes all the jars in the lib directory, but I
 haven't set anything else specifically in the environment when the 
 client

 runs.

To create a configuration context you have to give the path to an
axis2 _repository_ to the createConfigurationContextFromFileSystem()
method. NOT the place where you extracted Axis2.

There has been a considerable amount of changes from 0.94 and I'd
strongly recommend you to try the latest SVN head or checkout ht e0.95
release which will be out in a few days.

Thanks,
Ruchith












Re: [axis2] Using the security module

2006-03-21 Thread Rob Henley

Hi Siamak
I don't have an answer, but I think we are both having the same problem, 
except that I'm using the 0.94 binary release so I'm not as up-to-date as 
you. (See thread 'wss4j').


My initial solution to this problem was to start adding individual jars to 
the lib directory. (I think your missing class is from xalan.)


As I understand it, the real probelm is that - for some reason - the class 
loader isn't finding the jars in the 'mar' files. Below is the full 
exception stack for a similar problem (I think you hit this one next, after 
you drop xalan into your lib directory!)


Rob

[java] PurchasingStub: create factory
[java] PurchasingStub: create context
[java] - Deploying module : addressing
[java] - Deploying module : logging
[java] java.lang.ClassNotFoundException: 
org.apache.ws.security.transform.STRTransform

[java] at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
[java] at java.security.AccessController.doPrivileged(Native 
Method)
[java] at 
java.net.URLClassLoader.findClass(URLClassLoader.java:188)

[java] at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
[java] at 
sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)

[java] at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
[java] at 
java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)

[java] at java.lang.Class.forName0(Native Method)
[java] at java.lang.Class.forName(Class.java:164)
[java] at 
org.apache.xml.security.transforms.Transform.register(Unknown Source)
[java] at 
org.apache.ws.security.WSSConfig.init(WSSConfig.java:78)
[java] at 
org.apache.ws.security.WSSConfig.getNewInstance(WSSConfig.java:89)
[java] at 
org.apache.ws.security.WSSConfig.clinit(WSSConfig.java:53)
[java] at 
org.apache.ws.security.WSSecurityEngine.clinit(WSSecurityEngine.java:49)
[java] at 
org.apache.ws.security.handler.WSHandler.clinit(WSHandler.java:60)

[java] at java.lang.Class.forName0(Native Method)
[java] at java.lang.Class.forName(Class.java:242)
[java] at 
org.apache.axis2.deployment.util.Utils.getHandlerClass(Utils.java:157)
[java] at 
org.apache.axis2.deployment.util.Utils.addFlowHandlers(Utils.java:55)
[java] at 
org.apache.axis2.deployment.DeploymentEngine.addNewModule(DeploymentEngine.java:137)
[java] at 
org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:453)
[java] at 
org.apache.axis2.deployment.listener.RepositoryListenerImpl.init(RepositoryListenerImpl.java:100)
[java] at 
org.apache.axis2.deployment.listener.RepositoryListenerImpl.init(RepositoryListenerImpl.java:55)
[java] at 
org.apache.axis2.deployment.DeploymentEngine.load(DeploymentEngine.java:532)
[java] at 
org.apache.axis2.deployment.FileSystemConfigurator.getAxisConfiguration(FileSystemConfigurator.java:56)
[java] at 
org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:39)
[java] at 
org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContextFromFileSystem(ConfigurationContextFactory.java:53)

[java] at org.apache.axis2.PurchasingStub.init(Unknown Source)
[java] at samples.purchasing1.ClientTest.main(Unknown Source)
[java] - Deploying module : security
[java] PurchasingStub: create client
[java] client: caught Exception
[java] java.lang.NullPointerException
[java] at 
org.apache.axis2.context.ServiceGroupContext.getServiceContext(ServiceGroupContext.java:58)
[java] at 
org.apache.axis2.client.ServiceClient.init(ServiceClient.java:105)

[java] at org.apache.axis2.PurchasingStub.init(Unknown Source)
[java] at samples.purchasing1.ClientTest.main(Unknown Source)

- Original Message - 
From: Siamak Haschemi [EMAIL PROTECTED]

To: axis-user@ws.apache.org
Sent: Tuesday, March 21, 2006 10:51 AM
Subject: Re: [axis2] Using the security module



Thank you for your help.

After removing the  wss4j-SNAPSHOT.jar a new error message occurs:

java.lang.NoClassDefFoundError: org/apache/xpath/compiler/FuncLoader

...


So, what file do I need to delete now? :-)


What is the background about this. I'm using the current svn-sources. Does 
it denpend on the current refactorings?


Thanks,

Siamak Haschemi




Ruchith Fernando schrieb:

Do you have the wss4j-SNAPSHOT.jar in the 'WEB-INF/lib' directory. If
so please remove it.

Thanks,
Ruchith

On 3/21/06, Siamak Haschemi [EMAIL PROTECTED] wrote:


Hello to all.

I want to use the security module shipped with axis2.

I use the current svn sources to build the war file.
I place the security-0.95-SNAPSHOT.mar to the
${CATALINA_HOME}\webapps\axis2\WEB-INF\modules folder
I add the line module ref=security/ to the axis2.xml

While starting Tomcat the following error occures:


Re: [Axis2] wss4j

2006-03-21 Thread Rob Henley

Hi Deepal
I'm using 0.94. I will try to build from SVN, otherwise I'll wait for the 
0.95 release.

Cheers
Rob
- Original Message - 
From: Deepal Jayasinghe [EMAIL PROTECTED]

To: axis-user@ws.apache.org
Sent: Tuesday, March 21, 2006 12:46 PM
Subject: Re: [Axis2] wss4j



Hi Rob;

Are you working on current SVN code base or 0.94 release, I am sure that
I fixed this issues after 0.94 release.


Rob Henley wrote:


Hi Ruchith
many thanks - great explanation!

I know my server-side (tomcat) repository is ok, so I tried pointing
my client there:

ccf.createConfigurationContextFromFileSystem(C:/progra~1/Apache/Tomcat5.5/webapps/axis2/WEB-INF);

_serviceClient = new org.apache.axis2.client.ServiceClient(ctx,
_service);

Now I get a different error
[java] java.lang.NullPointerException
[java] at
org.apache.axis2.context.ServiceGroupContext.getServiceContext(ServiceGroupContext.java:58)

[java] at
org.apache.axis2.client.ServiceClient.init(ServiceClient.java:105)
[java] at org.apache.axis2.PurchasingStub.init(Unknown Source)
[java] at samples.purchasing1.ClientTest.main(Unknown Source)

Have you seen anything like this before?
Cheers
Rob
- Original Message - From: Ruchith Fernando
[EMAIL PROTECTED]
To: axis-user@ws.apache.org
Sent: Tuesday, March 21, 2006 2:23 AM
Subject: Re: [Axis2] wss4j


Hi Rob,

Yes the repository is just a directory with a certain structure as
shown below:

repo_dir
  |
 +- services/
  |  |
  | +- foo.aar
  | +- bar.aar
  |
  |- modules/
  |  |
  | +- a.mar
  | +- b.mar
  |
  |- conf/
|
   +-axis2.xml

I addition to the above you can have optional 'lib' directories at
each service, module and repo level holding the common jars to be used
in each scope.

Thanks,
Ruchith

On 3/20/06, Rob Henley [EMAIL PROTECTED] wrote:


Hi Ruchith,
thanks! I'll try a later version.

Just to clarify, I was thinking a repository was just a directory which
conformed to a specific structure, for instance with sub-directories
called
modules, lib etc. It sounds like I haven't understood this properly.
Can you
tell me where it is described?

Many thanks
Rob
- Original Message -
From: Ruchith Fernando [EMAIL PROTECTED]
To: axis-user@ws.apache.org
Sent: Monday, March 20, 2006 12:53 PM
Subject: Re: [Axis2] wss4j


Hi Rob,


 java.lang.ClassNotFoundException:
 org.apache.ws.security.transform.STRTransform

 I can see that this class is in wss4j-SNAPSHOT.jar, which in turn
is in  my
 security.mar in the modules directory. Extracting the jar into the lib
 directory seems to solve the problem, but presumably that isn't the
 right
 thing to do?

No, you should not have to do that.

In your scenario only the security module should contain the
wss4j-SNAPSHOT.jar in its 'lib' directory and you should not be
required to add it to your classpath separately. This sounds like a
module classloading problem Deepal what do you think?

Also can you send the complete stack trace of
 java.lang.ClassNotFoundException:
 org.apache.ws.security.transform.STRTransform



 The client code to set the configurationContext seemed to be for a
 version
 other than 0.94. My attempt looks like this:

  ConfigurationContextFactory ccf = new ConfigurationContextFactory();
  ConfigurationContext ctx =
 ccf.createConfigurationContextFromFileSystem(C:/axis2);
   _serviceClient = new org.apache.axis2.client.ServiceClient(ctx,
 _service);

 (Just to get things working, I dropped this straight into the
 PurchasingStub
 constructor generated by wsdl2java. C:/axis2 is where I unzipped
axis.  It
 contains axis2.xml and subdirectories lib, modules etc.)

 The client classpath includes all the jars in the lib directory, but I
 haven't set anything else specifically in the environment when the
 client
 runs.

To create a configuration context you have to give the path to an
axis2 _repository_ to the createConfigurationContextFromFileSystem()
method. NOT the place where you extracted Axis2.

There has been a considerable amount of changes from 0.94 and I'd
strongly recommend you to try the latest SVN head or checkout ht e0.95
release which will be out in a few days.

Thanks,
Ruchith














--
Thanks,
Deepal

~Future is Open~










[Axis2] wss4j

2006-03-20 Thread Rob Henley

Hi
there was a thread a few weeks ago (wss4j and axis2) about client problems 
with security.mar in [0.94].


The conclusions seemed to be:
1. make sure both the client and the service have a correctly configured 
repository with security.mar in the modules directory, the required jars in 
the lib directory and an axis2.xml with a module ref for the security module 
and the required security parameters.

2. explicitly specify the repository location in the client code

Doing all this helped a great deal, but I'm a bit confused too see that my 
client now throws


java.lang.ClassNotFoundException: 
org.apache.ws.security.transform.STRTransform


I can see that this class is in wss4j-SNAPSHOT.jar, which in turn is in my 
security.mar in the modules directory. Extracting the jar into the lib 
directory seems to solve the problem, but presumably that isn't the right 
thing to do?


The client code to set the configurationContext seemed to be for a version 
other than 0.94. My attempt looks like this:


ConfigurationContextFactory ccf = new ConfigurationContextFactory();
ConfigurationContext ctx = 
ccf.createConfigurationContextFromFileSystem(C:/axis2);

 _serviceClient = new org.apache.axis2.client.ServiceClient(ctx, _service);

(Just to get things working, I dropped this straight into the PurchasingStub 
constructor generated by wsdl2java. C:/axis2 is where I unzipped axis. It 
contains axis2.xml and subdirectories lib, modules etc.)


The client classpath includes all the jars in the lib directory, but I 
haven't set anything else specifically in the environment when the client 
runs.


Any help gratefully received!
Cheers
Rob 





Re: [Axis2] wss4j

2006-03-20 Thread Rob Henley

Hi Ruchith,
thanks! I'll try a later version.

Just to clarify, I was thinking a repository was just a directory which 
conformed to a specific structure, for instance with sub-directories called 
modules, lib etc. It sounds like I haven't understood this properly. Can you 
tell me where it is described?


Many thanks
Rob
- Original Message - 
From: Ruchith Fernando [EMAIL PROTECTED]

To: axis-user@ws.apache.org
Sent: Monday, March 20, 2006 12:53 PM
Subject: Re: [Axis2] wss4j


Hi Rob,



java.lang.ClassNotFoundException:
org.apache.ws.security.transform.STRTransform

I can see that this class is in wss4j-SNAPSHOT.jar, which in turn is in my
security.mar in the modules directory. Extracting the jar into the lib
directory seems to solve the problem, but presumably that isn't the right
thing to do?


No, you should not have to do that.

In your scenario only the security module should contain the
wss4j-SNAPSHOT.jar in its 'lib' directory and you should not be
required to add it to your classpath separately. This sounds like a
module classloading problem Deepal what do you think?

Also can you send the complete stack trace of

java.lang.ClassNotFoundException:
org.apache.ws.security.transform.STRTransform





The client code to set the configurationContext seemed to be for a version
other than 0.94. My attempt looks like this:

 ConfigurationContextFactory ccf = new ConfigurationContextFactory();
 ConfigurationContext ctx =
ccf.createConfigurationContextFromFileSystem(C:/axis2);
  _serviceClient = new org.apache.axis2.client.ServiceClient(ctx, 
_service);


(Just to get things working, I dropped this straight into the 
PurchasingStub

constructor generated by wsdl2java. C:/axis2 is where I unzipped axis. It
contains axis2.xml and subdirectories lib, modules etc.)

The client classpath includes all the jars in the lib directory, but I
haven't set anything else specifically in the environment when the client
runs.


To create a configuration context you have to give the path to an
axis2 _repository_ to the createConfigurationContextFromFileSystem()
method. NOT the place where you extracted Axis2.

There has been a considerable amount of changes from 0.94 and I'd
strongly recommend you to try the latest SVN head or checkout ht e0.95
release which will be out in a few days.

Thanks,
Ruchith