com.sun.xml.internal.ws.encoding.xml.XMLMessage Java Examples
The following examples show how to use
com.sun.xml.internal.ws.encoding.xml.XMLMessage.
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: XMLHTTPBindingCodec.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
private ContentType encode(MessageDataSource mds, OutputStream out) { try { final boolean isFastInfoset = XMLMessage.isFastInfoset( mds.getDataSource().getContentType()); DataSource ds = transformDataSource(mds.getDataSource(), isFastInfoset, useFastInfosetForEncoding, features); InputStream is = ds.getInputStream(); byte[] buf = new byte[1024]; int count; while((count=is.read(buf)) != -1) { out.write(buf, 0, count); } return new ContentTypeImpl(ds.getContentType()); } catch(IOException ioe) { throw new WebServiceException(ioe); } }
Example #2
Source File: XMLHTTPBindingCodec.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
private ContentType encode(MessageDataSource mds, OutputStream out) { try { final boolean isFastInfoset = XMLMessage.isFastInfoset( mds.getDataSource().getContentType()); DataSource ds = transformDataSource(mds.getDataSource(), isFastInfoset, useFastInfosetForEncoding, features); InputStream is = ds.getInputStream(); byte[] buf = new byte[1024]; int count; while((count=is.read(buf)) != -1) { out.write(buf, 0, count); } return new ContentTypeImpl(ds.getContentType()); } catch(IOException ioe) { throw new WebServiceException(ioe); } }
Example #3
Source File: XMLHTTPBindingCodec.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
private ContentType encode(MessageDataSource mds, OutputStream out) { try { final boolean isFastInfoset = XMLMessage.isFastInfoset( mds.getDataSource().getContentType()); DataSource ds = transformDataSource(mds.getDataSource(), isFastInfoset, useFastInfosetForEncoding, features); InputStream is = ds.getInputStream(); byte[] buf = new byte[1024]; int count; while((count=is.read(buf)) != -1) { out.write(buf, 0, count); } return new ContentTypeImpl(ds.getContentType()); } catch(IOException ioe) { throw new WebServiceException(ioe); } }
Example #4
Source File: XMLHTTPBindingCodec.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
private ContentType encode(MessageDataSource mds, OutputStream out) { try { final boolean isFastInfoset = XMLMessage.isFastInfoset( mds.getDataSource().getContentType()); DataSource ds = transformDataSource(mds.getDataSource(), isFastInfoset, useFastInfosetForEncoding, features); InputStream is = ds.getInputStream(); byte[] buf = new byte[1024]; int count; while((count=is.read(buf)) != -1) { out.write(buf, 0, count); } return new ContentTypeImpl(ds.getContentType()); } catch(IOException ioe) { throw new WebServiceException(ioe); } }
Example #5
Source File: XMLHTTPBindingCodec.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
private ContentType encode(MessageDataSource mds, OutputStream out) { try { final boolean isFastInfoset = XMLMessage.isFastInfoset( mds.getDataSource().getContentType()); DataSource ds = transformDataSource(mds.getDataSource(), isFastInfoset, useFastInfosetForEncoding, features); InputStream is = ds.getInputStream(); byte[] buf = new byte[1024]; int count; while((count=is.read(buf)) != -1) { out.write(buf, 0, count); } return new ContentTypeImpl(ds.getContentType()); } catch(IOException ioe) { throw new WebServiceException(ioe); } }
Example #6
Source File: XMLHTTPBindingCodec.java From hottub with GNU General Public License v2.0 | 6 votes |
private ContentType encode(MessageDataSource mds, OutputStream out) { try { final boolean isFastInfoset = XMLMessage.isFastInfoset( mds.getDataSource().getContentType()); DataSource ds = transformDataSource(mds.getDataSource(), isFastInfoset, useFastInfosetForEncoding, features); InputStream is = ds.getInputStream(); byte[] buf = new byte[1024]; int count; while((count=is.read(buf)) != -1) { out.write(buf, 0, count); } return new ContentTypeImpl(ds.getContentType()); } catch(IOException ioe) { throw new WebServiceException(ioe); } }
Example #7
Source File: XMLHTTPBindingCodec.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
private ContentType encode(MessageDataSource mds, OutputStream out) { try { final boolean isFastInfoset = XMLMessage.isFastInfoset( mds.getDataSource().getContentType()); DataSource ds = transformDataSource(mds.getDataSource(), isFastInfoset, useFastInfosetForEncoding, features); InputStream is = ds.getInputStream(); byte[] buf = new byte[1024]; int count; while((count=is.read(buf)) != -1) { out.write(buf, 0, count); } return new ContentTypeImpl(ds.getContentType()); } catch(IOException ioe) { throw new WebServiceException(ioe); } }
Example #8
Source File: XMLHTTPBindingCodec.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
private ContentType encode(MessageDataSource mds, OutputStream out) { try { final boolean isFastInfoset = XMLMessage.isFastInfoset( mds.getDataSource().getContentType()); DataSource ds = transformDataSource(mds.getDataSource(), isFastInfoset, useFastInfosetForEncoding, features); InputStream is = ds.getInputStream(); byte[] buf = new byte[1024]; int count; while((count=is.read(buf)) != -1) { out.write(buf, 0, count); } return new ContentTypeImpl(ds.getContentType()); } catch(IOException ioe) { throw new WebServiceException(ioe); } }
Example #9
Source File: XMLHTTPBindingCodec.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
private ContentType getStaticContentType(MessageDataSource mds) { final String contentType = mds.getDataSource().getContentType(); final boolean isFastInfoset = XMLMessage.isFastInfoset(contentType); if (!requiresTransformationOfDataSource(isFastInfoset, useFastInfosetForEncoding)) { return new ContentTypeImpl(contentType); } else { return null; } }
Example #10
Source File: DataSourceDispatch.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
Packet createPacket(DataSource arg) { switch (mode) { case PAYLOAD: throw new IllegalArgumentException("DataSource use is not allowed in Service.Mode.PAYLOAD\n"); case MESSAGE: return new Packet(XMLMessage.create(arg, binding.getFeatures())); default: throw new WebServiceException("Unrecognized message mode"); } }
Example #11
Source File: XMLHTTPBindingCodec.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
private ContentType getStaticContentType(MessageDataSource mds) { final String contentType = mds.getDataSource().getContentType(); final boolean isFastInfoset = XMLMessage.isFastInfoset(contentType); if (!requiresTransformationOfDataSource(isFastInfoset, useFastInfosetForEncoding)) { return new ContentTypeImpl(contentType); } else { return null; } }
Example #12
Source File: RESTSourceDispatch.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
@Override Source toReturnValue(Packet response) { Message msg = response.getMessage(); try { return new StreamSource(XMLMessage.getDataSource(msg, binding.getFeatures()).getInputStream()); } catch (IOException e) { throw new RuntimeException(e); } }
Example #13
Source File: RESTSourceDispatch.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
@Override Source toReturnValue(Packet response) { Message msg = response.getMessage(); try { return new StreamSource(XMLMessage.getDataSource(msg, binding.getFeatures()).getInputStream()); } catch (IOException e) { throw new RuntimeException(e); } }
Example #14
Source File: DataSourceDispatch.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
Packet createPacket(DataSource arg) { switch (mode) { case PAYLOAD: throw new IllegalArgumentException("DataSource use is not allowed in Service.Mode.PAYLOAD\n"); case MESSAGE: return new Packet(XMLMessage.create(arg, binding.getFeatures())); default: throw new WebServiceException("Unrecognized message mode"); } }
Example #15
Source File: XMLHTTPBindingCodec.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
private ContentType getStaticContentType(MessageDataSource mds) { final String contentType = mds.getDataSource().getContentType(); final boolean isFastInfoset = XMLMessage.isFastInfoset(contentType); if (!requiresTransformationOfDataSource(isFastInfoset, useFastInfosetForEncoding)) { return new ContentTypeImpl(contentType); } else { return null; } }
Example #16
Source File: XMLHTTPBindingCodec.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
private ContentType getStaticContentType(MessageDataSource mds) { final String contentType = mds.getDataSource().getContentType(); final boolean isFastInfoset = XMLMessage.isFastInfoset(contentType); if (!requiresTransformationOfDataSource(isFastInfoset, useFastInfosetForEncoding)) { return new ContentTypeImpl(contentType); } else { return null; } }
Example #17
Source File: RESTSourceDispatch.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
@Override Source toReturnValue(Packet response) { Message msg = response.getMessage(); try { return new StreamSource(XMLMessage.getDataSource(msg, binding.getFeatures()).getInputStream()); } catch (IOException e) { throw new RuntimeException(e); } }
Example #18
Source File: DataSourceDispatch.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
Packet createPacket(DataSource arg) { switch (mode) { case PAYLOAD: throw new IllegalArgumentException("DataSource use is not allowed in Service.Mode.PAYLOAD\n"); case MESSAGE: return new Packet(XMLMessage.create(arg, binding.getFeatures())); default: throw new WebServiceException("Unrecognized message mode"); } }
Example #19
Source File: RESTSourceDispatch.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
@Override Source toReturnValue(Packet response) { Message msg = response.getMessage(); try { return new StreamSource(XMLMessage.getDataSource(msg, binding.getFeatures()).getInputStream()); } catch (IOException e) { throw new RuntimeException(e); } }
Example #20
Source File: DataSourceDispatch.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
Packet createPacket(DataSource arg) { switch (mode) { case PAYLOAD: throw new IllegalArgumentException("DataSource use is not allowed in Service.Mode.PAYLOAD\n"); case MESSAGE: return new Packet(XMLMessage.create(arg, binding.getFeatures())); default: throw new WebServiceException("Unrecognized message mode"); } }
Example #21
Source File: XMLHTTPBindingCodec.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
private ContentType getStaticContentType(MessageDataSource mds) { final String contentType = mds.getDataSource().getContentType(); final boolean isFastInfoset = XMLMessage.isFastInfoset(contentType); if (!requiresTransformationOfDataSource(isFastInfoset, useFastInfosetForEncoding)) { return new ContentTypeImpl(contentType); } else { return null; } }
Example #22
Source File: RESTSourceDispatch.java From hottub with GNU General Public License v2.0 | 5 votes |
@Override Source toReturnValue(Packet response) { Message msg = response.getMessage(); try { return new StreamSource(XMLMessage.getDataSource(msg, binding.getFeatures()).getInputStream()); } catch (IOException e) { throw new RuntimeException(e); } }
Example #23
Source File: DataSourceDispatch.java From hottub with GNU General Public License v2.0 | 5 votes |
Packet createPacket(DataSource arg) { switch (mode) { case PAYLOAD: throw new IllegalArgumentException("DataSource use is not allowed in Service.Mode.PAYLOAD\n"); case MESSAGE: return new Packet(XMLMessage.create(arg, binding.getFeatures())); default: throw new WebServiceException("Unrecognized message mode"); } }
Example #24
Source File: XMLHTTPBindingCodec.java From hottub with GNU General Public License v2.0 | 5 votes |
private ContentType getStaticContentType(MessageDataSource mds) { final String contentType = mds.getDataSource().getContentType(); final boolean isFastInfoset = XMLMessage.isFastInfoset(contentType); if (!requiresTransformationOfDataSource(isFastInfoset, useFastInfosetForEncoding)) { return new ContentTypeImpl(contentType); } else { return null; } }
Example #25
Source File: RESTSourceDispatch.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
@Override Source toReturnValue(Packet response) { Message msg = response.getMessage(); try { return new StreamSource(XMLMessage.getDataSource(msg, binding.getFeatures()).getInputStream()); } catch (IOException e) { throw new RuntimeException(e); } }
Example #26
Source File: DataSourceDispatch.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
Packet createPacket(DataSource arg) { switch (mode) { case PAYLOAD: throw new IllegalArgumentException("DataSource use is not allowed in Service.Mode.PAYLOAD\n"); case MESSAGE: return new Packet(XMLMessage.create(arg, binding.getFeatures())); default: throw new WebServiceException("Unrecognized message mode"); } }
Example #27
Source File: XMLHTTPBindingCodec.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
private ContentType getStaticContentType(MessageDataSource mds) { final String contentType = mds.getDataSource().getContentType(); final boolean isFastInfoset = XMLMessage.isFastInfoset(contentType); if (!requiresTransformationOfDataSource(isFastInfoset, useFastInfosetForEncoding)) { return new ContentTypeImpl(contentType); } else { return null; } }
Example #28
Source File: RESTSourceDispatch.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
@Override Source toReturnValue(Packet response) { Message msg = response.getMessage(); try { return new StreamSource(XMLMessage.getDataSource(msg, binding.getFeatures()).getInputStream()); } catch (IOException e) { throw new RuntimeException(e); } }
Example #29
Source File: DataSourceDispatch.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
Packet createPacket(DataSource arg) { switch (mode) { case PAYLOAD: throw new IllegalArgumentException("DataSource use is not allowed in Service.Mode.PAYLOAD\n"); case MESSAGE: return new Packet(XMLMessage.create(arg, binding.getFeatures())); default: throw new WebServiceException("Unrecognized message mode"); } }
Example #30
Source File: XMLHTTPBindingCodec.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
private ContentType getStaticContentType(MessageDataSource mds) { final String contentType = mds.getDataSource().getContentType(); final boolean isFastInfoset = XMLMessage.isFastInfoset(contentType); if (!requiresTransformationOfDataSource(isFastInfoset, useFastInfosetForEncoding)) { return new ContentTypeImpl(contentType); } else { return null; } }