use of com.sun.xml.ws.api.pipe.Codec in project metro-jax-ws by eclipse-ee4j.
the class ReferenceParametersTest method useStreamCodec.
Message useStreamCodec(String msg) throws IOException {
Codec codec = Codecs.createSOAPEnvelopeXmlCodec(SOAPVersion.SOAP_11);
Packet packet = new Packet();
ByteArrayInputStream in = new ByteArrayInputStream(msg.getBytes());
codec.decode(in, "text/xml", packet);
return packet.getMessage();
}
use of com.sun.xml.ws.api.pipe.Codec in project metro-jax-ws by eclipse-ee4j.
the class ReferenceParametersTest method useStream12Codec.
Message useStream12Codec(String msg) throws IOException {
Codec codec = Codecs.createSOAPEnvelopeXmlCodec(SOAPVersion.SOAP_12);
Packet packet = new Packet();
ByteArrayInputStream in = new ByteArrayInputStream(msg.getBytes());
codec.decode(in, "application/soap+xml", packet);
return packet.getMessage();
}
use of com.sun.xml.ws.api.pipe.Codec in project metro-jax-ws by eclipse-ee4j.
the class Test method useStream12Codec.
public static Message useStream12Codec(String msg) throws IOException {
Codec codec = Codecs.createSOAPEnvelopeXmlCodec(SOAPVersion.SOAP_12);
Packet packet = new Packet();
ByteArrayInputStream in = new ByteArrayInputStream(msg.getBytes());
codec.decode(in, "application/soap+xml", packet);
return packet.getMessage();
}
use of com.sun.xml.ws.api.pipe.Codec in project metro-jax-ws by eclipse-ee4j.
the class StreamMessageCopyTest method createSOAP11StreamMessage.
private StreamMessage createSOAP11StreamMessage(String msg) throws IOException {
Codec codec = Codecs.createSOAPEnvelopeXmlCodec(SOAPVersion.SOAP_11);
Packet packet = new Packet();
ByteArrayInputStream in = new ByteArrayInputStream(msg.getBytes("utf-8"));
codec.decode(in, "text/xml", packet);
return (StreamMessage) packet.getMessage();
}
Aggregations