ws-rampart-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Veithen <>
Subject Re: wsdl2java not accepting rampart-1.4.1.mar
Date Fri, 27 Feb 2009 21:40:38 GMT

Actually there is no real problem here. The messages you get are
caused by the following two issues:
* The Rampart module implements the ModulePolicyExtension interface
(indicating that it supports codegen policy extensions), but the
implementation of the getPolicyExtension method throws an
UnsupportedOperationException (with message "TODO"...).
* The error reporting in wsdl2java is a bit misleading, in particular
"cannot create repository": there is no problem when loading the
repository, but only when retrieving the policy extension from

I fixed the second issue so that you would now see the following messages:

[ERROR] Error loading policy extension from module rampart
java.lang.UnsupportedOperationException: TODO
        at org.apache.rampart.Rampart.getPolicyExtension(
        at org.apache.axis2.wsdl.codegen.extension.PolicyEvaluator.init(
        at org.apache.axis2.wsdl.codegen.extension.PolicyEvaluator.engage(
        at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(
        at org.apache.axis2.wsdl.WSDL2Code.main(
        at org.apache.axis2.wsdl.WSDL2Java.main(
[WARN] Cannot find a PolicyExtension to process type assertions

Actually Rampart is not involved at all during the code generation.
The way it works is that wsdl2java extracts the policies from the WSDL
and puts them into the generated code (simply as String containing
XML). This information is then decoded at _runtime_. This means that
you don't even need to specify a repository containing the Rampart
module when invoking wsdl2java.



On Fri, Feb 27, 2009 at 14:40, Marc Boorshtein <> wrote:
> I didn't get any response from rampart, so I think I sent this request to
> the wrong list?  I've tried rebuilding rampart from source but nothing seems
> to work.  I also downloaded bouncy stack is:
> java 1.6
> axis2 1.4.1
> rampart 1.4
> Any help would be greatly appreciated
> Thanks
> Marc
> ---------- Forwarded message ----------
> From: Marc Boorshtein <>
> Date: Tue, Feb 24, 2009 at 7:35 AM
> Subject: wsdl2java not accepting rampart-1.4.1.mar
> To:
> Hello,
> I'm trying to use rampart 1.4.1 and axis2 1.4.1.  I'm able to create a
> secure service (based on the tutorial linked to by the main page), but
> creating the client using wsdl2java keeps failing:
> [mlb@localhost bin]$ sh  -uri
> https://localhost:8443/axis2/services/SecureService?wsdl -r
> /home/mlb/downloads/axis2-1.4.1/repository -p tutorial.rampart.client  -uw
> -or -o /home/mlb/projects/ws-security/java-client
>  Using AXIS2_HOME:   /home/mlb/downloads/axis2-1.4.1
>  Using JAVA_HOME:       /usr/java/jdk1.6.0_03
> Retrieving document at
> 'https://localhost:8443/axis2/services/SecureService?wsdl'.
> [INFO] Deploying module: addressing-1.41 -
> file:/home/mlb/downloads/axis2-1.4.1/repository/modules/addressing-1.41.mar
> [INFO] Deploying module: script-1.41 -
> file:/home/mlb/downloads/axis2-1.4.1/repository/modules/scripting-1.41.mar
> [INFO] Deploying module: ping-1.41 -
> file:/home/mlb/downloads/axis2-1.4.1/repository/modules/ping-1.41.mar
> [INFO] Deploying module: smtpfault -
> file:/home/mlb/downloads/axis2-1.4.1/repository/modules/smtpfault.mar
> [INFO] Deploying module: metadataExchange-1.41 -
> file:/home/mlb/downloads/axis2-1.4.1/repository/modules/mex-1.41.mar
> [INFO] Deploying module: rampart-1.4 -
> file:/home/mlb/downloads/axis2-1.4.1/repository/modules/rampart-1.4.mar
> [INFO] Deploying module: soapmonitor-1.41 -
> file:/home/mlb/downloads/axis2-1.4.1/repository/modules/soapmonitor-1.41.mar
> [INFO] Deploying module: metadataExchange -
> file:/home/mlb/downloads/axis2-1.4.1/lib/mex-1.4.1.jar
> [INFO] Deploying Web service: version.aar -
> file:/home/mlb/downloads/axis2-1.4.1/repository/services/version.aar
> cannot create repository : policy will not be supported
> cannot find a PolicyExtension to process
> assertions
> [mlb@localhost bin]$
> I tried copying axis2-codegen*.jar to the $AXIS2_HOME/lib directory but that
> didn't work and I'm not getting any errors.  Any ideas as to what the issue
> could be?
> Thanks
> Marc

View raw message