mace-opensaml-users - Re: [OpenSAML] unable to add ResourceContent (XML any type) to Resource attribute with opensaml.
Subject: OpenSAML user discussion
List archive
Re: [OpenSAML] unable to add ResourceContent (XML any type) to Resource attribute with opensaml.
Chronological Thread
- From: Brent Putman <>
- To:
- Subject: Re: [OpenSAML] unable to add ResourceContent (XML any type) to Resource attribute with opensaml.
- Date: Wed, 01 Oct 2008 15:45:38 -0400
Michael Lausch wrote:
> with my test code and a fake SOAP request which looks like this:
>
> <?xml version="1.0" encoding="UTF-8"?><soap:Envelope
> xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
> <soap:Header>
> <context xmlns="urn:zimbra">
> <sessionId id="1718"/>
> <authToken>AUTH TOKEN</authToken>
> </context>
> </soap:Header>
> <soap:Body>
> <SetPasswordRequest xmlns="urn:zimbraAdmin">
> <id>ACCOUNT ID</id>
> <newPassword>NEWPASS</newPassword>
> </SetPasswordRequest>
> </soap:Body>
> </soap:Envelope>
>
> i don't get an unmarshaller. The reason is that no Unmarshaller for
> the QName(http://www.w3.org/2003/05/soap-envelope, Envelope, soap) is
> registered.
> therefore the unMarshaller variable is null. Your example works,
> because the element you use for unmarshalling has an XSI type defined,
> which i don't have
> for my SOAP request.
>
Right, we don't have XMLObject model for SOAP 1.2 like Scott said. If
you want a generic XMLObject that can be used to represent any arbitrary
XML object model, you can use what we call the default provider, which
is currently implemented by XSAny. Nominally this is used for things
that are declared explicitly as xs:anyType, but since it can hold any
content model (for the ur-type xs:anyType), it can be used for things
for which you don't otherwise have an XMLObject implementation. The
easiest way to get an unmarshaller for that is:
unmarshallerFactory.getUnmarshaller(Configuration.getDefaultProviderQName());
The XSAny instance you get when you unmarshall using that has the
following API:
http://www.opensaml.org/docs/xmltooling/1.0.1/apidocs/org/opensaml/xml/schema/XSAny.html
As you can see, it is ElementExtensible- and AttributeExtensible- and
also exposes the textContent, so that's how you gain access to the
wrapped content model.
--Brent
- Re: [OpenSAML] unable to add ResourceContent (XML any type) to Resource attribute with opensaml., Michael Lausch, 10/01/2008
- Re: [OpenSAML] unable to add ResourceContent (XML any type) to Resource attribute with opensaml., HÃ¥kon Sagehaug, 10/01/2008
- Re: [OpenSAML] unable to add ResourceContent (XML any type) to Resource attribute with opensaml., Michael Lausch, 10/01/2008
- Re: [OpenSAML] unable to add ResourceContent (XML any type) to Resource attribute with opensaml., Michael Lausch, 10/01/2008
- RE: [OpenSAML] unable to add ResourceContent (XML any type) to Resource attribute with opensaml., Scott Cantor, 10/01/2008
- Re: [OpenSAML] unable to add ResourceContent (XML any type) to Resource attribute with opensaml., Brent Putman, 10/01/2008
- Re: [OpenSAML] unable to add ResourceContent (XML any type) to Resource attribute with opensaml., Michael Lausch, 10/02/2008
- Re: [OpenSAML] unable to add ResourceContent (XML any type) to Resource attribute with opensaml., HÃ¥kon Sagehaug, 10/01/2008
Archive powered by MHonArc 2.6.16.