You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Rob Henley <ro...@freeuk.com> on 2006/03/20 13:25:15 UTC
[Axis2] wss4j
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
Posted by Rob Henley <ro...@freeuk.com>.
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\axis2>svn 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" <ch...@opensource.lk>
To: <ax...@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
Posted by Eran Chinthaka <ch...@opensource.lk>.
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
Posted by Ali Sadik Kumlali <as...@yahoo.com>.
I have exactly the same problem. May be we both do the same mistake :)
Ali Sadik Kumlali
Rob Henley <ro...@freeuk.com> 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:
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"
To:
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"
> To:
> 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.(ServiceClient.java:105)
>>> [java] at org.apache.axis2.PurchasingStub.(Unknown Source)
>>> [java] at samples.purchasing1.ClientTest.main(Unknown Source)
>>>
>>> Have you seen anything like this before?
>>> Cheers
>>> Rob
>>> ----- Original Message ----- From: "Ruchith Fernando"
>>>
>>> To:
>>> 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 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"
>>>> To:
>>>> 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~
>>
>>
>>
>>
>>
>
>
>
>
>
---------------------------------
Yahoo! Mail
Use Photomail to share photos without annoying attachments.
Re: [Axis2] wss4j
Posted by Rob Henley <ro...@freeuk.com>.
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" <ro...@freeuk.com>
To: <ax...@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" <de...@opensource.lk>
> To: <ax...@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"
>>> <ru...@gmail.com>
>>> To: <ax...@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 <ro...@freeuk.com> 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" <ru...@gmail.com>
>>>> To: <ax...@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~
>>
>>
>>
>>
>>
>
>
>
>
>
Re: [Axis2] wss4j
Posted by Rob Henley <ro...@freeuk.com>.
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" <de...@opensource.lk>
To: <ax...@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"
>> <ru...@gmail.com>
>> To: <ax...@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 <ro...@freeuk.com> 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" <ru...@gmail.com>
>>> To: <ax...@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~
>
>
>
>
>
Re: [Axis2] wss4j
Posted by Deepal Jayasinghe <de...@opensource.lk>.
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"
> <ru...@gmail.com>
> To: <ax...@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 <ro...@freeuk.com> 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" <ru...@gmail.com>
>> To: <ax...@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~
Re: [Axis2] wss4j
Posted by Rob Henley <ro...@freeuk.com>.
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" <ru...@gmail.com>
To: <ax...@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 <ro...@freeuk.com> 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" <ru...@gmail.com>
> To: <ax...@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] wss4j
Posted by Ruchith Fernando <ru...@gmail.com>.
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 <ro...@freeuk.com> 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" <ru...@gmail.com>
> To: <ax...@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] wss4j
Posted by Rob Henley <ro...@freeuk.com>.
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" <ru...@gmail.com>
To: <ax...@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] wss4j
Posted by Ruchith Fernando <ru...@gmail.com>.
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