Thursday, February 13, 2014

Creating OMElement from a list of Array Elements

Creating an  OMElement  from an Array of elements , requires a custom xml root element, which will wrap all arguments.
Here is a sample code snippet to do that;

String[] csvArray = csvList.toArray(new String[csvList.size()]);
OMElement csvOMElement =  BeanUtil.getOMElement(qname, csvArray, null, false, null);

eg:
qname = new QName("csv"); // here user can  provide  prefered root element for his OMelement.

Monday, February 3, 2014

SAML 2.0 service provider meta file for WSO2 IS

SAML2.0 identity providers and service providers has to provide a SAML 2.0 metadata file representing entities. Metadata documents provided by a service provider must include an <md:SPSSODescriptor> element containing all necessary elements and identity provider must include an < md:IDPSSODescriptor> element which containing all necessary elements.

WSO2 Identity server can be configured as  a single sign on system, where it can act as identity provider and service provider. There is no option to generate meta files in WSO2 IS. User has to manually write IDP/SP meta files and need to import with other third party systems.
Here is a sample Service-provider meta file for WSO2 IS, which can be used with third party identity providers.