ws-rampart-dev mailing list archives

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

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
Rampart.

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(Rampart.java:45)
        at org.apache.axis2.wsdl.codegen.extension.PolicyEvaluator.init(PolicyEvaluator.java:102)
        at org.apache.axis2.wsdl.codegen.extension.PolicyEvaluator.engage(PolicyEvaluator.java:118)
        at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:224)
        at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
        at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
[WARN] Cannot find a PolicyExtension to process
http://schemas.xmlsoap.org/ws/2005/07/securitypolicy 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.

Regards,

Andreas

On Fri, Feb 27, 2009 at 14:40, Marc Boorshtein <mboorshtein@gmail.com> 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 castle.my 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 <mboorshtein@gmail.com>
> Date: Tue, Feb 24, 2009 at 7:35 AM
> Subject: wsdl2java not accepting rampart-1.4.1.mar
> To: rampart-dev@ws.apache.org
>
>
> 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 wsdl2java.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
> http://schemas.xmlsoap.org/ws/2005/07/securitypolicytype 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
>
>

Mime
View raw message