synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "amit (JIRA)" <>
Subject [jira] [Commented] (SYNAPSE-1098) Content-type not set properly for MTOM in Mock mode
Date Fri, 08 Dec 2017 21:18:00 GMT


amit commented on SYNAPSE-1098:

Resolved this by adding custom content type to the HTTP header in the custom mediator class.
	             Axis2MessageContext axis2smc = (Axis2MessageContext) arg0;
			org.apache.axis2.context.MessageContext axis2MessageCtx =axis2smc.getAxis2MessageContext();
			axis2MessageCtx.setProperty("mimeBoundary", "----="+uuid);
			Object headers = axis2MessageCtx.

			Map headersMap = (Map) headers;
			headersMap.put("Content-Type", "multipart/related; type=\"text/xml\"; boundary=\"----="+uuid+"\"");

> Content-type not set properly for MTOM in Mock mode
> ---------------------------------------------------
>                 Key: SYNAPSE-1098
>                 URL:
>             Project: Synapse
>          Issue Type: Bug
>            Reporter: amit
>            Assignee: Isuru Udana Loku Narangoda
> Hi,
> I am trying to use Synapse to create mock services supporting MTOM (without using axis2
server). I am able to get it working using a custom mediator. The only issue is with the Content-Type
in the HTTP header. I am able to set the header to "application/multipart-related" but unable
to get the boundary added to the content-type. Below is the actual and the expected content
type header: 
> *Actual HTTP header content type:*
> Content-Type: multipart/related
> **Expected HTTP header content type:**
>  Content-Type: multipart/related; boundary="MIMEBoundary_cf282bb7f5878aef54b9e9a4db9";
type="application/xop+xml"; start="<>"; start-info="text/xml"
> Could someone please help me getting the suitable content-type http header from synapse?
I have already tried using below property. It doesn't set the boundary in the content type.
> <property name="ContentType" value="multipart/related" scope="transport"/>

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message