private Element createOrganization(String name,String displName,String url,String langStr) throws Exception {
  Element orgEle=doc.createElement(SAMLNames.ORGANIZATION);
  Element nameEle=doc.createElement(SAMLNames.ORGANIZATIONNAME);
  nameEle.setAttribute(SAMLNames.XMLLANG,SAMLNames.ENGLISH);
  nameEle.appendChild(doc.createTextNode(name));
  orgEle.appendChild(nameEle);
  Element displayNameEle=doc.createElement(SAMLNames.ORGANIZATIONDISPLAYNAME);
  displayNameEle.setAttribute(SAMLNames.XMLLANG,SAMLNames.ENGLISH);
  displayNameEle.appendChild(doc.createTextNode(displName));
  orgEle.appendChild(displayNameEle);
  String urlStr=idmClient.getEntityID(tenantName);
  if (urlStr == null) {
    urlStr=tenantName;
  }
  Element urlEle=doc.createElement(SAMLNames.ORGANIZATIONURL);
  urlEle.setAttribute(SAMLNames.XMLLANG,langStr);
  urlEle.appendChild(doc.createTextNode(url));
  orgEle.appendChild(urlEle);
  return orgEle;
}

private Element createOrganization ( String name , String displName , String url , String langStr ) throws Exception { Element orgEle = doc . createElement ( SAMLNames . ORGANIZATION ) ; Element nameEle = doc . createElement ( SAMLNames . ORGANIZATIONNAME ) ; nameEle . setAttribute ( SAMLNames . XMLLANG , SAMLNames . ENGLISH ) ; nameEle . appendChild ( doc . createTextNode ( name ) ) ; orgEle . appendChild ( nameEle ) ; Element displayNameEle = doc . createElement ( SAMLNames . ORGANIZATIONDISPLAYNAME ) ; displayNameEle . setAttribute ( SAMLNames . XMLLANG , SAMLNames . ENGLISH ) ; displayNameEle . appendChild ( doc . createTextNode ( displName ) ) ; orgEle . appendChild ( displayNameEle ) ; String urlStr = idmClient . getEntityID ( tenantName ) ; if ( urlStr == null ) { urlStr = tenantName ; } Element urlEle = doc . createElement ( SAMLNames . ORGANIZATIONURL ) ; urlEle . setAttribute ( SAMLNames . XMLLANG , langStr ) ; urlEle . appendChild ( doc . createTextNode ( url ) ) ; orgEle . appendChild ( urlEle ) ; return orgEle ; }
create organization element of entitydescriptor in dom . note : currently it support only xml : lang = " en " . will add once idm support locale .
