com.sun.xml.internal.ws.api.WSFeatureList Java Examples

The following examples show how to use com.sun.xml.internal.ws.api.WSFeatureList. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MtomCodec.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
MtomCodec(SOAPVersion version, StreamSOAPCodec codec, WSFeatureList features){
    super(version, features);
    this.codec = codec;
    sf = features.get(SerializationFeature.class);
    MTOMFeature mtom = features.get(MTOMFeature.class);
    if(mtom == null)
        this.mtomFeature = new MTOMFeature();
    else
        this.mtomFeature = mtom;
}
 
Example #2
Source File: XMLMessage.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public static Message create(DataSource ds, WSFeatureList f) {
    try {
        return (ds == null) ?
            Messages.createEmpty(SOAPVersion.SOAP_11) :
            create(ds.getContentType(), ds.getInputStream(), f);
    } catch(IOException ioe) {
        throw new WebServiceException(ioe);
    }
}
 
Example #3
Source File: StreamSOAPCodec.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public static StreamSOAPCodec create(WSFeatureList features) {
    SOAPVersion version = getSoapVersion(features);
    if(version==null)
        // this decoder is for SOAP, not for XML/HTTP
        throw new IllegalArgumentException();
    switch(version) {
        case SOAP_11:
            return new StreamSOAP11Codec(features);
        case SOAP_12:
            return new StreamSOAP12Codec(features);
        default:
            throw new AssertionError();
    }
}
 
Example #4
Source File: XMLMessage.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public static Message create(final String ct, InputStream in, WSFeatureList f) {
    Message data;
    try {
        in = StreamUtils.hasSomeData(in);
        if (in == null) {
            return Messages.createEmpty(SOAPVersion.SOAP_11);
        }

        if (ct != null) {
            final ContentType contentType = new ContentType(ct);
            final int contentTypeId = identifyContentType(contentType);
            if ((contentTypeId & MIME_MULTIPART_FLAG) != 0) {
                data = new XMLMultiPart(ct, in, f);
            } else if ((contentTypeId & PLAIN_XML_FLAG) != 0) {
                data = new XmlContent(ct, in, f);
            } else {
                data = new UnknownContent(ct, in);
            }
        } else {
            // According to HTTP spec 7.2.1, if the media type remain
            // unknown, treat as application/octet-stream
            data = new UnknownContent("application/octet-stream", in);
        }
    } catch(Exception ex) {
        throw new WebServiceException(ex);
    }
    return data;
}
 
Example #5
Source File: XMLMessage.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public static Message create(final String ct, InputStream in, WSFeatureList f) {
    Message data;
    try {
        in = StreamUtils.hasSomeData(in);
        if (in == null) {
            return Messages.createEmpty(SOAPVersion.SOAP_11);
        }

        if (ct != null) {
            final ContentType contentType = new ContentType(ct);
            final int contentTypeId = identifyContentType(contentType);
            if ((contentTypeId & MIME_MULTIPART_FLAG) != 0) {
                data = new XMLMultiPart(ct, in, f);
            } else if ((contentTypeId & PLAIN_XML_FLAG) != 0) {
                data = new XmlContent(ct, in, f);
            } else {
                data = new UnknownContent(ct, in);
            }
        } else {
            // According to HTTP spec 7.2.1, if the media type remain
            // unknown, treat as application/octet-stream
            data = new UnknownContent("application/octet-stream", in);
        }
    } catch(Exception ex) {
        throw new WebServiceException(ex);
    }
    return data;
}
 
Example #6
Source File: XMLMessage.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public static Message create(DataSource ds, WSFeatureList f) {
    try {
        return (ds == null) ?
            Messages.createEmpty(SOAPVersion.SOAP_11) :
            create(ds.getContentType(), ds.getInputStream(), f);
    } catch(IOException ioe) {
        throw new WebServiceException(ioe);
    }
}
 
Example #7
Source File: MtomCodec.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
MtomCodec(SOAPVersion version, StreamSOAPCodec codec, WSFeatureList features){
    super(version, features);
    this.codec = codec;
    sf = features.get(SerializationFeature.class);
    MTOMFeature mtom = features.get(MTOMFeature.class);
    if(mtom == null)
        this.mtomFeature = new MTOMFeature();
    else
        this.mtomFeature = mtom;
}
 
Example #8
Source File: XMLMessage.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public static Message create(DataSource ds, WSFeatureList f) {
    try {
        return (ds == null) ?
            Messages.createEmpty(SOAPVersion.SOAP_11) :
            create(ds.getContentType(), ds.getInputStream(), f);
    } catch(IOException ioe) {
        throw new WebServiceException(ioe);
    }
}
 
Example #9
Source File: XMLMessage.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public XMLMultiPart(final String contentType, final InputStream is, WSFeatureList f) {
    super(SOAPVersion.SOAP_11);
    headerList = new HeaderList(SOAPVersion.SOAP_11);
    dataSource = createDataSource(contentType, is);
    this.feature = f.get(StreamingAttachmentFeature.class);
    this.features = f;
}
 
Example #10
Source File: StreamSOAPCodec.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public static StreamSOAPCodec create(WSFeatureList features) {
    SOAPVersion version = getSoapVersion(features);
    if(version==null)
        // this decoder is for SOAP, not for XML/HTTP
        throw new IllegalArgumentException();
    switch(version) {
        case SOAP_11:
            return new StreamSOAP11Codec(features);
        case SOAP_12:
            return new StreamSOAP12Codec(features);
        default:
            throw new AssertionError();
    }
}
 
Example #11
Source File: XMLMessage.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public static Message create(final String ct, InputStream in, WSFeatureList f) {
    Message data;
    try {
        in = StreamUtils.hasSomeData(in);
        if (in == null) {
            return Messages.createEmpty(SOAPVersion.SOAP_11);
        }

        if (ct != null) {
            final ContentType contentType = new ContentType(ct);
            final int contentTypeId = identifyContentType(contentType);
            if ((contentTypeId & MIME_MULTIPART_FLAG) != 0) {
                data = new XMLMultiPart(ct, in, f);
            } else if ((contentTypeId & PLAIN_XML_FLAG) != 0) {
                data = new XmlContent(ct, in, f);
            } else {
                data = new UnknownContent(ct, in);
            }
        } else {
            // According to HTTP spec 7.2.1, if the media type remain
            // unknown, treat as application/octet-stream
            data = new UnknownContent("application/octet-stream", in);
        }
    } catch(Exception ex) {
        throw new WebServiceException(ex);
    }
    return data;
}
 
Example #12
Source File: MtomCodec.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
MtomCodec(SOAPVersion version, StreamSOAPCodec codec, WSFeatureList features){
    super(version, features);
    this.codec = codec;
    sf = features.get(SerializationFeature.class);
    MTOMFeature mtom = features.get(MTOMFeature.class);
    if(mtom == null)
        this.mtomFeature = new MTOMFeature();
    else
        this.mtomFeature = mtom;
}
 
Example #13
Source File: XMLMessage.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public XMLMultiPart(final String contentType, final InputStream is, WSFeatureList f) {
    super(SOAPVersion.SOAP_11);
    headerList = new HeaderList(SOAPVersion.SOAP_11);
    dataSource = createDataSource(contentType, is);
    this.feature = f.get(StreamingAttachmentFeature.class);
    this.features = f;
}
 
Example #14
Source File: XMLMessage.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public XmlContent(String ct, InputStream in, WSFeatureList f) {
            super(SOAPVersion.SOAP_11);
            dataSource = new XmlDataSource(ct, in);
            this.headerList = new HeaderList(SOAPVersion.SOAP_11);
//            this.binding = binding;
            features = f;
        }
 
Example #15
Source File: XMLMessage.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public XmlContent(String ct, InputStream in, WSFeatureList f) {
            super(SOAPVersion.SOAP_11);
            dataSource = new XmlDataSource(ct, in);
            this.headerList = new HeaderList(SOAPVersion.SOAP_11);
//            this.binding = binding;
            features = f;
        }
 
Example #16
Source File: XMLMessage.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public XMLMultiPart(final String contentType, final InputStream is, WSFeatureList f) {
    super(SOAPVersion.SOAP_11);
    headerList = new HeaderList(SOAPVersion.SOAP_11);
    dataSource = createDataSource(contentType, is);
    this.feature = f.get(StreamingAttachmentFeature.class);
    this.features = f;
}
 
Example #17
Source File: XMLMessage.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public XmlContent(String ct, InputStream in, WSFeatureList f) {
            super(SOAPVersion.SOAP_11);
            dataSource = new XmlDataSource(ct, in);
            this.headerList = new HeaderList(SOAPVersion.SOAP_11);
//            this.binding = binding;
            features = f;
        }
 
Example #18
Source File: XMLMessage.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public static Message create(DataSource ds, WSFeatureList f) {
    try {
        return (ds == null) ?
            Messages.createEmpty(SOAPVersion.SOAP_11) :
            create(ds.getContentType(), ds.getInputStream(), f);
    } catch(IOException ioe) {
        throw new WebServiceException(ioe);
    }
}
 
Example #19
Source File: XMLMessage.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public static Message create(final String ct, InputStream in, WSFeatureList f) {
    Message data;
    try {
        in = StreamUtils.hasSomeData(in);
        if (in == null) {
            return Messages.createEmpty(SOAPVersion.SOAP_11);
        }

        if (ct != null) {
            final ContentType contentType = new ContentType(ct);
            final int contentTypeId = identifyContentType(contentType);
            if ((contentTypeId & MIME_MULTIPART_FLAG) != 0) {
                data = new XMLMultiPart(ct, in, f);
            } else if ((contentTypeId & PLAIN_XML_FLAG) != 0) {
                data = new XmlContent(ct, in, f);
            } else {
                data = new UnknownContent(ct, in);
            }
        } else {
            // According to HTTP spec 7.2.1, if the media type remain
            // unknown, treat as application/octet-stream
            data = new UnknownContent("application/octet-stream", in);
        }
    } catch(Exception ex) {
        throw new WebServiceException(ex);
    }
    return data;
}
 
Example #20
Source File: StreamSOAPCodec.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public static StreamSOAPCodec create(WSFeatureList features) {
    SOAPVersion version = getSoapVersion(features);
    if(version==null)
        // this decoder is for SOAP, not for XML/HTTP
        throw new IllegalArgumentException();
    switch(version) {
        case SOAP_11:
            return new StreamSOAP11Codec(features);
        case SOAP_12:
            return new StreamSOAP12Codec(features);
        default:
            throw new AssertionError();
    }
}
 
Example #21
Source File: MtomCodec.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
MtomCodec(SOAPVersion version, StreamSOAPCodec codec, WSFeatureList features){
    super(version, features);
    this.codec = codec;
    sf = features.get(SerializationFeature.class);
    MTOMFeature mtom = features.get(MTOMFeature.class);
    if(mtom == null)
        this.mtomFeature = new MTOMFeature();
    else
        this.mtomFeature = mtom;
}
 
Example #22
Source File: StreamSOAPCodec.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public static StreamSOAPCodec create(WSFeatureList features) {
    SOAPVersion version = getSoapVersion(features);
    if(version==null)
        // this decoder is for SOAP, not for XML/HTTP
        throw new IllegalArgumentException();
    switch(version) {
        case SOAP_11:
            return new StreamSOAP11Codec(features);
        case SOAP_12:
            return new StreamSOAP12Codec(features);
        default:
            throw new AssertionError();
    }
}
 
Example #23
Source File: XMLMessage.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public static Message create(final String ct, InputStream in, WSFeatureList f) {
    Message data;
    try {
        in = StreamUtils.hasSomeData(in);
        if (in == null) {
            return Messages.createEmpty(SOAPVersion.SOAP_11);
        }

        if (ct != null) {
            final ContentType contentType = new ContentType(ct);
            final int contentTypeId = identifyContentType(contentType);
            if ((contentTypeId & MIME_MULTIPART_FLAG) != 0) {
                data = new XMLMultiPart(ct, in, f);
            } else if ((contentTypeId & PLAIN_XML_FLAG) != 0) {
                data = new XmlContent(ct, in, f);
            } else {
                data = new UnknownContent(ct, in);
            }
        } else {
            // According to HTTP spec 7.2.1, if the media type remain
            // unknown, treat as application/octet-stream
            data = new UnknownContent("application/octet-stream", in);
        }
    } catch(Exception ex) {
        throw new WebServiceException(ex);
    }
    return data;
}
 
Example #24
Source File: XMLMessage.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public static Message create(DataSource ds, WSFeatureList f) {
    try {
        return (ds == null) ?
            Messages.createEmpty(SOAPVersion.SOAP_11) :
            create(ds.getContentType(), ds.getInputStream(), f);
    } catch(IOException ioe) {
        throw new WebServiceException(ioe);
    }
}
 
Example #25
Source File: StreamSOAPCodec.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public static StreamSOAPCodec create(WSFeatureList features) {
    SOAPVersion version = getSoapVersion(features);
    if(version==null)
        // this decoder is for SOAP, not for XML/HTTP
        throw new IllegalArgumentException();
    switch(version) {
        case SOAP_11:
            return new StreamSOAP11Codec(features);
        case SOAP_12:
            return new StreamSOAP12Codec(features);
        default:
            throw new AssertionError();
    }
}
 
Example #26
Source File: StreamSOAPCodec.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
StreamSOAPCodec(WSFeatureList features) {
    this(getSoapVersion(features), features.get(SerializationFeature.class));
}
 
Example #27
Source File: EndpointFactory.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
private static boolean isSecureXmlProcessingDisabled(WSFeatureList featureList) {
    // TODO-Miran: would it be necessary to disable secure xml processing?
    return false;
}
 
Example #28
Source File: MimeCodec.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
protected MimeCodec(SOAPVersion version, WSFeatureList f) {
    this.version = version;
    this.features = f;
}
 
Example #29
Source File: SwACodec.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
public SwACodec(SOAPVersion version, WSFeatureList f, Codec rootCodec) {
    super(version, f);
    this.mimeRootCodec = rootCodec;
}
 
Example #30
Source File: MonitorRootService.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
@ManagedAttribute
@Description("Binding features")
public @NotNull WSFeatureList features() {
    return endpoint.getBinding().getFeatures();
}