Java源码示例:com.sun.xml.internal.ws.api.WSFeatureList
示例1
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();
}
}
示例2
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;
}
示例3
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);
}
}
示例4
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);
}
}
示例5
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;
}
示例6
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;
}
示例7
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();
}
}
示例8
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;
}
示例9
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();
}
}
示例10
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;
}
示例11
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);
}
}
示例12
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;
}
示例13
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;
}
示例14
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;
}
示例15
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();
}
}
示例16
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;
}
示例17
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);
}
}
示例18
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;
}
示例19
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;
}
示例20
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;
}
示例21
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();
}
}
示例22
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;
}
示例23
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;
}
示例24
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);
}
}
示例25
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;
}
示例26
@ManagedAttribute
@Description("Binding features")
public @NotNull WSFeatureList features() {
return endpoint.getBinding().getFeatures();
}
示例27
StreamSOAP12Codec(WSFeatureList features) {
super(features);
}
示例28
StreamSOAP11Codec(WSFeatureList features) {
super(features);
}
示例29
StreamSOAPCodec(WSFeatureList features) {
this(getSoapVersion(features), features.get(SerializationFeature.class));
}
示例30
StreamSOAP12Codec(WSFeatureList features) {
super(features);
}