title: OpenSaml read metadata
body: <p>I'm tring to read the metadata from an Idp using Open Saml 2. When i try to unmarshall the metadata openSaml show only this getter  for attributes get<strong>Unknown</strong>Atrributes(). Looks like i am missing some point since when reading the Idp response SAML the code works very well. (it shows getAssertions() that returns a list of assertions).</p>
  
  <p>I need to parse the metadata and find informations regarding the Idp.</p>
  
  <p>Here the method</p>
  
  <pre><code>     public Metadata metadataReader() {
  
          ByteArrayInputStream bytesIn = new ByteArrayInputStream(ISSUER_METADATA_URL.getBytes());
          BasicParserPool ppMgr = new BasicParserPool();
  
          ppMgr.setNamespaceAware(true);
          // grab the xml file
  //      File xmlFile = new File(this.file);
          Metadata metadata = null;
          try {
              Document document = ppMgr.parse(bytesIn);
              Element metadataRoot = document.getDocumentElement();
              QName qName = new QName(metadataRoot.getNamespaceURI(), metadataRoot.getLocalName(),
                      metadataRoot.getPrefix());
              Unmarshaller unmarshaller = Configuration.getUnmarshallerFactory().getUnmarshaller(qName);
              metadata = (Metadata) unmarshaller.unmarshall(metadataRoot);
  
  
              return metadata;
  
          } catch (XMLParserException e) {
              e.printStackTrace();
          } catch (UnmarshallingException e) {
              e.printStackTrace();
          }
  
          return null;
  
      }
  </code></pre>