Skip to Content.
Sympa Menu

mace-opensaml-users - Class Cast Exception while processing XACMLPolicyQuery

Subject: OpenSAML user discussion

List archive

Class Cast Exception while processing XACMLPolicyQuery


Chronological Thread 
  • From: Massimiliano Masi <>
  • To:
  • Subject: Class Cast Exception while processing XACMLPolicyQuery
  • Date: Thu, 27 Aug 2009 14:54:22 +0200
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=apcG5kFhV0ek5pa6i3YKFyZarL3mP/H2yVPtTa+StYchS+F3NSf+yFXQm7Xp1p6wbm bdOTsOyyUmzf96o0eUvbYKsl/rVIwefUM5P3hOQzhyph8BL/tizMxE9LERMTQUpdMvn2 w6eZh6f8xReyDixFXsnOULc7KwSJ33LIEfbUs=

Hi All,

I've the exception [1] with the code [2] with the envelope in [3].

Do you have any idea?

Thanks,


Massimiliano




[1]:


2009-08-27 14:45:09,906 ERROR [STDERR] java.lang.ClassCastException:
org.opensaml.xml.schema.impl.XSAnyImpl
2009-08-27 14:45:09,906 ERROR [STDERR] at
org.opensaml.saml2.core.impl.RequestAbstractTypeUnmarshaller.processAttribute(RequestAbstractTypeUnmarshaller.java:43)
2009-08-27 14:45:09,906 ERROR [STDERR] at
org.opensaml.xml.io.AbstractXMLObjectUnmarshaller.unmarshallAttribute(AbstractXMLObjectUnmarshaller.java:236)
2009-08-27 14:45:09,906 ERROR [STDERR] at
org.opensaml.xml.io.AbstractXMLObjectUnmarshaller.unmarshall(AbstractXMLObjectUnmarshaller.java:107)
2009-08-27 14:45:09,907 ERROR [STDERR] at
com.spirit.pr.PRService.XACMLPolicyQuery(PRService.java:81)
2009-08-27 14:45:09,907 ERROR [STDERR] at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2009-08-27 14:45:09,907 ERROR [STDERR] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
2009-08-27 14:45:09,907 ERROR [STDERR] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
2009-08-27 14:45:09,907 ERROR [STDERR] at
java.lang.reflect.Method.invoke(Method.java:585)
2009-08-27 14:45:09,907 ERROR [STDERR] at
org.apache.axis2.receivers.RawXMLINOutMessageReceiver.invokeBusinessLogic(RawXMLINOutMessageReceiver.java:97)
2009-08-27 14:45:09,907 ERROR [STDERR] at
org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.invokeBusinessLogic(AbstractInOutSyncMessageReceiver.java:42)
2009-08-27 14:45:09,908 ERROR [STDERR] at
org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:100)
2009-08-27 14:45:09,908 ERROR [STDERR] at
org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:176)
2009-08-27 14:45:09,908 ERROR [STDERR] at
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:275)
2009-08-27 14:45:09,908 ERROR [STDERR] at
org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:133)
2009-08-27 14:45:09,908 ERROR [STDERR] at
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
2009-08-27 14:45:09,908 ERROR [STDERR] at
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
2009-08-27 14:45:09,908 ERROR [STDERR] at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
2009-08-27 14:45:09,909 ERROR [STDERR] at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
2009-08-27 14:45:09,909 ERROR [STDERR] at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
2009-08-27 14:45:09,909 ERROR [STDERR] at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
2009-08-27 14:45:09,909 ERROR [STDERR] at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
2009-08-27 14:45:09,909 ERROR [STDERR] at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
2009-08-27 14:45:09,909 ERROR [STDERR] at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
2009-08-27 14:45:09,909 ERROR [STDERR] at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
2009-08-27 14:45:09,909 ERROR [STDERR] at
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
2009-08-27 14:45:09,909 ERROR [STDERR] at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
2009-08-27 14:45:09,909 ERROR [STDERR] at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
2009-08-27 14:45:09,909 ERROR [STDERR] at
org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
2009-08-27 14:45:09,909 ERROR [STDERR] at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
2009-08-27 14:45:09,913 ERROR [STDERR] at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
2009-08-27 14:45:09,913 ERROR [STDERR] at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
2009-08-27 14:45:09,913 ERROR [STDERR] at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
2009-08-27 14:45:09,914 ERROR [STDERR] at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
2009-08-27 14:45:09,914 ERROR [STDERR] at
org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
2009-08-27 14:45:09,914 ERROR [STDERR] at
java.lang.Thread.run(Thread.java:613)


[2]

UnmarshallerFactory marshallerFactory =
org.opensaml.xml.Configuration.getUnmarshallerFactory();
Unmarshaller policyQueryUnmarshaller =

marshallerFactory.getUnmarshaller(XACMLPolicyQueryType.DEFAULT_ELEMENT_NAME_XACML20);

// el is the body of the SOAP envelope
XACMLPolicyQueryType query =
(XACMLPolicyQueryType)policyQueryUnmarshaller.unmarshall(el);

[3]

<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope";>
<soapenv:Body>
<xacml-samlp:XACMLPolicyQuery
xmlns:xacml-samlp="urn:oasis:names:tc:xacml:2.0:profile:saml2.0:v2:schema:assertion"
Consent="consent" Destination="http://localhost/PolicyRepository";
ID="urn:uuid:D60D1EF72E4C8241851251377109209"
IssueInstant="2009-08-27T12:45:09.220Z" Version="2.0">
<saml:Issuer
xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion">C=AT,ST=Austria,L=Wien,CN=Policy
Repository,</saml:Issuer>
<ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#";>
<ds:SignedInfo>
<ds:CanonicalizationMethod
Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"; />
<ds:SignatureMethod
Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"; />
<ds:Reference
URI="#urn:uuid:D60D1EF72E4C8241851251377109209">
<ds:Transforms>
<ds:Transform
Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"; />
<ds:Transform
Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#";>
<ec:InclusiveNamespaces
xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#"; PrefixList="ds saml
xacml-samlp" />
</ds:Transform>
</ds:Transforms>
<ds:DigestMethod
Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"; />

<ds:DigestValue>IvWZGWVyolBSiKS+77yBNgpzZpo=</ds:DigestValue>
</ds:Reference>
</ds:SignedInfo>
<ds:SignatureValue>jZyImCpmifb0...</ds:SignatureValue>
<ds:KeyInfo>
<ds:X509Data>
<ds:X509Certificate>MIID7DCC....</ds:X509Certificate>
</ds:X509Data>
</ds:KeyInfo>
</ds:Signature>
<xacml-samlp:PolicyIdReference
xmlns:xacml-samlp="urn:oasis:names:tc:xacml:2.0:policy:schema:os">urn:policy:1.2.3</xacml-samlp:PolicyIdReference>
</xacml-samlp:XACMLPolicyQuery>
</soapenv:Body>
</soapenv:Envelope>





--
Massimiliano Masi

http://www.mascanc.net/~max



Archive powered by MHonArc 2.6.16.

Top of Page