Examples of UnmarshallerFactory


Examples of org.jboss.xb.binding.UnmarshallerFactory

   public static KernelDeployment parse(File fp)
           throws JBossXBException, MalformedURLException
   {
      long start = System.currentTimeMillis();
      SchemaBindingResolver resolver = SingletonSchemaResolverFactory.getInstance().getSchemaBindingResolver();
      UnmarshallerFactory factory = UnmarshallerFactory.newInstance();
      Unmarshaller unmarshaller = factory.newUnmarshaller();
      KernelDeployment deployment = (KernelDeployment) unmarshaller.unmarshal(fp.toURL().toString(), resolver);
      long end = System.currentTimeMillis() - start;
      System.out.println("XML parsing took: " + end);
      return deployment;
   }
View Full Code Here

Examples of org.jboss.xb.binding.UnmarshallerFactory

   }

   public static KernelDeployment parse(URL url) throws JBossXBException, MalformedURLException
   {
      SchemaBindingResolver resolver = SingletonSchemaResolverFactory.getInstance().getSchemaBindingResolver();
      UnmarshallerFactory factory = UnmarshallerFactory.newInstance();
      Unmarshaller unmarshaller = factory.newUnmarshaller();
      return (KernelDeployment) unmarshaller.unmarshal(url.toString(), resolver);
   }
View Full Code Here

Examples of org.jboss.xb.binding.UnmarshallerFactory

   public static KernelDeployment parse(File fp)
           throws JBossXBException, MalformedURLException
   {
      SchemaBindingResolver resolver = SingletonSchemaResolverFactory.getInstance().getSchemaBindingResolver();
      long start = System.currentTimeMillis();
      UnmarshallerFactory factory = UnmarshallerFactory.newInstance();
      Unmarshaller unmarshaller = factory.newUnmarshaller();
      KernelDeployment deployment = (KernelDeployment) unmarshaller.unmarshal(fp.toURL().toString(), resolver);
      long end = System.currentTimeMillis() - start;
      System.out.println("XML parsing took: " + end);
      return deployment;
   }
View Full Code Here

Examples of org.opensaml.xml.io.UnmarshallerFactory

  
   public XMLObject toXMLObject(Element element) throws UnmarshallingException
   {
      if(element ==null)
         throw new IllegalArgumentException("Null Element");
      UnmarshallerFactory factory = Configuration.getUnmarshallerFactory();
      Unmarshaller unmarshaller = factory.getUnmarshaller(element);
      if(unmarshaller == null)
         throw new IllegalStateException("Unmarshaller for element "+element.getLocalName()
               + " is null");
      return unmarshaller.unmarshall(element);
   }
View Full Code Here

Examples of org.opensaml.xml.io.UnmarshallerFactory

    /**
     * Constructor.
     *
     */
    public Encrypter() {
        UnmarshallerFactory unmarshallerFactory = Configuration.getUnmarshallerFactory();
        encryptedDataUnmarshaller = unmarshallerFactory.getUnmarshaller(EncryptedData.DEFAULT_ELEMENT_NAME);
        encryptedKeyUnmarshaller = unmarshallerFactory.getUnmarshaller(EncryptedKey.DEFAULT_ELEMENT_NAME);

        XMLObjectBuilderFactory builderFactory = Configuration.getBuilderFactory();
        keyInfoBuilder = (XMLSignatureBuilder<KeyInfo>) builderFactory.getBuilder(KeyInfo.DEFAULT_ELEMENT_NAME);

        jcaProviderName = null;
View Full Code Here

Examples of org.opensaml.xml.io.UnmarshallerFactory

            DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
            documentBuilderFactory.setNamespaceAware(true);
            DocumentBuilder docBuilder = documentBuilderFactory.newDocumentBuilder();
            Document document = docBuilder.parse(new ByteArrayInputStream(omElement.toString().getBytes()));
            Element element = document.getDocumentElement();
            UnmarshallerFactory unmarshallerFactory = Configuration
                    .getUnmarshallerFactory();
            Unmarshaller unmarshaller = unmarshallerFactory
                    .getUnmarshaller(element);
            assertion = (org.opensaml.saml1.core.Assertion) unmarshaller
                    .unmarshall(element);
        } catch (Exception e){
            e.printStackTrace();
View Full Code Here

Examples of org.opensaml.xml.io.UnmarshallerFactory

            DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
            documentBuilderFactory.setNamespaceAware(true);
            DocumentBuilder docBuilder = documentBuilderFactory.newDocumentBuilder();
            Document document = docBuilder.parse(new ByteArrayInputStream(omElement.toString().getBytes()));
            Element element = document.getDocumentElement();
            UnmarshallerFactory unmarshallerFactory = Configuration
                    .getUnmarshallerFactory();
            Unmarshaller unmarshaller = unmarshallerFactory
                    .getUnmarshaller(element);
            assertion = (org.opensaml.saml2.core.Assertion) unmarshaller
                    .unmarshall(element);
        } catch (Exception e){
            e.printStackTrace();
View Full Code Here

Examples of org.opensaml.xml.io.UnmarshallerFactory

            DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
            documentBuilderFactory.setNamespaceAware(true);
            DocumentBuilder docBuilder = documentBuilderFactory.newDocumentBuilder();
            Document document = docBuilder.parse(new ByteArrayInputStream(keyInfoElementString.trim().getBytes()));
            Element element = document.getDocumentElement();
            UnmarshallerFactory unmarshallerFactory = Configuration
                    .getUnmarshallerFactory();
            Unmarshaller unmarshaller = unmarshallerFactory
                    .getUnmarshaller(element);
            samlAssertion = (Assertion) unmarshaller
                    .unmarshall(element);
        }
        catch (ConfigurationException e) {
View Full Code Here

Examples of org.opensaml.xml.io.UnmarshallerFactory

   *
   * @param elem
   * @throws UnmarshallingException If the token creation fails
   */
  public void createToken(Element elem) throws UnmarshallingException {
    UnmarshallerFactory unmarshallerFactory = Configuration.getUnmarshallerFactory();
    Unmarshaller unmarshaller = unmarshallerFactory.getUnmarshaller(elem);
    assertion = (Assertion) unmarshaller.unmarshall(elem);
  }
View Full Code Here

Examples of org.opensaml.xml.io.UnmarshallerFactory

   *
   * @param elem
   * @throws UnmarshallingException If the token creation fails
   */
  public void createToken(Element elem) throws UnmarshallingException {
    UnmarshallerFactory unmarshallerFactory = Configuration.getUnmarshallerFactory();
    Unmarshaller unmarshaller = unmarshallerFactory.getUnmarshaller(elem);
    assertion = (Assertion) unmarshaller.unmarshall(elem);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.