Skip to Content.
Sympa Menu

mace-opensaml-users - Problem in getting back the assertion

Subject: OpenSAML user discussion

List archive

Problem in getting back the assertion


Chronological Thread 
  • From: anshuk pal chaudhuri <>
  • To:
  • Subject: Problem in getting back the assertion
  • Date: Thu, 10 Nov 2005 01:10:19 -0800 (PST)
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=jl3zxBsAHoZPvQRY6GYbm9TB5QL0uP7BI04+5NQ9rIabYQRB2YAiSn2zV9n5oGY6ObomkFzagJVD2qV7GaQjnSwrNVzfP5VYOUzmVitvEXqMSg+4vONI8Pt71fuoz1y2HbjPWYnkgfmuGQ3nx0Cn5RxEyeS3beL81JrYqTmhVQU= ;

Hi,

I am building oen saml assertion in one particular
application.The application is trying to call one web
service,so it is sending the assertion inside the soap
request header.The assertion looks like this:

<Assertion
AssertionID="fa3f5a1bf4b628a8e7a2563fa2544e4c"
IssueInstant="2005-11-10T08:57:21Z" Issuer="Anshuk"
MajorVersion="1" MinorVersion="1"
xmlns="urn:oasis:names:tc:SAML:1.0:assertion"
xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion"
xmlns:samlp="urn:oasis:names:tc:SAML:1.0:protocol"><Conditions
NotBefore="2005-11-10T08:57:21Z"
NotOnOrAfter="2005-11-10T08:57:21Z"/>
<AuthenticationStatement
AuthenticationInstant="2005-11-10T08:57:21Z"
AuthenticationMethod="anshuk">
<Subject>
<NameIdentifier>Anshuk</NameIdentifier>
</Subject>
</AuthenticationStatement>
</Assertion>

The code for building the assertion:

SAMLSubject authSubject =new
SAMLSubject("Anshuk",null,null,null,null,null);
SAMLAuthenticationStatement authenticationStatement
=new
SAMLAuthenticationStatement(authSubject,"anshuk",new
Date(),null,null,null);
SAMLAssertion assertion = new
SAMLAssertion("Anshuk",new Date(),new
Date(),null,null,Arrays.asList(new SAMLStatement[]
{authenticationStatement}));

The SOAP Request comprising the SAML Assertion inside
the SOAP Header is going fine.
But at the web service level handler, when I get the
element Assertion,I want to create the SAML Assertion
from the Element Assertion,its throwing an exception.

SOAPHeader header = requestEnvelope.getHeader();
SOAPHeaderElement soapHeaderElement=
(SOAPHeaderElement)header.examineAllHeaderElements().next();
Element samlAssertionElement =
(Element)soapHeaderElement.getChildElements().next();
/*Printing Fine................*/
System.out.println(samlAssertionElement);

/* THIS ONE CREATING PROBLEM**/
SAMLAssertion samlAssertion = new
SAMLAssertion(samlAssertionElement);


THE EXCEPTION.......

java.lang.NumberFormatException: null
at java.lang.Integer.parseInt(Integer.java:436)
at java.lang.Integer.parseInt(Integer.java:518)
at org.opensaml.SAMLAssertion.fromDOM(Unknown Source)
at org.opensaml.SAMLAssertion.<init>(Unknown Source)
at
saml.SimpleSAMLInsertion.main(SimpleSAMLInsertion.java:128)

Is the assertion created ok?Or do I need to put
anything extra?

Please help me.
Regards,
Anshuk



__________________________________
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com



Archive powered by MHonArc 2.6.16.

Top of Page