{"action":"closed","number":2887,"pull_request":{"url":"https://api.github.com/repos/wso2/product-ei/pulls/2887","id":233115522,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMzMTE1NTIy","html_url":"https://github.com/wso2/product-ei/pull/2887","diff_url":"https://github.com/wso2/product-ei/pull/2887.diff","patch_url":"https://github.com/wso2/product-ei/pull/2887.patch","issue_url":"https://api.github.com/repos/wso2/product-ei/issues/2887","number":2887,"state":"closed","locked":false,"title":"Fix MTOM Forward test-case","user":{"login":"abeykoon","id":4967046,"node_id":"MDQ6VXNlcjQ5NjcwNDY=","avatar_url":"https://avatars2.githubusercontent.com/u/4967046?v=4","gravatar_id":"","url":"https://api.github.com/users/abeykoon","html_url":"https://github.com/abeykoon","followers_url":"https://api.github.com/users/abeykoon/followers","following_url":"https://api.github.com/users/abeykoon/following{/other_user}","gists_url":"https://api.github.com/users/abeykoon/gists{/gist_id}","starred_url":"https://api.github.com/users/abeykoon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abeykoon/subscriptions","organizations_url":"https://api.github.com/users/abeykoon/orgs","repos_url":"https://api.github.com/users/abeykoon/repos","events_url":"https://api.github.com/users/abeykoon/events{/privacy}","received_events_url":"https://api.github.com/users/abeykoon/received_events","type":"User","site_admin":false},"body":"## Purpose\r\n\r\nTest-suite is failing after the fix introduced by PR: \r\nhttps://github.com/wso2/carbon-mediation/pull/1108\r\n\r\nReason was testcase was not written in a way to enable MTOM. \r\n\r\n\r\n## Goals\r\n\r\nFix test case ESBJAVA4909MultipartRelatedTestCase\r\n\r\n## Approach\r\n\r\n\r\n**Without the fix - always use SOAP 12 at BinaryRelayBuilder**\r\n\r\nIt does not build the message and return as it is SOAP 12  [1]\r\n\r\n**With fix - if client sends SOAP 11, use SOAP 11 factory otherwise use SOAP 12 factory at BinaryRelayBuilder**\r\n\r\nIt builds the message, changing to messageType to text/xml [2]\r\nAs described on previous mail, this causes ESB to select SOAPMessageFormatter instead of ExpandingMessageFormatter, causing MIME response to be malformed. \r\n\r\n\r\nif ((Boolean) isClientDoingSOAP11Obj) {     // If request is in SOAP11 format\r\n\r\n    if (isResponseSOAP11) {  // Response is also in the SOAP11 format - no conversion required\r\n        return;\r\n    }\r\n\r\n    try {                   // Message need to be built prior to the conversion\r\n        RelayUtils.buildMessage(((Axis2MessageContext) synCtx).getAxis2MessageContext(), false);\r\n    } catch (Exception e) {\r\n        handleException(\"Error while building message\", e);\r\n    }\r\n\r\n**Special Treatment to MTOM**\r\n\r\nApart from above observations I see MTOM messages are treated in special in the code. It is designed to skip message conversion if MTOM is enabled. [3] So to me fix should be enabling it. It supposed to get gets enabled at SynapseCallbackReceiver, but in this scenario axisOutMsgCtx.isDoingMTOM() if false [4]\r\n\r\nby enabling MTOM by axis2 property at [3] it skips setting messageType to text/xml from multipart/related.\r\n\r\n[1]. wso2-synapse - modules/core/src/main/java/org/apache/synapse/core/axis2/Axis2Sender.java#L390\r\n[2]. wso2-synapse - modules/core/src/main/java/org/apache/synapse/core/axis2/Axis2Sender.java#L374\r\n[3]. wso2-synapse - modules/core/src/main/java/org/apache/synapse/core/axis2/Axis2Sender.java#L344\r\n[4]. wso2-synapse - /modules/core/src/main/java/org/apache/synapse/core/axis2/SynapseCallbackReceiver.java#L390\r\n\r\n","created_at":"2018-11-23T06:33:31Z","updated_at":"2018-11-23T08:44:16Z","closed_at":"2018-11-23T08:44:16Z","merged_at":"2018-11-23T08:44:16Z","merge_commit_sha":"4bcbe530208821b904da1833e830776ab531119f","assignee":{"login":"abeykoon","id":4967046,"node_id":"MDQ6VXNlcjQ5NjcwNDY=","avatar_url":"https://avatars2.githubusercontent.com/u/4967046?v=4","gravatar_id":"","url":"https://api.github.com/users/abeykoon","html_url":"https://github.com/abeykoon","followers_url":"https://api.github.com/users/abeykoon/followers","following_url":"https://api.github.com/users/abeykoon/following{/other_user}","gists_url":"https://api.github.com/users/abeykoon/gists{/gist_id}","starred_url":"https://api.github.com/users/abeykoon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abeykoon/subscriptions","organizations_url":"https://api.github.com/users/abeykoon/orgs","repos_url":"https://api.github.com/users/abeykoon/repos","events_url":"https://api.github.com/users/abeykoon/events{/privacy}","received_events_url":"https://api.github.com/users/abeykoon/received_events","type":"User","site_admin":false},"assignees":[{"login":"abeykoon","id":4967046,"node_id":"MDQ6VXNlcjQ5NjcwNDY=","avatar_url":"https://avatars2.githubusercontent.com/u/4967046?v=4","gravatar_id":"","url":"https://api.github.com/users/abeykoon","html_url":"https://github.com/abeykoon","followers_url":"https://api.github.com/users/abeykoon/followers","following_url":"https://api.github.com/users/abeykoon/following{/other_user}","gists_url":"https://api.github.com/users/abeykoon/gists{/gist_id}","starred_url":"https://api.github.com/users/abeykoon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abeykoon/subscriptions","organizations_url":"https://api.github.com/users/abeykoon/orgs","repos_url":"https://api.github.com/users/abeykoon/repos","events_url":"https://api.github.com/users/abeykoon/events{/privacy}","received_events_url":"https://api.github.com/users/abeykoon/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":884472173,"node_id":"MDU6TGFiZWw4ODQ0NzIxNzM=","url":"https://api.github.com/repos/wso2/product-ei/labels/6.3.0","name":"6.3.0","color":"5319e7","default":false},{"id":761857939,"node_id":"MDU6TGFiZWw3NjE4NTc5Mzk=","url":"https://api.github.com/repos/wso2/product-ei/labels/Passthrough%20HTTP%20Transport","name":"Passthrough HTTP Transport","color":"46f4bd","default":false},{"id":504720813,"node_id":"MDU6TGFiZWw1MDQ3MjA4MTM=","url":"https://api.github.com/repos/wso2/product-ei/labels/Type/Bug","name":"Type/Bug","color":"1d76db","default":false}],"milestone":{"url":"https://api.github.com/repos/wso2/product-ei/milestones/52","html_url":"https://github.com/wso2/product-ei/milestone/52","labels_url":"https://api.github.com/repos/wso2/product-ei/milestones/52/labels","id":3730100,"node_id":"MDk6TWlsZXN0b25lMzczMDEwMA==","number":52,"title":"EI 6.5.0 ","description":"","creator":{"login":"abeykoon","id":4967046,"node_id":"MDQ6VXNlcjQ5NjcwNDY=","avatar_url":"https://avatars2.githubusercontent.com/u/4967046?v=4","gravatar_id":"","url":"https://api.github.com/users/abeykoon","html_url":"https://github.com/abeykoon","followers_url":"https://api.github.com/users/abeykoon/followers","following_url":"https://api.github.com/users/abeykoon/following{/other_user}","gists_url":"https://api.github.com/users/abeykoon/gists{/gist_id}","starred_url":"https://api.github.com/users/abeykoon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abeykoon/subscriptions","organizations_url":"https://api.github.com/users/abeykoon/orgs","repos_url":"https://api.github.com/users/abeykoon/repos","events_url":"https://api.github.com/users/abeykoon/events{/privacy}","received_events_url":"https://api.github.com/users/abeykoon/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":3,"state":"open","created_at":"2018-10-11T11:12:25Z","updated_at":"2018-11-23T08:44:16Z","due_on":"2018-12-20T08:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/wso2/product-ei/pulls/2887/commits","review_comments_url":"https://api.github.com/repos/wso2/product-ei/pulls/2887/comments","review_comment_url":"https://api.github.com/repos/wso2/product-ei/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wso2/product-ei/issues/2887/comments","statuses_url":"https://api.github.com/repos/wso2/product-ei/statuses/55187a14c21b10b1612ceaadd838f32535d1bf19","head":{"label":"abeykoon:fix_mtom_testcase","ref":"fix_mtom_testcase","sha":"55187a14c21b10b1612ceaadd838f32535d1bf19","user":{"login":"abeykoon","id":4967046,"node_id":"MDQ6VXNlcjQ5NjcwNDY=","avatar_url":"https://avatars2.githubusercontent.com/u/4967046?v=4","gravatar_id":"","url":"https://api.github.com/users/abeykoon","html_url":"https://github.com/abeykoon","followers_url":"https://api.github.com/users/abeykoon/followers","following_url":"https://api.github.com/users/abeykoon/following{/other_user}","gists_url":"https://api.github.com/users/abeykoon/gists{/gist_id}","starred_url":"https://api.github.com/users/abeykoon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abeykoon/subscriptions","organizations_url":"https://api.github.com/users/abeykoon/orgs","repos_url":"https://api.github.com/users/abeykoon/repos","events_url":"https://api.github.com/users/abeykoon/events{/privacy}","received_events_url":"https://api.github.com/users/abeykoon/received_events","type":"User","site_admin":false},"repo":{"id":93368159,"node_id":"MDEwOlJlcG9zaXRvcnk5MzM2ODE1OQ==","name":"product-ei","full_name":"abeykoon/product-ei","private":false,"owner":{"login":"abeykoon","id":4967046,"node_id":"MDQ6VXNlcjQ5NjcwNDY=","avatar_url":"https://avatars2.githubusercontent.com/u/4967046?v=4","gravatar_id":"","url":"https://api.github.com/users/abeykoon","html_url":"https://github.com/abeykoon","followers_url":"https://api.github.com/users/abeykoon/followers","following_url":"https://api.github.com/users/abeykoon/following{/other_user}","gists_url":"https://api.github.com/users/abeykoon/gists{/gist_id}","starred_url":"https://api.github.com/users/abeykoon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abeykoon/subscriptions","organizations_url":"https://api.github.com/users/abeykoon/orgs","repos_url":"https://api.github.com/users/abeykoon/repos","events_url":"https://api.github.com/users/abeykoon/events{/privacy}","received_events_url":"https://api.github.com/users/abeykoon/received_events","type":"User","site_admin":false},"html_url":"https://github.com/abeykoon/product-ei","description":null,"fork":true,"url":"https://api.github.com/repos/abeykoon/product-ei","forks_url":"https://api.github.com/repos/abeykoon/product-ei/forks","keys_url":"https://api.github.com/repos/abeykoon/product-ei/keys{/key_id}","collaborators_url":"https://api.github.com/repos/abeykoon/product-ei/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/abeykoon/product-ei/teams","hooks_url":"https://api.github.com/repos/abeykoon/product-ei/hooks","issue_events_url":"https://api.github.com/repos/abeykoon/product-ei/issues/events{/number}","events_url":"https://api.github.com/repos/abeykoon/product-ei/events","assignees_url":"https://api.github.com/repos/abeykoon/product-ei/assignees{/user}","branches_url":"https://api.github.com/repos/abeykoon/product-ei/branches{/branch}","tags_url":"https://api.github.com/repos/abeykoon/product-ei/tags","blobs_url":"https://api.github.com/repos/abeykoon/product-ei/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/abeykoon/product-ei/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/abeykoon/product-ei/git/refs{/sha}","trees_url":"https://api.github.com/repos/abeykoon/product-ei/git/trees{/sha}","statuses_url":"https://api.github.com/repos/abeykoon/product-ei/statuses/{sha}","languages_url":"https://api.github.com/repos/abeykoon/product-ei/languages","stargazers_url":"https://api.github.com/repos/abeykoon/product-ei/stargazers","contributors_url":"https://api.github.com/repos/abeykoon/product-ei/contributors","subscribers_url":"https://api.github.com/repos/abeykoon/product-ei/subscribers","subscription_url":"https://api.github.com/repos/abeykoon/product-ei/subscription","commits_url":"https://api.github.com/repos/abeykoon/product-ei/commits{/sha}","git_commits_url":"https://api.github.com/repos/abeykoon/product-ei/git/commits{/sha}","comments_url":"https://api.github.com/repos/abeykoon/product-ei/comments{/number}","issue_comment_url":"https://api.github.com/repos/abeykoon/product-ei/issues/comments{/number}","contents_url":"https://api.github.com/repos/abeykoon/product-ei/contents/{+path}","compare_url":"https://api.github.com/repos/abeykoon/product-ei/compare/{base}...{head}","merges_url":"https://api.github.com/repos/abeykoon/product-ei/merges","archive_url":"https://api.github.com/repos/abeykoon/product-ei/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/abeykoon/product-ei/downloads","issues_url":"https://api.github.com/repos/abeykoon/product-ei/issues{/number}","pulls_url":"https://api.github.com/repos/abeykoon/product-ei/pulls{/number}","milestones_url":"https://api.github.com/repos/abeykoon/product-ei/milestones{/number}","notifications_url":"https://api.github.com/repos/abeykoon/product-ei/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/abeykoon/product-ei/labels{/name}","releases_url":"https://api.github.com/repos/abeykoon/product-ei/releases{/id}","deployments_url":"https://api.github.com/repos/abeykoon/product-ei/deployments","created_at":"2017-06-05T05:26:37Z","updated_at":"2017-06-05T05:26:58Z","pushed_at":"2018-11-23T06:23:36Z","git_url":"git://github.com/abeykoon/product-ei.git","ssh_url":"git@github.com:abeykoon/product-ei.git","clone_url":"https://github.com/abeykoon/product-ei.git","svn_url":"https://github.com/abeykoon/product-ei","homepage":null,"size":45784,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"wso2:master","ref":"master","sha":"75ead4b1b1c87490383ce9c0ebab2d6af06e9efe","user":{"login":"wso2","id":533043,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUzMzA0Mw==","avatar_url":"https://avatars3.githubusercontent.com/u/533043?v=4","gravatar_id":"","url":"https://api.github.com/users/wso2","html_url":"https://github.com/wso2","followers_url":"https://api.github.com/users/wso2/followers","following_url":"https://api.github.com/users/wso2/following{/other_user}","gists_url":"https://api.github.com/users/wso2/gists{/gist_id}","starred_url":"https://api.github.com/users/wso2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wso2/subscriptions","organizations_url":"https://api.github.com/users/wso2/orgs","repos_url":"https://api.github.com/users/wso2/repos","events_url":"https://api.github.com/users/wso2/events{/privacy}","received_events_url":"https://api.github.com/users/wso2/received_events","type":"Organization","site_admin":false},"repo":{"id":77035252,"node_id":"MDEwOlJlcG9zaXRvcnk3NzAzNTI1Mg==","name":"product-ei","full_name":"wso2/product-ei","private":false,"owner":{"login":"wso2","id":533043,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUzMzA0Mw==","avatar_url":"https://avatars3.githubusercontent.com/u/533043?v=4","gravatar_id":"","url":"https://api.github.com/users/wso2","html_url":"https://github.com/wso2","followers_url":"https://api.github.com/users/wso2/followers","following_url":"https://api.github.com/users/wso2/following{/other_user}","gists_url":"https://api.github.com/users/wso2/gists{/gist_id}","starred_url":"https://api.github.com/users/wso2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wso2/subscriptions","organizations_url":"https://api.github.com/users/wso2/orgs","repos_url":"https://api.github.com/users/wso2/repos","events_url":"https://api.github.com/users/wso2/events{/privacy}","received_events_url":"https://api.github.com/users/wso2/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/wso2/product-ei","description":null,"fork":false,"url":"https://api.github.com/repos/wso2/product-ei","forks_url":"https://api.github.com/repos/wso2/product-ei/forks","keys_url":"https://api.github.com/repos/wso2/product-ei/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wso2/product-ei/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wso2/product-ei/teams","hooks_url":"https://api.github.com/repos/wso2/product-ei/hooks","issue_events_url":"https://api.github.com/repos/wso2/product-ei/issues/events{/number}","events_url":"https://api.github.com/repos/wso2/product-ei/events","assignees_url":"https://api.github.com/repos/wso2/product-ei/assignees{/user}","branches_url":"https://api.github.com/repos/wso2/product-ei/branches{/branch}","tags_url":"https://api.github.com/repos/wso2/product-ei/tags","blobs_url":"https://api.github.com/repos/wso2/product-ei/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wso2/product-ei/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wso2/product-ei/git/refs{/sha}","trees_url":"https://api.github.com/repos/wso2/product-ei/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wso2/product-ei/statuses/{sha}","languages_url":"https://api.github.com/repos/wso2/product-ei/languages","stargazers_url":"https://api.github.com/repos/wso2/product-ei/stargazers","contributors_url":"https://api.github.com/repos/wso2/product-ei/contributors","subscribers_url":"https://api.github.com/repos/wso2/product-ei/subscribers","subscription_url":"https://api.github.com/repos/wso2/product-ei/subscription","commits_url":"https://api.github.com/repos/wso2/product-ei/commits{/sha}","git_commits_url":"https://api.github.com/repos/wso2/product-ei/git/commits{/sha}","comments_url":"https://api.github.com/repos/wso2/product-ei/comments{/number}","issue_comment_url":"https://api.github.com/repos/wso2/product-ei/issues/comments{/number}","contents_url":"https://api.github.com/repos/wso2/product-ei/contents/{+path}","compare_url":"https://api.github.com/repos/wso2/product-ei/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wso2/product-ei/merges","archive_url":"https://api.github.com/repos/wso2/product-ei/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wso2/product-ei/downloads","issues_url":"https://api.github.com/repos/wso2/product-ei/issues{/number}","pulls_url":"https://api.github.com/repos/wso2/product-ei/pulls{/number}","milestones_url":"https://api.github.com/repos/wso2/product-ei/milestones{/number}","notifications_url":"https://api.github.com/repos/wso2/product-ei/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wso2/product-ei/labels{/name}","releases_url":"https://api.github.com/repos/wso2/product-ei/releases{/id}","deployments_url":"https://api.github.com/repos/wso2/product-ei/deployments","created_at":"2016-12-21T09:00:01Z","updated_at":"2018-11-22T00:45:31Z","pushed_at":"2018-11-23T08:44:16Z","git_url":"git://github.com/wso2/product-ei.git","ssh_url":"git@github.com:wso2/product-ei.git","clone_url":"https://github.com/wso2/product-ei.git","svn_url":"https://github.com/wso2/product-ei","homepage":null,"size":48551,"stargazers_count":59,"watchers_count":59,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":122,"mirror_url":null,"archived":false,"open_issues_count":658,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":122,"open_issues":658,"watchers":59,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wso2/product-ei/pulls/2887"},"html":{"href":"https://github.com/wso2/product-ei/pull/2887"},"issue":{"href":"https://api.github.com/repos/wso2/product-ei/issues/2887"},"comments":{"href":"https://api.github.com/repos/wso2/product-ei/issues/2887/comments"},"review_comments":{"href":"https://api.github.com/repos/wso2/product-ei/pulls/2887/comments"},"review_comment":{"href":"https://api.github.com/repos/wso2/product-ei/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wso2/product-ei/pulls/2887/commits"},"statuses":{"href":"https://api.github.com/repos/wso2/product-ei/statuses/55187a14c21b10b1612ceaadd838f32535d1bf19"}},"author_association":"CONTRIBUTOR","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"abeykoon","id":4967046,"node_id":"MDQ6VXNlcjQ5NjcwNDY=","avatar_url":"https://avatars2.githubusercontent.com/u/4967046?v=4","gravatar_id":"","url":"https://api.github.com/users/abeykoon","html_url":"https://github.com/abeykoon","followers_url":"https://api.github.com/users/abeykoon/followers","following_url":"https://api.github.com/users/abeykoon/following{/other_user}","gists_url":"https://api.github.com/users/abeykoon/gists{/gist_id}","starred_url":"https://api.github.com/users/abeykoon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abeykoon/subscriptions","organizations_url":"https://api.github.com/users/abeykoon/orgs","repos_url":"https://api.github.com/users/abeykoon/repos","events_url":"https://api.github.com/users/abeykoon/events{/privacy}","received_events_url":"https://api.github.com/users/abeykoon/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":2,"deletions":2,"changed_files":1}}
{"actor":{"display_login":"abeykoon"}}