JAXBElement<?> samlResponse = (JAXBElement<?>) resultEnvelope.getBody().getAny().get(0);
Object response = samlResponse.getValue();
if(response instanceof Fault)
{
Fault fault = (Fault) response;
return new Result(null,fault);
}
ResponseType responseType = (ResponseType) response;
AssertionType at = (AssertionType) responseType.getAssertionOrEncryptedAssertion().get(0);