Problems trying to migrate/build using OpenSAML3 (3.3.0) with Eclipse and Maven
o haya
ohaya at yahoo.com
Mon Feb 25 10:54:47 EST 2019
Brent,
Can you explain what you mean by "For usage examples, the best thing is to look at the unit tests in the various projects."? Where are the "various projects" that you were referring to?
My apologies, but I am really struggling on the migration. I have essentially been stuck at the point in the code where I have created an assertion (that part works) and am then trying to sign the assertion, and thus far, I am stuck there for several days. If there are examples somewhere that show how to use OpenSAML V3 to sign an Assertion, given an Assertion, that would be really great!
Thanks,
Jim
--------------------------------------------
On Sat, 2/23/19, Brent Putman <putmanb at georgetown.edu> wrote:
Subject: Re: Problems trying to migrate/build using OpenSAML3 (3.3.0) with Eclipse and Maven
To: dev at shibboleth.net
Date: Saturday, February 23, 2019, 4:53 PM
On 2/23/19
12:59 PM, o haya wrote:
Hi,
I am trying to migrate the application that I had written (a
modified version of SAMLWriter.java) earlier using OpenSAML
2.6.6, now, to OpenSAML 3.3.0 using Eclipse and Maven.
Well, as I said before you don't have to use
Maven, nor Eclipse.
Use what you are comfortable with.
I am not that familiar with Maven, but anyway, I added
dependencies in the pom.xml:
The use of dependencyManagement is a little overkill
for a single
project like this, but it's not wrong. I don't
see any other
obvious problems.
But, when I do Run As ==> Maven Build ==> clean
install -U, I am getting some errors that I haven't been
able to resolve so far:
- Configuration cannot be resolved
- IdentifierGenerator cannot be resolved to a type
- SecureRandomIdentifierGenerator cannot be resolved to a
type
- SecurityConfiguration cannot be resolved to a type
- SecurityHelper cannot be resolved
- The constructor BasicX509Credential() is undefined
- XMLHelper cannot be resolved
3.x is not 2.x. At the very least all the package
names changed,
so any existing 'import' statements are
wrong. In many cases the
code itself was refactored or rewritten, so classes
and methods
don't exist anymore, or have different names, or
method/constructor arguments are different, etc.
Some of the "cannot be resolved" ones are
likely simply package
changes. Some of those classes don't exist
anymore however, like
XMLHelper, SecurityHelper, they were replaced by other
things.
The Javadocs are your friend:
https://wiki.shibboleth.net/confluence/display/OS30/APIDocumentation
For usage examples, the best thing is to look at the
unit tests
in the various projects.
For the BasicX509Credential() error, this is the line that
it is flagging in my code:
BasicX509Credential
credential = new BasicX509Credential();
IIRC there is no longer a no-arg ctor for that
class. It takes a
mandatory X509Certificate and optional PrivateKey.
That's a good
example of the kind of things that changed.
As I said, I am not that familiar with Maven, so I am not
sure if I need to add some other dependencies in the pom, or
do I need to modify code that uses those types that are
getting the errors?
Yes, definitely many types have been
added/removed/modified, so
the corresponding 2.x code definitely must change.
Wrt dependencies, you definitely need java-support
from our
projects, although if you're using Maven that will
be resolved as
a transitive dependency, as will all the other deps.
If not using
Maven then you'd have to manually include all the
right jars in
your project.
Also, as I said I have the dependencies configured for
opensaml version 3.3.0, but is there not a 3.4.2 in Maven?
Yes, 3.4.2 is the latest.
--
To unsubscribe from this list send an email to
dev-unsubscribe at shibboleth.net
-----Inline Attachment Follows-----
More information about the dev
mailing list