• Post Reply Bookmark Topic Watch Topic
  • New Topic

Can OpenSaml be used from a standalone java application?

 
Ravi Danum
Ranch Hand
Posts: 154
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hello All,

I want to create a SAML 2.0 assertion for the security request header of a SOAP message from a java application.

The assertion is to contain: Issuer, Subject and AuthnStatement.

Can I create this SAML assertion from a standalone java application?

When I run my code, I get:

Qname={urnasis:names:tc:SAML:2.0:assertion}AttributeValuejava.lang.NullPointerException.

I then added: DefaultBootstrap.bootstrap(); as recommended on the internet.

After that, I got: java.lang.NoClassDefFoundError: /org/apache/xml/security/Init.

I have read solutions from many people running their code from within a web server. So my questions remains:

Is it possible to use OpenSaml from a standalone java application?

I can furnish my code if this would help.

Thanks.

Ravi




 
Ravi Danum
Ranch Hand
Posts: 154
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

All JavaRanchers,

I solved this by creating the SAML assertion for the SOAP security header node by node.

I used SOAPElement, SOAPEnvelope, etc.

After this, I was able to create the SignedInfo and sign it.

If anyone has questions, I can send a code snippet and/or answer questions.

Thanks.
 
Roman Belous
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, Ravi Danum.

I have the same task. But I can not think up anything.
Could you please give me snippet example.

Regards,
Roman.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!