Package com.sun.xml.stream.buffer

Examples of com.sun.xml.stream.buffer.XMLStreamBufferResult


        URL url = createURL(filename.value);
        MutableXMLStreamBuffer xsb = new MutableXMLStreamBuffer();
        xsb.setSystemId(url.toExternalForm());
        SDDocumentSource abstractWsdlSource = SDDocumentSource.create(url,xsb);
        newDocs.add(abstractWsdlSource);
        XMLStreamBufferResult r = new XMLStreamBufferResult(xsb);
        r.setSystemId(filename.value);
        return r;
    }
View Full Code Here


        MutableXMLStreamBuffer xsb = new MutableXMLStreamBuffer();
        xsb.setSystemId(url.toExternalForm());
        SDDocumentSource sd = SDDocumentSource.create(url,xsb);
        newDocs.add(sd);

        XMLStreamBufferResult r = new XMLStreamBufferResult(xsb);
        r.setSystemId(filename.value);
        return r;
    }
View Full Code Here

        void addSchema(Source schema) {
            assert schema.getSystemId() != null;

            String systemId = schema.getSystemId();
            try {
                XMLStreamBufferResult xsbr = XmlUtil.identityTransform(schema, new XMLStreamBufferResult());
                SDDocumentSource sds = SDDocumentSource.create(new URL(systemId), xsbr.getXMLStreamBuffer());
                SDDocument sdoc = SDDocumentImpl.create(sds, new QName(""), new QName(""));
                docs.put(systemId, sdoc);
                nsMapping.put(((SDDocument.Schema)sdoc).getTargetNamespace(), sdoc);
            } catch(Exception ex) {
                LOGGER.log(Level.WARNING, "Exception in adding schemas to resolver", ex);
View Full Code Here

        Map<QName, String> otherAttributes = this.getOtherAttributes();
        return otherAttributes.get(name);
    }
   
    public XMLStreamReader readHeader() throws XMLStreamException {
        XMLStreamBufferResult xbr = new XMLStreamBufferResult();
        JAXBElement<SecurityTokenReferenceType> strElem = new ObjectFactory().createSecurityTokenReference(this);
        try{
            getMarshaller().marshal(strElem, xbr);
           
        } catch(JAXBException je){
            throw new XMLStreamException(je);
        }
        return xbr.getXMLStreamBuffer().readAsXMLStreamReader();
    }
View Full Code Here

        Map<QName, String> otherAttributes = this.getOtherAttributes();
        return otherAttributes.get(name);
    }
   
    public XMLStreamReader readHeader() throws XMLStreamException {
        XMLStreamBufferResult xbr = new XMLStreamBufferResult();
        JAXBElement<ReferenceType> deirectRefElem = new ObjectFactory().createReference(this);
        try{
            getMarshaller().marshal(deirectRefElem, xbr);
           
        } catch(JAXBException je){
            throw new XMLStreamException(je);
        }
        return xbr.getXMLStreamBuffer().readAsXMLStreamReader();
    }
View Full Code Here

    public String getLocalPart() {
        return "X509IssuerSerial".intern();
    }

    public XMLStreamReader readHeader() throws XMLStreamException {
        XMLStreamBufferResult xbr = new XMLStreamBufferResult();
        JAXBElement<com.sun.xml.ws.security.opt.crypto.dsig.keyinfo.X509IssuerSerial>
                issuerSerialElem = new ObjectFactory().createX509DataTypeX509IssuerSerial(this);
        try{
            getMarshaller().marshal(issuerSerialElem, xbr);
           
        } catch(JAXBException je){
            throw new XMLStreamException(je);
        }
        return xbr.getXMLStreamBuffer().readAsXMLStreamReader();
    }
View Full Code Here

        Map<QName, String> otherAttributes = this.getOtherAttributes();
        return otherAttributes.get(name);
    }
   
    public XMLStreamReader readHeader() throws XMLStreamException {
        XMLStreamBufferResult xbr = new XMLStreamBufferResult();
        JAXBElement<KeyIdentifierType> keyIdentifierElem = new ObjectFactory().createKeyIdentifier(this);
        try{
            getMarshaller().marshal(keyIdentifierElem, xbr);
           
        } catch(JAXBException je){
            throw new XMLStreamException(je);
        }
        return xbr.getXMLStreamBuffer().readAsXMLStreamReader();
    }
View Full Code Here

    @Override
    public XMLStreamReader readPayload() throws XMLStreamException {
       try {
            if(infoset==null) {
        if (rawContext != null) {
                  XMLStreamBufferResult sbr = new XMLStreamBufferResult();
          Marshaller m = rawContext.createMarshaller();
          m.setProperty("jaxb.fragment", Boolean.TRUE);
          m.marshal(jaxbObject, sbr);
                  infoset = sbr.getXMLStreamBuffer();
        } else {
            MutableXMLStreamBuffer buffer = new MutableXMLStreamBuffer();
            writePayloadTo(buffer.createFromXMLStreamWriter());
            infoset = buffer;
        }
View Full Code Here

    public String getLocalPart() {
        return MessageConstants.SIGNATURE_LNAME;
    }
   
    public javax.xml.stream.XMLStreamReader readHeader() throws XMLStreamException {
        XMLStreamBufferResult xbr = new XMLStreamBufferResult();
        try{
            getMarshaller().marshal(signature, xbr);
        } catch(JAXBException je){
            //log
            throw new XMLStreamException(je);
        }
        return xbr.getXMLStreamBuffer().readAsXMLStreamReader();
    }
View Full Code Here

     * marshalls the BST element into the XMLStreamBuffer
     * @return XMLStreamReader
     * @throws javax.xml.stream.XMLStreamException
     */
    public XMLStreamReader readHeader() throws XMLStreamException {
        XMLStreamBufferResult xbr = new XMLStreamBufferResult();
        JAXBElement<BinarySecurityTokenType> bstElem =
                new ObjectFactory().createBinarySecurityToken(bst);
        try{
            getMarshaller().marshal(bstElem, xbr);
        }catch(JAXBException je){
            //log here
            throw new XMLStreamException(je);
        }
        return xbr.getXMLStreamBuffer().readAsXMLStreamReader();
    }
View Full Code Here

TOP

Related Classes of com.sun.xml.stream.buffer.XMLStreamBufferResult

Copyright © 2018 www.massapicom. 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.