Methods Summary |
---|
public static com.sun.xml.ws.transport.tcp.encoding.WSTCPFastInfosetStreamCodec | create(com.sun.xml.ws.api.pipe.StreamSOAPCodec soapCodec, com.sun.xml.ws.api.SOAPVersion version, com.sun.xml.ws.transport.tcp.encoding.WSTCPFastInfosetStreamReaderRecyclable.RecycleAwareListener readerRecycleListener, boolean retainState)Creates a new {@link FastInfosetStreamSOAPCodec} instance.
if(version==null)
// this decoder is for SOAP, not for XML/HTTP
throw new IllegalArgumentException();
switch(version) {
case SOAP_11:
return new WSTCPFastInfosetStreamSOAP11Codec(soapCodec, readerRecycleListener, retainState);
case SOAP_12:
return new WSTCPFastInfosetStreamSOAP12Codec(soapCodec, readerRecycleListener, retainState);
default:
throw new AssertionError();
}
|
protected abstract com.sun.xml.ws.message.stream.StreamHeader | createHeader(javax.xml.stream.XMLStreamReader reader, com.sun.xml.stream.buffer.XMLStreamBuffer mark)
|
public void | decode(java.io.InputStream in, java.lang.String contentType, com.sun.xml.ws.api.message.Packet response)
response.setMessage(
_soapCodec.decode(getXMLStreamReader(in)));
|
public void | decode(java.nio.channels.ReadableByteChannel in, java.lang.String contentType, com.sun.xml.ws.api.message.Packet response)
throw new UnsupportedOperationException();
|
public com.sun.xml.ws.api.pipe.ContentType | encode(com.sun.xml.ws.api.message.Packet packet, java.io.OutputStream out)
if (packet.getMessage() != null) {
final XMLStreamWriter writer = getXMLStreamWriter(out);
try {
packet.getMessage().writeTo(writer);
writer.flush();
} catch (XMLStreamException e) {
throw new WebServiceException(e);
}
}
return getContentType(packet.soapAction);
|
public com.sun.xml.ws.api.pipe.ContentType | encode(com.sun.xml.ws.api.message.Packet packet, java.nio.channels.WritableByteChannel buffer)
//TODO: not yet implemented
throw new UnsupportedOperationException();
|
protected abstract com.sun.xml.ws.api.pipe.ContentType | getContentType(java.lang.String soapAction)
|
public java.lang.String | getMimeType()
return _defaultContentType.getContentType();
|
public com.sun.xml.ws.api.pipe.ContentType | getStaticContentType(com.sun.xml.ws.api.message.Packet packet)
return getContentType(packet.soapAction);
|
private javax.xml.stream.XMLStreamReader | getXMLStreamReader(java.io.InputStream in)
if (_statefulParser != null) {
_statefulParser.setInputStream(in);
return _statefulParser;
} else {
StAXDocumentParser parser = new WSTCPFastInfosetStreamReaderRecyclable(in, _readerRecycleListener);
parser.setStringInterning(true);
if (_retainState) {
ParserVocabulary vocabulary = new ParserVocabulary();
parser.setVocabulary(vocabulary);
}
_statefulParser = parser;
return _statefulParser;
}
|
private javax.xml.stream.XMLStreamWriter | getXMLStreamWriter(java.io.OutputStream out)
if (_serializer != null) {
_serializer.setOutputStream(out);
return _serializer;
} else {
StAXDocumentSerializer serializer = new StAXDocumentSerializer(out);
if (_retainState) {
SerializerVocabulary vocabulary = new SerializerVocabulary();
serializer.setVocabulary(vocabulary);
serializer.setAttributeValueSizeLimit(DEFAULT_INDEXED_STRING_SIZE_LIMIT);
serializer.setCharacterContentChunkSizeLimit(DEFAULT_INDEXED_STRING_SIZE_LIMIT);
serializer.setAttributeValueMapMemoryLimit(DEFAULT_INDEXED_STRING_MEMORY_LIMIT);
serializer.setCharacterContentChunkMapMemoryLimit(DEFAULT_INDEXED_STRING_MEMORY_LIMIT);
}
_serializer = serializer;
return serializer;
}
|