{"action":"created","issue":{"url":"https://api.github.com/repos/vpulim/node-soap/issues/788","labels_url":"https://api.github.com/repos/vpulim/node-soap/issues/788/labels{/name}","comments_url":"https://api.github.com/repos/vpulim/node-soap/issues/788/comments","events_url":"https://api.github.com/repos/vpulim/node-soap/issues/788/events","html_url":"https://github.com/vpulim/node-soap/pull/788","id":128459272,"number":788,"title":"Fix schema <xsd:include> support","user":{"login":"aleung","id":271538,"avatar_url":"https://avatars.githubusercontent.com/u/271538?v=3","gravatar_id":"","url":"https://api.github.com/users/aleung","html_url":"https://github.com/aleung","followers_url":"https://api.github.com/users/aleung/followers","following_url":"https://api.github.com/users/aleung/following{/other_user}","gists_url":"https://api.github.com/users/aleung/gists{/gist_id}","starred_url":"https://api.github.com/users/aleung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aleung/subscriptions","organizations_url":"https://api.github.com/users/aleung/orgs","repos_url":"https://api.github.com/users/aleung/repos","events_url":"https://api.github.com/users/aleung/events{/privacy}","received_events_url":"https://api.github.com/users/aleung/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-01-25T04:31:12Z","updated_at":"2016-01-27T03:14:11Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/vpulim/node-soap/pulls/788","html_url":"https://github.com/vpulim/node-soap/pull/788","diff_url":"https://github.com/vpulim/node-soap/pull/788.diff","patch_url":"https://github.com/vpulim/node-soap/pull/788.patch"},"body":"node-soap has support to <xsd:import> which imports schema definitions of _other_ target namespace. But it has issue in support to <xsd:include> which refer to definitions in the _same_ target namespace. Definitions (elements, types, complexTypes) from included file will overwrite existing definitions in the same target namespace.\r\n\r\nIn below example, after include file `types.xsd` is processed, elements `DummyRequest` and `DummyResponse` will be gone.\r\n\r\n        <xs:schema targetNamespace=\"http://www.dummy.com/Types\"\r\n                   xmlns:xs=\"http://www.w3.org/2001/XMLSchema\"\r\n                   xmlns:dummy=\"http://www.dummy.com/Types\"\r\n                   elementFormDefault=\"qualified\" attributeFormDefault=\"unqualified\">\r\n            <xs:include schemaLocation=\"types.xsd\"/>\r\n            <xs:element name=\"DummyRequest\">\r\n                <xs:complexType>\r\n                    <xs:sequence>\r\n        \t\t\t\t<xs:element name=\"ID\" type=\"dummy:IdType\"/>\r\n        \t\t\t\t<xs:element name=\"Name\" type=\"dummy:NameType\"/>\r\n                    </xs:sequence>\r\n                </xs:complexType>\r\n            </xs:element>\r\n            <xs:element name=\"DummyResponse\">\r\n                <xs:complexType>\r\n                    <xs:sequence>\r\n                        <xs:element name=\"Result\" type=\"dummy:DummyList\"/>\r\n                    </xs:sequence>\r\n                </xs:complexType>\r\n            </xs:element>\r\n        </xs:schema>\r\n\r\nThe issue is because that lodash `merge()` can only merge plain object. `SchemaElement` is not plain object so after merge it's overwritten."},"comment":{"url":"https://api.github.com/repos/vpulim/node-soap/issues/comments/175363740","html_url":"https://github.com/vpulim/node-soap/pull/788#issuecomment-175363740","issue_url":"https://api.github.com/repos/vpulim/node-soap/issues/788","id":175363740,"user":{"login":"aleung","id":271538,"avatar_url":"https://avatars.githubusercontent.com/u/271538?v=3","gravatar_id":"","url":"https://api.github.com/users/aleung","html_url":"https://github.com/aleung","followers_url":"https://api.github.com/users/aleung/followers","following_url":"https://api.github.com/users/aleung/following{/other_user}","gists_url":"https://api.github.com/users/aleung/gists{/gist_id}","starred_url":"https://api.github.com/users/aleung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aleung/subscriptions","organizations_url":"https://api.github.com/users/aleung/orgs","repos_url":"https://api.github.com/users/aleung/repos","events_url":"https://api.github.com/users/aleung/events{/privacy}","received_events_url":"https://api.github.com/users/aleung/received_events","type":"User","site_admin":false},"created_at":"2016-01-27T03:14:11Z","updated_at":"2016-01-27T03:14:11Z","body":"@herom Please review the new commit."}}