Java Code Examples for com.sun.xml.internal.ws.api.message.Packet#getInternalContentType()

The following examples show how to use com.sun.xml.internal.ws.api.message.Packet#getInternalContentType() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MtomCodec.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
public static ContentType getStaticContentTypeStatic(Packet packet, SOAPVersion version) {
    ContentType ct = (ContentType) packet.getInternalContentType();
    if ( ct != null ) return ct;

    String uuid = UUID.randomUUID().toString();
    String boundary = "uuid:" + uuid;
    String rootId = "<rootpart*"+uuid+"@example.jaxws.sun.com>";
    String soapActionParameter = SOAPVersion.SOAP_11.equals(version) ?  null : createActionParameter(packet);

    String boundaryParameter = "boundary=\"" + boundary +"\"";
    String messageContentType = MULTIPART_RELATED_MIME_TYPE +
            ";start=\""+rootId +"\"" +
            ";type=\"" + XOP_XML_MIME_TYPE + "\";" +
            boundaryParameter +
            ";start-info=\"" + version.contentType +
            (soapActionParameter == null? "" : soapActionParameter) +
            "\"";

    ContentTypeImpl ctImpl = SOAPVersion.SOAP_11.equals(version) ?
            new ContentTypeImpl(messageContentType, (packet.soapAction == null)?"":packet.soapAction, null) :
            new ContentTypeImpl(messageContentType, null, null);
    ctImpl.setBoundary(boundary);
    ctImpl.setRootId(rootId);
    packet.setContentType(ctImpl);
    return ctImpl;
}
 
Example 2
Source File: StreamSOAPCodec.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
public void decode(InputStream in, String contentType, Packet packet, AttachmentSet att ) throws IOException {
    List<String> expectedContentTypes = getExpectedContentTypes();
    if (contentType != null && !isContentTypeSupported(contentType,expectedContentTypes)) {
        throw new UnsupportedMediaException(contentType, expectedContentTypes);
    }
    com.oracle.webservices.internal.api.message.ContentType pct = packet.getInternalContentType();
    ContentTypeImpl cti = (pct != null && pct instanceof ContentTypeImpl) ?
            (ContentTypeImpl)pct : new ContentTypeImpl(contentType);
    String charset = cti.getCharSet();
    if (charset != null && !Charset.isSupported(charset)) {
        throw new UnsupportedMediaException(charset);
    }
    if (charset != null) {
        packet.invocationProperties.put(DECODED_MESSAGE_CHARSET, charset);
    } else {
        packet.invocationProperties.remove(DECODED_MESSAGE_CHARSET);
    }
    packet.setMessage(streamDecoder.decode(in, charset, att, soapVersion));
}
 
Example 3
Source File: StreamSOAPCodec.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
public void decode(InputStream in, String contentType, Packet packet, AttachmentSet att ) throws IOException {
    List<String> expectedContentTypes = getExpectedContentTypes();
    if (contentType != null && !isContentTypeSupported(contentType,expectedContentTypes)) {
        throw new UnsupportedMediaException(contentType, expectedContentTypes);
    }
    com.oracle.webservices.internal.api.message.ContentType pct = packet.getInternalContentType();
    ContentTypeImpl cti = (pct != null && pct instanceof ContentTypeImpl) ?
            (ContentTypeImpl)pct : new ContentTypeImpl(contentType);
    String charset = cti.getCharSet();
    if (charset != null && !Charset.isSupported(charset)) {
        throw new UnsupportedMediaException(charset);
    }
    if (charset != null) {
        packet.invocationProperties.put(DECODED_MESSAGE_CHARSET, charset);
    } else {
        packet.invocationProperties.remove(DECODED_MESSAGE_CHARSET);
    }
    packet.setMessage(streamDecoder.decode(in, charset, att, soapVersion));
}
 
Example 4
Source File: MimeCodec.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
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;
    }
}
 
Example 5
Source File: MtomCodec.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
public static ContentType getStaticContentTypeStatic(Packet packet, SOAPVersion version) {
    ContentType ct = (ContentType) packet.getInternalContentType();
    if ( ct != null ) return ct;

    String uuid = UUID.randomUUID().toString();
    String boundary = "uuid:" + uuid;
    String rootId = "<rootpart*"+uuid+"@example.jaxws.sun.com>";
    String soapActionParameter = SOAPVersion.SOAP_11.equals(version) ?  null : createActionParameter(packet);

    String boundaryParameter = "boundary=\"" + boundary +"\"";
    String messageContentType = MULTIPART_RELATED_MIME_TYPE +
            ";start=\""+rootId +"\"" +
            ";type=\"" + XOP_XML_MIME_TYPE + "\";" +
            boundaryParameter +
            ";start-info=\"" + version.contentType +
            (soapActionParameter == null? "" : soapActionParameter) +
            "\"";

    ContentTypeImpl ctImpl = SOAPVersion.SOAP_11.equals(version) ?
            new ContentTypeImpl(messageContentType, (packet.soapAction == null)?"":packet.soapAction, null) :
            new ContentTypeImpl(messageContentType, null, null);
    ctImpl.setBoundary(boundary);
    ctImpl.setRootId(rootId);
    packet.setContentType(ctImpl);
    return ctImpl;
}
 
Example 6
Source File: StreamSOAPCodec.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
public void decode(InputStream in, String contentType, Packet packet, AttachmentSet att ) throws IOException {
    List<String> expectedContentTypes = getExpectedContentTypes();
    if (contentType != null && !isContentTypeSupported(contentType,expectedContentTypes)) {
        throw new UnsupportedMediaException(contentType, expectedContentTypes);
    }
    com.oracle.webservices.internal.api.message.ContentType pct = packet.getInternalContentType();
    ContentTypeImpl cti = (pct != null && pct instanceof ContentTypeImpl) ?
            (ContentTypeImpl)pct : new ContentTypeImpl(contentType);
    String charset = cti.getCharSet();
    if (charset != null && !Charset.isSupported(charset)) {
        throw new UnsupportedMediaException(charset);
    }
    if (charset != null) {
        packet.invocationProperties.put(DECODED_MESSAGE_CHARSET, charset);
    } else {
        packet.invocationProperties.remove(DECODED_MESSAGE_CHARSET);
    }
    packet.setMessage(streamDecoder.decode(in, charset, att, soapVersion));
}
 
Example 7
Source File: MimeCodec.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
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;
    }
}
 
Example 8
Source File: StreamSOAPCodec.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
public void decode(InputStream in, String contentType, Packet packet, AttachmentSet att ) throws IOException {
    List<String> expectedContentTypes = getExpectedContentTypes();
    if (contentType != null && !isContentTypeSupported(contentType,expectedContentTypes)) {
        throw new UnsupportedMediaException(contentType, expectedContentTypes);
    }
    com.oracle.webservices.internal.api.message.ContentType pct = packet.getInternalContentType();
    ContentTypeImpl cti = (pct != null && pct instanceof ContentTypeImpl) ?
            (ContentTypeImpl)pct : new ContentTypeImpl(contentType);
    String charset = cti.getCharSet();
    if (charset != null && !Charset.isSupported(charset)) {
        throw new UnsupportedMediaException(charset);
    }
    if (charset != null) {
        packet.invocationProperties.put(DECODED_MESSAGE_CHARSET, charset);
    } else {
        packet.invocationProperties.remove(DECODED_MESSAGE_CHARSET);
    }
    packet.setMessage(streamDecoder.decode(in, charset, att, soapVersion));
}
 
Example 9
Source File: MimeCodec.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
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;
    }
}
 
Example 10
Source File: MimeCodec.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
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;
    }
}
 
Example 11
Source File: MimeCodec.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
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;
    }
}
 
Example 12
Source File: MimeCodec.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
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;
    }
}
 
Example 13
Source File: MtomCodec.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
public static ContentType getStaticContentTypeStatic(Packet packet, SOAPVersion version) {
    ContentType ct = (ContentType) packet.getInternalContentType();
    if ( ct != null ) return ct;

    String uuid = UUID.randomUUID().toString();
    String boundary = "uuid:" + uuid;
    String rootId = "<rootpart*"+uuid+"@example.jaxws.sun.com>";
    String soapActionParameter = SOAPVersion.SOAP_11.equals(version) ?  null : createActionParameter(packet);

    String boundaryParameter = "boundary=\"" + boundary +"\"";
    String messageContentType = MULTIPART_RELATED_MIME_TYPE +
            ";start=\""+rootId +"\"" +
            ";type=\"" + XOP_XML_MIME_TYPE + "\";" +
            boundaryParameter +
            ";start-info=\"" + version.contentType +
            (soapActionParameter == null? "" : soapActionParameter) +
            "\"";

    ContentTypeImpl ctImpl = SOAPVersion.SOAP_11.equals(version) ?
            new ContentTypeImpl(messageContentType, (packet.soapAction == null)?"":packet.soapAction, null) :
            new ContentTypeImpl(messageContentType, null, null);
    ctImpl.setBoundary(boundary);
    ctImpl.setRootId(rootId);
    packet.setContentType(ctImpl);
    return ctImpl;
}
 
Example 14
Source File: StreamSOAPCodec.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
public void decode(InputStream in, String contentType, Packet packet, AttachmentSet att ) throws IOException {
    List<String> expectedContentTypes = getExpectedContentTypes();
    if (contentType != null && !isContentTypeSupported(contentType,expectedContentTypes)) {
        throw new UnsupportedMediaException(contentType, expectedContentTypes);
    }
    com.oracle.webservices.internal.api.message.ContentType pct = packet.getInternalContentType();
    ContentTypeImpl cti = (pct != null && pct instanceof ContentTypeImpl) ?
            (ContentTypeImpl)pct : new ContentTypeImpl(contentType);
    String charset = cti.getCharSet();
    if (charset != null && !Charset.isSupported(charset)) {
        throw new UnsupportedMediaException(charset);
    }
    if (charset != null) {
        packet.invocationProperties.put(DECODED_MESSAGE_CHARSET, charset);
    } else {
        packet.invocationProperties.remove(DECODED_MESSAGE_CHARSET);
    }
    packet.setMessage(streamDecoder.decode(in, charset, att, soapVersion));
}
 
Example 15
Source File: MimeCodec.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
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;
    }
}
 
Example 16
Source File: MtomCodec.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
public static ContentType getStaticContentTypeStatic(Packet packet, SOAPVersion version) {
    ContentType ct = (ContentType) packet.getInternalContentType();
    if ( ct != null ) return ct;

    String uuid = UUID.randomUUID().toString();
    String boundary = "uuid:" + uuid;
    String rootId = "<rootpart*"+uuid+"@example.jaxws.sun.com>";
    String soapActionParameter = SOAPVersion.SOAP_11.equals(version) ?  null : createActionParameter(packet);

    String boundaryParameter = "boundary=\"" + boundary +"\"";
    String messageContentType = MULTIPART_RELATED_MIME_TYPE +
            ";start=\""+rootId +"\"" +
            ";type=\"" + XOP_XML_MIME_TYPE + "\";" +
            boundaryParameter +
            ";start-info=\"" + version.contentType +
            (soapActionParameter == null? "" : soapActionParameter) +
            "\"";

    ContentTypeImpl ctImpl = SOAPVersion.SOAP_11.equals(version) ?
            new ContentTypeImpl(messageContentType, (packet.soapAction == null)?"":packet.soapAction, null) :
            new ContentTypeImpl(messageContentType, null, null);
    ctImpl.setBoundary(boundary);
    ctImpl.setRootId(rootId);
    packet.setContentType(ctImpl);
    return ctImpl;
}
 
Example 17
Source File: StreamSOAPCodec.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
public void decode(InputStream in, String contentType, Packet packet, AttachmentSet att ) throws IOException {
    List<String> expectedContentTypes = getExpectedContentTypes();
    if (contentType != null && !isContentTypeSupported(contentType,expectedContentTypes)) {
        throw new UnsupportedMediaException(contentType, expectedContentTypes);
    }
    com.oracle.webservices.internal.api.message.ContentType pct = packet.getInternalContentType();
    ContentTypeImpl cti = (pct != null && pct instanceof ContentTypeImpl) ?
            (ContentTypeImpl)pct : new ContentTypeImpl(contentType);
    String charset = cti.getCharSet();
    if (charset != null && !Charset.isSupported(charset)) {
        throw new UnsupportedMediaException(charset);
    }
    if (charset != null) {
        packet.invocationProperties.put(DECODED_MESSAGE_CHARSET, charset);
    } else {
        packet.invocationProperties.remove(DECODED_MESSAGE_CHARSET);
    }
    packet.setMessage(streamDecoder.decode(in, charset, att, soapVersion));
}
 
Example 18
Source File: MimeCodec.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
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;
    }
}
 
Example 19
Source File: MtomCodec.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
public static ContentType getStaticContentTypeStatic(Packet packet, SOAPVersion version) {
    ContentType ct = (ContentType) packet.getInternalContentType();
    if ( ct != null ) return ct;

    String uuid = UUID.randomUUID().toString();
    String boundary = "uuid:" + uuid;
    String rootId = "<rootpart*"+uuid+"@example.jaxws.sun.com>";
    String soapActionParameter = SOAPVersion.SOAP_11.equals(version) ?  null : createActionParameter(packet);

    String boundaryParameter = "boundary=\"" + boundary +"\"";
    String messageContentType = MULTIPART_RELATED_MIME_TYPE +
            ";start=\""+rootId +"\"" +
            ";type=\"" + XOP_XML_MIME_TYPE + "\";" +
            boundaryParameter +
            ";start-info=\"" + version.contentType +
            (soapActionParameter == null? "" : soapActionParameter) +
            "\"";

    ContentTypeImpl ctImpl = SOAPVersion.SOAP_11.equals(version) ?
            new ContentTypeImpl(messageContentType, (packet.soapAction == null)?"":packet.soapAction, null) :
            new ContentTypeImpl(messageContentType, null, null);
    ctImpl.setBoundary(boundary);
    ctImpl.setRootId(rootId);
    packet.setContentType(ctImpl);
    return ctImpl;
}
 
Example 20
Source File: MtomCodec.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public static ContentType getStaticContentTypeStatic(Packet packet, SOAPVersion version) {
    ContentTypeImpl ct = (ContentTypeImpl) packet.getInternalContentType();
    if ( ct != null ) {
            //Note - this case of boundary = null or root content ID = null should never happen
            //after a recent bug fix in Packet.shouldUseMtom logic, but just in
            //case we get here with a Packet that has a non-null content type with
            //a null boundary, the content type of the Packet will be reset
            if (ct.getBoundary() != null && ct.getRootId() != null)
                    return ct;
    }
    String uuid = UUID.randomUUID().toString();
    String boundary = "uuid:" + uuid;
    String rootId = "<rootpart*"+uuid+"@example.jaxws.sun.com>";
    String soapActionParameter = SOAPVersion.SOAP_11.equals(version) ?  null : createActionParameter(packet);

    String boundaryParameter = "boundary=\"" + boundary +"\"";
    String messageContentType = MULTIPART_RELATED_MIME_TYPE +
            ";start=\""+rootId +"\"" +
            ";type=\"" + XOP_XML_MIME_TYPE + "\";" +
            boundaryParameter +
            ";start-info=\"" + version.contentType +
            (soapActionParameter == null? "" : soapActionParameter) +
            "\"";

    ContentTypeImpl ctImpl = SOAPVersion.SOAP_11.equals(version) ?
            new ContentTypeImpl(messageContentType, (packet.soapAction == null)?"":packet.soapAction, null) :
            new ContentTypeImpl(messageContentType, null, null);
    ctImpl.setBoundary(boundary);
    ctImpl.setRootId(rootId);
    packet.setContentType(ctImpl);
    return ctImpl;
}