@Override public void decode(InputStream in, String ct, Packet p) throws IOException { getCodec().decode(in, ct, p); }
@Override public void decode(InputStream in, String ct, Packet p) throws IOException { getCodec().decode(in, ct, p); }
@Override public void decode(InputStream in, String ct, Packet p) throws IOException { getCodec().decode(in, ct, p); }
public com.oracle.webservices.api.message.MessageContext createContext(InputStream in, String contentType) throws IOException { throwIfIllegalMessageArgument(in); //TODO when do we use xmlCodec? Packet p = packet(null); soapCodec.decode(in, contentType, p); return p; }
public com.oracle.webservices.api.message.MessageContext createContext(InputStream in, String contentType) throws IOException { throwIfIllegalMessageArgument(in); //TODO when do we use xmlCodec? Packet p = packet(null); soapCodec.decode(in, contentType, p); return p; }
public com.oracle.webservices.api.message.MessageContext createContext(InputStream in, String contentType) throws IOException { throwIfIllegalMessageArgument(in); //TODO when do we use xmlCodec? Packet p = packet(null); soapCodec.decode(in, contentType, p); return p; }
xmlCodec.decode(in, contentType, packet); } else if (isMultipartRelated(contentType)) { packet.setMessage(new XMLMultiPart(contentType, in, features)); fiCodec.decode(in, contentType, packet); } else if (isXml(contentType)) { xmlCodec.decode(in, contentType, packet); } else { packet.setMessage(new UnknownContent(contentType, in));
@Override protected void decode(MimeMultipartParser mpp, Packet packet) throws IOException { // TODO: handle attachments correctly Attachment root = mpp.getRootPart(); Codec rootCodec = getMimeRootCodec(packet); if (rootCodec instanceof RootOnlyCodec) { ((RootOnlyCodec)rootCodec).decode(root.asInputStream(),root.getContentType(),packet, new MimeAttachmentSet(mpp)); } else { rootCodec.decode(root.asInputStream(),root.getContentType(),packet); Map<String, Attachment> atts = mpp.getAttachmentParts(); for(Map.Entry<String, Attachment> att : atts.entrySet()) { packet.getMessage().getAttachments().add(att.getValue()); } } }
@Override protected void decode(MimeMultipartParser mpp, Packet packet) throws IOException { // TODO: handle attachments correctly Attachment root = mpp.getRootPart(); Codec rootCodec = getMimeRootCodec(packet); if (rootCodec instanceof RootOnlyCodec) { ((RootOnlyCodec)rootCodec).decode(root.asInputStream(),root.getContentType(),packet, new MimeAttachmentSet(mpp)); } else { rootCodec.decode(root.asInputStream(),root.getContentType(),packet); Map<String, Attachment> atts = mpp.getAttachmentParts(); for(Map.Entry<String, Attachment> att : atts.entrySet()) { packet.getMessage().getAttachments().add(att.getValue()); } } }
@Override protected void decode(MimeMultipartParser mpp, Packet packet) throws IOException { // TODO: handle attachments correctly Attachment root = mpp.getRootPart(); Codec rootCodec = getMimeRootCodec(packet); if (rootCodec instanceof RootOnlyCodec) { ((RootOnlyCodec)rootCodec).decode(root.asInputStream(),root.getContentType(),packet, new MimeAttachmentSet(mpp)); } else { rootCodec.decode(root.asInputStream(),root.getContentType(),packet); Map<String, Attachment> atts = mpp.getAttachmentParts(); for(Map.Entry<String, Attachment> att : atts.entrySet()) { packet.getMessage().getAttachments().add(att.getValue()); } } }
private void handle(JmsServerTransport connection) throws IOException { this.connection = connection; String contentTypeStr = connection.getRequestContentType(); InputStream in = connection.getInputStream(); Packet packet = new Packet(); codec.decode(in, contentTypeStr, packet); packet.invocationProperties.put(BindingProvider.USERNAME_PROPERTY, connection.getRequestUsername()); packet.invocationProperties.put(BindingProvider.PASSWORD_PROPERTY, connection.getRequestPassword()); try { packet = head.process(packet, connection, this); } catch (Exception e) { throw new WebServiceException("Error during message processing", e); } if (packet.getMessage() != null) { connection.setMustReply(true); contentTypeStr = codec.getStaticContentType(packet).getContentType(); if (contentTypeStr == null) { throw new UnsupportedOperationException(); } else { connection.setResponseContentType(contentTypeStr); codec.encode(packet, connection.getOutputStream()); } } }
public void decode(ReadableByteChannel in, String contentType, Packet packet) { if (contentType == null) { throw new UnsupportedMediaException(); } preDecode(packet); try { if(isMultipartRelated(contentType)) super.decode(in, contentType, packet); else if(isFastInfoset(contentType)) { if (packet.contentNegotiation == ContentNegotiation.none) throw noFastInfosetForDecoding(); useFastInfosetForEncoding = true; fiSoapCodec.decode(in, contentType, packet); } else xmlSoapCodec.decode(in, contentType, packet); } catch(RuntimeException we) { if (we instanceof ExceptionHasMessage || we instanceof UnsupportedMediaException) { throw we; } else { throw new MessageCreationException(version, we); } } postDecode(packet); }
public void decode(ReadableByteChannel in, String contentType, Packet packet) { if (contentType == null) { throw new UnsupportedMediaException(); } preDecode(packet); try { if(isMultipartRelated(contentType)) super.decode(in, contentType, packet); else if(isFastInfoset(contentType)) { if (packet.contentNegotiation == ContentNegotiation.none) throw noFastInfosetForDecoding(); useFastInfosetForEncoding = true; fiSoapCodec.decode(in, contentType, packet); } else xmlSoapCodec.decode(in, contentType, packet); } catch(RuntimeException we) { if (we instanceof ExceptionHasMessage || we instanceof UnsupportedMediaException) { throw we; } else { throw new MessageCreationException(version, we); } } postDecode(packet); }
public void decode(ReadableByteChannel in, String contentType, Packet packet) { if (contentType == null) { throw new UnsupportedMediaException(); } preDecode(packet); try { if(isMultipartRelated(contentType)) super.decode(in, contentType, packet); else if(isFastInfoset(contentType)) { if (packet.contentNegotiation == ContentNegotiation.none) throw noFastInfosetForDecoding(); useFastInfosetForEncoding = true; fiSoapCodec.decode(in, contentType, packet); } else xmlSoapCodec.decode(in, contentType, packet); } catch(RuntimeException we) { if (we instanceof ExceptionHasMessage || we instanceof UnsupportedMediaException) { throw we; } else { throw new MessageCreationException(version, we); } } postDecode(packet); }
private Packet decodePacket(@NotNull WSHTTPConnection con, @NotNull Codec codec) throws IOException { String ct = con.getRequestHeader("Content-Type"); InputStream in = con.getInput(); Packet packet = new Packet(); packet.soapAction = fixQuotesAroundSoapAction(con.getRequestHeader("SOAPAction")); packet.wasTransportSecure = con.isSecure(); packet.acceptableMimeTypes = con.getRequestHeader("Accept"); packet.addSatellite(con); addSatellites(packet); packet.isAdapterDeliversNonAnonymousResponse = true; packet.component = this; packet.transportBackChannel = new Oneway(con); packet.webServiceContextDelegate = con.getWebServiceContextDelegate(); packet.setState(Packet.State.ServerRequest); if (dump || LOGGER.isLoggable(Level.FINER)) { ByteArrayBuffer buf = new ByteArrayBuffer(); buf.write(in); in.close(); dump(buf, "HTTP request", con.getRequestHeaders()); in = buf.newInputStream(); } codec.decode(in, ct, packet); return packet; }
private Packet decodePacket(@NotNull WSHTTPConnection con, @NotNull Codec codec) throws IOException { String ct = con.getRequestHeader("Content-Type"); InputStream in = con.getInput(); Packet packet = new Packet(); packet.soapAction = fixQuotesAroundSoapAction(con.getRequestHeader("SOAPAction")); packet.wasTransportSecure = con.isSecure(); packet.acceptableMimeTypes = con.getRequestHeader("Accept"); packet.addSatellite(con); addSatellites(packet); packet.isAdapterDeliversNonAnonymousResponse = true; packet.component = this; packet.transportBackChannel = new Oneway(con); packet.webServiceContextDelegate = con.getWebServiceContextDelegate(); packet.setState(Packet.State.ServerRequest); if (dump || LOGGER.isLoggable(Level.FINER)) { ByteArrayBuffer buf = new ByteArrayBuffer(); buf.write(in); in.close(); dump(buf, "HTTP request", con.getRequestHeaders()); in = buf.newInputStream(); } codec.decode(in, ct, packet); return packet; }
public void decode(InputStream in, String contentType, Packet packet) throws IOException { if (contentType == null) { contentType = xmlMimeType; } packet.setContentType(new ContentTypeImpl(contentType)); preDecode(packet); try { if(isMultipartRelated(contentType)) // parse the multipart portion and then decide whether it's MTOM or SwA super.decode(in, contentType, packet); else if(isFastInfoset(contentType)) { if (!ignoreContentNegotiationProperty && packet.contentNegotiation == ContentNegotiation.none) throw noFastInfosetForDecoding(); useFastInfosetForEncoding = true; fiSoapCodec.decode(in, contentType, packet); } else xmlSoapCodec.decode(in, contentType, packet); } catch(RuntimeException we) { if (we instanceof ExceptionHasMessage || we instanceof UnsupportedMediaException) { throw we; } else { throw new MessageCreationException(version, we); } } postDecode(packet); }
private Packet decodePacket(@NotNull WSHTTPConnection con, @NotNull Codec codec) throws IOException { String ct = con.getRequestHeader("Content-Type"); InputStream in = con.getInput(); Packet packet = new Packet(); packet.soapAction = fixQuotesAroundSoapAction(con.getRequestHeader("SOAPAction")); packet.wasTransportSecure = con.isSecure(); packet.acceptableMimeTypes = con.getRequestHeader("Accept"); packet.addSatellite(con); addSatellites(packet); packet.isAdapterDeliversNonAnonymousResponse = true; packet.component = this; packet.transportBackChannel = new Oneway(con); packet.webServiceContextDelegate = con.getWebServiceContextDelegate(); packet.setState(Packet.State.ServerRequest); if (dump || LOGGER.isLoggable(Level.FINER)) { ByteArrayBuffer buf = new ByteArrayBuffer(); buf.write(in); in.close(); dump(buf, "HTTP request", con.getRequestHeaders()); in = buf.newInputStream(); } codec.decode(in, ct, packet); return packet; }
public void decode(InputStream in, String contentType, Packet packet) throws IOException { if (contentType == null) { contentType = xmlMimeType; } packet.setContentType(new ContentTypeImpl(contentType)); preDecode(packet); try { if(isMultipartRelated(contentType)) // parse the multipart portion and then decide whether it's MTOM or SwA super.decode(in, contentType, packet); else if(isFastInfoset(contentType)) { if (!ignoreContentNegotiationProperty && packet.contentNegotiation == ContentNegotiation.none) throw noFastInfosetForDecoding(); useFastInfosetForEncoding = true; fiSoapCodec.decode(in, contentType, packet); } else xmlSoapCodec.decode(in, contentType, packet); } catch(RuntimeException we) { if (we instanceof ExceptionHasMessage || we instanceof UnsupportedMediaException) { throw we; } else { throw new MessageCreationException(version, we); } } postDecode(packet); }
public void decode(InputStream in, String contentType, Packet packet) throws IOException { if (contentType == null) { contentType = xmlMimeType; } packet.setContentType(new ContentTypeImpl(contentType)); preDecode(packet); try { if(isMultipartRelated(contentType)) // parse the multipart portion and then decide whether it's MTOM or SwA super.decode(in, contentType, packet); else if(isFastInfoset(contentType)) { if (!ignoreContentNegotiationProperty && packet.contentNegotiation == ContentNegotiation.none) throw noFastInfosetForDecoding(); useFastInfosetForEncoding = true; fiSoapCodec.decode(in, contentType, packet); } else xmlSoapCodec.decode(in, contentType, packet); } catch(RuntimeException we) { if (we instanceof ExceptionHasMessage || we instanceof UnsupportedMediaException) { throw we; } else { throw new MessageCreationException(version, we); } } postDecode(packet); }