{"action":"created","issue":{"url":"https://api.github.com/repos/atlasmap/atlasmap/issues/290","repository_url":"https://api.github.com/repos/atlasmap/atlasmap","labels_url":"https://api.github.com/repos/atlasmap/atlasmap/issues/290/labels{/name}","comments_url":"https://api.github.com/repos/atlasmap/atlasmap/issues/290/comments","events_url":"https://api.github.com/repos/atlasmap/atlasmap/issues/290/events","html_url":"https://github.com/atlasmap/atlasmap/issues/290","id":297753023,"number":290,"title":"Qualified namespace handling","user":{"login":"zregvart","id":1306050,"avatar_url":"https://avatars0.githubusercontent.com/u/1306050?v=4","gravatar_id":"","url":"https://api.github.com/users/zregvart","html_url":"https://github.com/zregvart","followers_url":"https://api.github.com/users/zregvart/followers","following_url":"https://api.github.com/users/zregvart/following{/other_user}","gists_url":"https://api.github.com/users/zregvart/gists{/gist_id}","starred_url":"https://api.github.com/users/zregvart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zregvart/subscriptions","organizations_url":"https://api.github.com/users/zregvart/orgs","repos_url":"https://api.github.com/users/zregvart/repos","events_url":"https://api.github.com/users/zregvart/events{/privacy}","received_events_url":"https://api.github.com/users/zregvart/received_events","type":"User","site_admin":false},"labels":[{"id":751293029,"url":"https://api.github.com/repos/atlasmap/atlasmap/labels/cat/bug","name":"cat/bug","color":"e08891","default":false},{"id":750416703,"url":"https://api.github.com/repos/atlasmap/atlasmap/labels/module/runtime","name":"module/runtime","color":"657c9a","default":false},{"id":750479554,"url":"https://api.github.com/repos/atlasmap/atlasmap/labels/module/ui","name":"module/ui","color":"dce6f0","default":false}],"state":"open","locked":false,"assignee":{"login":"igarashitm","id":265462,"avatar_url":"https://avatars2.githubusercontent.com/u/265462?v=4","gravatar_id":"","url":"https://api.github.com/users/igarashitm","html_url":"https://github.com/igarashitm","followers_url":"https://api.github.com/users/igarashitm/followers","following_url":"https://api.github.com/users/igarashitm/following{/other_user}","gists_url":"https://api.github.com/users/igarashitm/gists{/gist_id}","starred_url":"https://api.github.com/users/igarashitm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/igarashitm/subscriptions","organizations_url":"https://api.github.com/users/igarashitm/orgs","repos_url":"https://api.github.com/users/igarashitm/repos","events_url":"https://api.github.com/users/igarashitm/events{/privacy}","received_events_url":"https://api.github.com/users/igarashitm/received_events","type":"User","site_admin":false},"assignees":[{"login":"igarashitm","id":265462,"avatar_url":"https://avatars2.githubusercontent.com/u/265462?v=4","gravatar_id":"","url":"https://api.github.com/users/igarashitm","html_url":"https://github.com/igarashitm","followers_url":"https://api.github.com/users/igarashitm/followers","following_url":"https://api.github.com/users/igarashitm/following{/other_user}","gists_url":"https://api.github.com/users/igarashitm/gists{/gist_id}","starred_url":"https://api.github.com/users/igarashitm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/igarashitm/subscriptions","organizations_url":"https://api.github.com/users/igarashitm/orgs","repos_url":"https://api.github.com/users/igarashitm/repos","events_url":"https://api.github.com/users/igarashitm/events{/privacy}","received_events_url":"https://api.github.com/users/igarashitm/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2018-02-16T11:19:30Z","updated_at":"2018-02-16T20:03:40Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"I have a mapping:\r\n\r\n<details>\r\n<summary>mapping.json</summary>\r\n<pre>\r\n{\r\n  \"AtlasMapping\": {\r\n    \"jsonType\": \"io.atlasmap.v2.AtlasMapping\",\r\n    \"dataSource\": [\r\n      {\r\n        \"jsonType\": \"io.atlasmap.json.v2.JsonDataSource\",\r\n        \"id\": \"-L5T7PW_IfASsJJ8g5pN\",\r\n        \"uri\": \"atlas:json:-L5T7PW_IfASsJJ8g5pN\",\r\n        \"dataSourceType\": \"SOURCE\"\r\n      },\r\n      {\r\n        \"jsonType\": \"io.atlasmap.xml.v2.XmlDataSource\",\r\n        \"id\": \"-L5T7SjaIfASsJJ8g5pN\",\r\n        \"uri\": \"atlas:xml:-L5T7SjaIfASsJJ8g5pN\",\r\n        \"dataSourceType\": \"TARGET\",\r\n        \"template\": null,\r\n        \"xmlNamespaces\": {\r\n          \"xmlNamespace\": [\r\n            {\r\n              \"alias\": \"tns\",\r\n              \"uri\": \"http://syndesis.io/v1/swagger-connector-template/request\",\r\n              \"targetNamespace\": true\r\n            }\r\n          ]\r\n        }\r\n      }\r\n    ],\r\n    \"mappings\": {\r\n      \"mapping\": [\r\n        {\r\n          \"jsonType\": \"io.atlasmap.v2.Mapping\",\r\n          \"mappingType\": \"MAP\",\r\n          \"id\": \"mapping.501850\",\r\n          \"inputField\": [\r\n            {\r\n              \"jsonType\": \"io.atlasmap.json.v2.JsonField\",\r\n              \"name\": \"last_name\",\r\n              \"path\": \"/last_name\",\r\n              \"fieldType\": \"STRING\",\r\n              \"docId\": \"-L5T7PW_IfASsJJ8g5pN\",\r\n              \"userCreated\": false\r\n            }\r\n          ],\r\n          \"outputField\": [\r\n            {\r\n              \"jsonType\": \"io.atlasmap.xml.v2.XmlField\",\r\n              \"name\": \"name\",\r\n              \"path\": \"/request/body/Pet/name\",\r\n              \"fieldType\": \"STRING\",\r\n              \"docId\": \"-L5T7SjaIfASsJJ8g5pN\",\r\n              \"userCreated\": false\r\n            }\r\n          ]\r\n        }\r\n      ]\r\n    },\r\n    \"name\": \"UI.676698\",\r\n    \"lookupTables\": {\r\n      \"lookupTable\": []\r\n    },\r\n    \"properties\": {\r\n      \"property\": []\r\n    }\r\n  }\r\n}\r\n</pre>\r\n</details>\r\n\r\n<p>\r\n\r\nThat was influenced by the SchemaSet for the target document:\r\n\r\n<details>\r\n<summary>schemaset.xml</summary>\r\n<pre>\r\n&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;\r\n&lt;d:SchemaSet xmlns:d=&quot;http://atlasmap.io/xml/schemaset/v2&quot; xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot;&gt;\r\n  &lt;xsd:schema targetNamespace=&quot;http://syndesis.io/v1/swagger-connector-template/request&quot; elementFormDefault=&quot;qualified&quot;&gt;\r\n    &lt;xsd:element name=&quot;request&quot;&gt;\r\n      &lt;xsd:complexType&gt;\r\n        &lt;xsd:sequence&gt;\r\n          &lt;xsd:element name=&quot;body&quot;&gt;\r\n            &lt;xsd:complexType&gt;\r\n              &lt;xsd:sequence&gt;\r\n                &lt;xsd:element ref=&quot;Pet&quot; /&gt;\r\n              &lt;/xsd:sequence&gt;\r\n            &lt;/xsd:complexType&gt;\r\n          &lt;/xsd:element&gt;\r\n        &lt;/xsd:sequence&gt;\r\n      &lt;/xsd:complexType&gt;\r\n    &lt;/xsd:element&gt;\r\n  &lt;/xsd:schema&gt;\r\n  &lt;d:AdditionalSchemas&gt;\r\n    &lt;xsd:schema&gt;\r\n      &lt;xsd:element name=&quot;Pet&quot;&gt;\r\n        &lt;xsd:complexType&gt;\r\n          &lt;xsd:sequence&gt;\r\n            &lt;xsd:element name=&quot;id&quot; type=&quot;xsd:decimal&quot; /&gt;\r\n            &lt;xsd:element name=&quot;Category&quot;&gt;\r\n              &lt;xsd:complexType&gt;\r\n                &lt;xsd:sequence&gt;\r\n                  &lt;xsd:element name=&quot;id&quot; type=&quot;xsd:decimal&quot; /&gt;\r\n                  &lt;xsd:element name=&quot;name&quot; type=&quot;xsd:string&quot; /&gt;\r\n                &lt;/xsd:sequence&gt;\r\n              &lt;/xsd:complexType&gt;\r\n            &lt;/xsd:element&gt;\r\n            &lt;xsd:element name=&quot;name&quot; type=&quot;xsd:string&quot; /&gt;\r\n            &lt;xsd:element name=&quot;photoUrl&quot;&gt;\r\n              &lt;xsd:complexType&gt;\r\n                &lt;xsd:sequence&gt;\r\n                  &lt;xsd:element name=&quot;photoUrl&quot; type=&quot;xsd:string&quot; maxOccurs=&quot;unbounded&quot; minOccurs=&quot;0&quot; /&gt;\r\n                &lt;/xsd:sequence&gt;\r\n              &lt;/xsd:complexType&gt;\r\n            &lt;/xsd:element&gt;\r\n            &lt;xsd:element name=&quot;tag&quot;&gt;\r\n              &lt;xsd:complexType&gt;\r\n                &lt;xsd:sequence&gt;\r\n                  &lt;xsd:element name=&quot;Tag&quot; maxOccurs=&quot;unbounded&quot; minOccurs=&quot;0&quot;&gt;\r\n                    &lt;xsd:complexType&gt;\r\n                      &lt;xsd:sequence&gt;\r\n                        &lt;xsd:element name=&quot;id&quot; type=&quot;xsd:decimal&quot; /&gt;\r\n                        &lt;xsd:element name=&quot;name&quot; type=&quot;xsd:string&quot; /&gt;\r\n                      &lt;/xsd:sequence&gt;\r\n                    &lt;/xsd:complexType&gt;\r\n                  &lt;/xsd:element&gt;\r\n                &lt;/xsd:sequence&gt;\r\n              &lt;/xsd:complexType&gt;\r\n            &lt;/xsd:element&gt;\r\n            &lt;xsd:element name=&quot;status&quot; type=&quot;xsd:string&quot; /&gt;\r\n          &lt;/xsd:sequence&gt;\r\n        &lt;/xsd:complexType&gt;\r\n      &lt;/xsd:element&gt;\r\n    &lt;/xsd:schema&gt;\r\n  &lt;/d:AdditionalSchemas&gt;\r\n&lt;/d:SchemaSet&gt;\r\n</pre>\r\n</details>\r\n\r\n<p>\r\n\r\nI would expect the resulting XML to look like:\r\n\r\n<details>\r\n<summary>expected.xml</summary>\r\n<pre>\r\n&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;\r\n&lt;p:request xmlns:p=&quot;http://syndesis.io/v1/swagger-connector-template/request&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:schemaLocation=&quot;http://syndesis.io/v1/swagger-connector-template/request request.xsd &quot;&gt;\r\n  &lt;p:body&gt;\r\n    &lt;Pet&gt;\r\n      &lt;name&gt;Jackson&lt;/name&gt;\r\n    &lt;/Pet&gt;\r\n  &lt;/p:body&gt;\r\n&lt;/p:request&gt;\r\n</pre>\r\n</details>\r\n\r\n<p>\r\n\r\nInstead I receive this:\r\n\r\n<details>\r\n<summary>received.xml</summary>\r\n<pre>\r\n&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;\r\n&lt;request xmlns:tns=&quot;http://syndesis.io/v1/swagger-connector-template/request&quot;&gt;\r\n  &lt;body&gt;\r\n    &lt;Pet&gt;\r\n      &lt;name&gt;Jackson&lt;/name&gt;\r\n    &lt;/Pet&gt;\r\n  &lt;/body&gt;\r\n&lt;/request&gt;\r\n</pre>\r\n</details>\r\n\r\nSo this places all elements in the default namespace and just declares the namespace `http://syndesis.io/v1/swagger-connector-template/request` with prefix `tns`.\r\n\r\nI would expect that the `request` and `body` elements are using the `tns` prefix, and that the `Pet` and its children are in default namespace."},"comment":{"url":"https://api.github.com/repos/atlasmap/atlasmap/issues/comments/366343706","html_url":"https://github.com/atlasmap/atlasmap/issues/290#issuecomment-366343706","issue_url":"https://api.github.com/repos/atlasmap/atlasmap/issues/290","id":366343706,"user":{"login":"igarashitm","id":265462,"avatar_url":"https://avatars2.githubusercontent.com/u/265462?v=4","gravatar_id":"","url":"https://api.github.com/users/igarashitm","html_url":"https://github.com/igarashitm","followers_url":"https://api.github.com/users/igarashitm/followers","following_url":"https://api.github.com/users/igarashitm/following{/other_user}","gists_url":"https://api.github.com/users/igarashitm/gists{/gist_id}","starred_url":"https://api.github.com/users/igarashitm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/igarashitm/subscriptions","organizations_url":"https://api.github.com/users/igarashitm/orgs","repos_url":"https://api.github.com/users/igarashitm/repos","events_url":"https://api.github.com/users/igarashitm/events{/privacy}","received_events_url":"https://api.github.com/users/igarashitm/received_events","type":"User","site_admin":false},"created_at":"2018-02-16T20:03:40Z","updated_at":"2018-02-16T20:03:40Z","author_association":"OWNER","body":"UI is still doing wrong with namespace handling. I'll continue on that."}}
{"actor":{"display_login":"igarashitm"}}