public ContentType getStaticContentType(Packet packet) { ContentType ct = (ContentType) packet.getInternalContentType(); if ( ct != null ) return ct; Message msg = packet.getMessage(); boolean hasAttachments = !msg.getAttachments().isEmpty(); Codec rootCodec = getMimeRootCodec(packet); if (hasAttachments) { String boundary = "uuid:" + UUID.randomUUID().toString(); String boundaryParameter = "boundary=\"" + boundary + "\""; // TODO use primaryEncoder to get type String messageContentType = MULTIPART_RELATED_MIME_TYPE + "; type=\"" + rootCodec.getMimeType() + "\"; " + boundaryParameter; ContentTypeImpl impl = new ContentTypeImpl(messageContentType, packet.soapAction, null); impl.setBoundary(boundary); impl.setBoundaryParameter(boundaryParameter); packet.setContentType(impl); return impl; } else { ct = rootCodec.getStaticContentType(packet); packet.setContentType(ct); return ct; } }
public ContentType getStaticContentType(Packet packet) { ContentType ct = (ContentType) packet.getInternalContentType(); if ( ct != null ) return ct; Message msg = packet.getMessage(); boolean hasAttachments = !msg.getAttachments().isEmpty(); Codec rootCodec = getMimeRootCodec(packet); if (hasAttachments) { String boundary = "uuid:" + UUID.randomUUID().toString(); String boundaryParameter = "boundary=\"" + boundary + "\""; // TODO use primaryEncoder to get type String messageContentType = MULTIPART_RELATED_MIME_TYPE + "; type=\"" + rootCodec.getMimeType() + "\"; " + boundaryParameter; ContentTypeImpl impl = new ContentTypeImpl(messageContentType, packet.soapAction, null); impl.setBoundary(boundary); impl.setBoundaryParameter(boundaryParameter); packet.setContentType(impl); return impl; } else { ct = rootCodec.getStaticContentType(packet); packet.setContentType(ct); return ct; } }
public ContentType getStaticContentType(Packet packet) { ContentType ct = (ContentType) packet.getInternalContentType(); if ( ct != null ) return ct; Message msg = packet.getMessage(); boolean hasAttachments = !msg.getAttachments().isEmpty(); Codec rootCodec = getMimeRootCodec(packet); if (hasAttachments) { String boundary = "uuid:" + UUID.randomUUID().toString(); String boundaryParameter = "boundary=\"" + boundary + "\""; // TODO use primaryEncoder to get type String messageContentType = MULTIPART_RELATED_MIME_TYPE + "; type=\"" + rootCodec.getMimeType() + "\"; " + boundaryParameter; ContentTypeImpl impl = new ContentTypeImpl(messageContentType, packet.soapAction, null); impl.setBoundary(boundary); impl.setBoundaryParameter(boundaryParameter); packet.setContentType(impl); return impl; } else { ct = rootCodec.getStaticContentType(packet); packet.setContentType(ct); return ct; } }
writeln("--"+boundary, out); ContentType ct = rootCodec.getStaticContentType(packet); String ctStr = (ct != null) ? ct.getContentType() : rootCodec.getMimeType(); if (rootId != null) writeln("Content-ID: " + rootId, out); writeln("Content-Type: " + ctStr, out);
writeln("--"+boundary, out); ContentType ct = rootCodec.getStaticContentType(packet); String ctStr = (ct != null) ? ct.getContentType() : rootCodec.getMimeType(); if (rootId != null) writeln("Content-ID: " + rootId, out); writeln("Content-Type: " + ctStr, out);
writeln("--"+boundary, out); ContentType ct = rootCodec.getStaticContentType(packet); String ctStr = (ct != null) ? ct.getContentType() : rootCodec.getMimeType(); if (rootId != null) writeln("Content-ID: " + rootId, out); writeln("Content-Type: " + ctStr, out);
fiSoapCodec = getFICodec(xmlSoapCodec, version); if (fiSoapCodec != null) { fiMimeType = fiSoapCodec.getMimeType(); fiSwaCodec = new SwACodec(version, features, fiSoapCodec); connegXmlAccept = fiMimeType + ", " + clientAcceptedContentTypes;
fiSoapCodec = getFICodec(xmlSoapCodec, version); if (fiSoapCodec != null) { fiMimeType = fiSoapCodec.getMimeType(); fiSwaCodec = new SwACodec(version, features, fiSoapCodec); connegXmlAccept = fiMimeType + ", " + clientAcceptedContentTypes;
fiSoapCodec = getFICodec(xmlSoapCodec, version); if (fiSoapCodec != null) { fiMimeType = fiSoapCodec.getMimeType(); fiSwaCodec = new SwACodec(version, features, fiSoapCodec); connegXmlAccept = fiMimeType + ", " + clientAcceptedContentTypes;