AttachmentUtils { public static String buildRootPartContentType(String action, SoapVersion soapVersion) { String contentType = "application/xop+xml; charset=UTF-8; type=\"" + soapVersion.getContentType(); if (soapVersion == SoapVersion.Soap12) { contentType += "\"; action=\"" + action; } return contentType + "\""; }  static boolean prepareMessagePart(WsdlAttachmentContainer container, MimeMultipart mp,
                                             MessageXmlPart messagePart, StringToStringMap contentIds); static String buildRootPartContentType(String action, SoapVersion soapVersion); static String buildMTOMContentType(String header, String action, SoapVersion soapVersion); static boolean isSwaRefType(SchemaType schemaType); static String getXmlMimeContentType(XmlCursor cursor); static AttachmentEncoding getAttachmentEncoding(WsdlOperation operation,
                                                           HttpAttachmentPart httpAttachmentPart, boolean isResponse); static AttachmentEncoding getAttachmentEncoding(WsdlOperation operation, String partName, boolean isResponse); static boolean isXopInclude(SchemaType schemaType); static List<HttpAttachmentPart> extractAttachmentParts(WsdlOperation operation, String messageContent,
                                                                  boolean addAnonymous, boolean isResponse, boolean forceMtom); static void addMimeParts(AttachmentContainer container, List<Attachment> attachments, MimeMultipart mp,
                                    StringToStringMap contentIds); static void addMultipartAttachment(MimeMultipart mp, StringToStringMap contentIds,
                                              List<Attachment> attachments); static void initPartContentId(StringToStringMap contentIds, MimeBodyPart part, Attachment attachment,
                                         boolean isMultipart); static void addSingleAttachment(MimeMultipart mp, StringToStringMap contentIds, Attachment att); static final QName XOP_HREF_QNAME; static final String ROOTPART_SOAPUI_ORG; static final long MAX_SIZE_IN_MEMORY_ATTACHMENT; static final Session JAVAMAIL_SESSION; }
@Test public void actionIsNotWithinTypeElement() throws Exception { String contentType = AttachmentUtils.buildRootPartContentType("SendFile", SoapVersion.Soap12); String expectedContentType = "application/xop+xml; charset=UTF-8; type=\"application/soap+xml\"; action=\"SendFile\""; assertThat(contentType, is(expectedContentType)); }