{"action":"created","issue":{"url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/issues/1412","repository_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler","labels_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/issues/1412/labels{/name}","comments_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/issues/1412/comments","events_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/issues/1412/events","html_url":"https://github.com/strongloop/loopback-datasource-juggler/issues/1412","id":237004597,"number":1412,"title":"Js-code from lib/model.js gets included in SOAP-request causing SOAP-fault","user":{"login":"jmmeijer","id":3023972,"avatar_url":"https://avatars0.githubusercontent.com/u/3023972?v=4","gravatar_id":"","url":"https://api.github.com/users/jmmeijer","html_url":"https://github.com/jmmeijer","followers_url":"https://api.github.com/users/jmmeijer/followers","following_url":"https://api.github.com/users/jmmeijer/following{/other_user}","gists_url":"https://api.github.com/users/jmmeijer/gists{/gist_id}","starred_url":"https://api.github.com/users/jmmeijer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmmeijer/subscriptions","organizations_url":"https://api.github.com/users/jmmeijer/orgs","repos_url":"https://api.github.com/users/jmmeijer/repos","events_url":"https://api.github.com/users/jmmeijer/events{/privacy}","received_events_url":"https://api.github.com/users/jmmeijer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"rashmihunt","id":19983365,"avatar_url":"https://avatars3.githubusercontent.com/u/19983365?v=4","gravatar_id":"","url":"https://api.github.com/users/rashmihunt","html_url":"https://github.com/rashmihunt","followers_url":"https://api.github.com/users/rashmihunt/followers","following_url":"https://api.github.com/users/rashmihunt/following{/other_user}","gists_url":"https://api.github.com/users/rashmihunt/gists{/gist_id}","starred_url":"https://api.github.com/users/rashmihunt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rashmihunt/subscriptions","organizations_url":"https://api.github.com/users/rashmihunt/orgs","repos_url":"https://api.github.com/users/rashmihunt/repos","events_url":"https://api.github.com/users/rashmihunt/events{/privacy}","received_events_url":"https://api.github.com/users/rashmihunt/received_events","type":"User","site_admin":false},"assignees":[{"login":"rashmihunt","id":19983365,"avatar_url":"https://avatars3.githubusercontent.com/u/19983365?v=4","gravatar_id":"","url":"https://api.github.com/users/rashmihunt","html_url":"https://github.com/rashmihunt","followers_url":"https://api.github.com/users/rashmihunt/followers","following_url":"https://api.github.com/users/rashmihunt/following{/other_user}","gists_url":"https://api.github.com/users/rashmihunt/gists{/gist_id}","starred_url":"https://api.github.com/users/rashmihunt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rashmihunt/subscriptions","organizations_url":"https://api.github.com/users/rashmihunt/orgs","repos_url":"https://api.github.com/users/rashmihunt/repos","events_url":"https://api.github.com/users/rashmihunt/events{/privacy}","received_events_url":"https://api.github.com/users/rashmihunt/received_events","type":"User","site_admin":false}],"milestone":null,"comments":17,"created_at":"2017-06-19T19:52:32Z","updated_at":"2018-03-21T21:32:06Z","closed_at":null,"author_association":"NONE","body":"<!--\r\nQuestions:\r\n  https://groups.google.com/forum/#!forum/loopbackjs\r\n  https://gitter.im/strongloop/loopback\r\nImmediate support:\r\n  https://strongloop.com/api-connect-faqs/\r\n  https://strongloop.com/node-js/subscription-plans/\r\n-->\r\n\r\n# Steps to reproduce\r\n- [ ] bug\r\n\r\nI have auto discovered a SOAP 1.1 Webservice with `lb soap` and Loobback created models as expected. However when using the StrongLoop API explorer, the SOAP requests fail as they are not properly formatted.\r\n\r\n**Stack trace**\r\n````\r\n\"Error: faultcode: soap:Client faultstring: Unmarshalling Error: cvc-complex-type.2.4.a: Invalid content was found starting with element '__cachedRelations'. One of '{xxx, xxx}' is expected.\r\nat XMLHandler.xmlToJson (testapp\\node_modules\\strong-soap\\src\\parser\\xmlHandler.js:635:23)\r\nat testapp\\node_modules\\strong-soap\\src\\client.js:279:28\r\nat testapp\\node_modules\\loopback\\node_modules\\loopback-datasource-juggler\\lib\\observer.js:172:22\r\nat doNotify (testapp\\node_modules\\loopback\\node_modules\\loopback-datasource-juggler\\lib\\observer.js:99:49)\r\nat SOAPConnector.ObserverMixin._notifyBaseObservers (testapp\\node_modules\\loopback\\node_modules\\loopback-datasource-juggler\\lib\\observer.js:122:5)\r\nat SOAPConnector.ObserverMixin.notifyObserversOf (testapp\\node_modules\\loopback\\node_modules\\loopback-datasource-juggler\\lib\\observer.js:97:8)\r\nat cbForWork (testapp\\node_modules\\loopback\\node_modules\\loopback-datasource-juggler\\lib\\observer.js:162:14)\r\nat Request._callback (testapp\\node_modules\\loopback-connector-soap\\lib\\http.js:98:9)\r\nat Request.self.callback (testapp\\node_modules\\request\\request.js:188:22)\r\nat emitTwo (events.js:106:13)\r\nat Request.emit (events.js:191:7)\r\nat Request.<anonymous> (testapp\\node_modules\\request\\request.js:1171:10)\r\nat emitOne (events.js:96:13)\r\nat Request.emit (events.js:188:7)\r\nat IncomingMessage.<anonymous> (testapp\\node_modules\\request\\request.js:1091:12)\\\r\nat IncomingMessage.g (events.js:292:16)\"\r\n````\r\n\r\nWhen enabling the debug on `loopback:persisted-model` I can see the SOAP xml is cluttered by code originating from `strongloop/loopback-datasource-juggler` as is mentioned in [issue 77 from loopback-connecter-soap](https://github.com/strongloop/loopback-connector-soap/issues/77) by @liudonghua123. Since the code is in this repo I thought it would be best to open an issue here.\r\n<!--\r\nIf feature: A description of the feature\r\nIf bug: Steps to reproduce + link to sample repo\r\n-->\r\n\r\n# Expected result\r\nI would expect the SOAP request to be properly formatted. And a SOAP response without an error.\r\n\r\n<!--\r\nAlso include actual results if bug\r\n-->\r\n\r\n# Additional information\r\n\r\n<!--\r\nCopy+paste the output of these two commands:\r\n  node -e 'console.log(process.platform, process.arch, process.versions.node)'\r\n  npm ls --prod --depth 0 | grep loopback\r\n-->\r\nwin32 x64 6.11.0\r\n\r\n+-- loopback@3.8.0\r\n+-- loopback-boot@2.24.1\r\n+-- loopback-component-explorer@2.7.0\r\n+-- loopback-connector-soap@4.0.0\r\n+-- loopback-datasource-juggler@3.9.1"},"comment":{"url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/issues/comments/375102946","html_url":"https://github.com/strongloop/loopback-datasource-juggler/issues/1412#issuecomment-375102946","issue_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/issues/1412","id":375102946,"user":{"login":"stale[bot]","id":26384082,"avatar_url":"https://avatars2.githubusercontent.com/u/26350515?v=4","gravatar_id":"","url":"https://api.github.com/users/stale%5Bbot%5D","html_url":"https://github.com/apps/stale","followers_url":"https://api.github.com/users/stale%5Bbot%5D/followers","following_url":"https://api.github.com/users/stale%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/stale%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/stale%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stale%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/stale%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/stale%5Bbot%5D/repos","events_url":"https://api.github.com/users/stale%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/stale%5Bbot%5D/received_events","type":"Bot","site_admin":false},"created_at":"2018-03-21T21:32:06Z","updated_at":"2018-03-21T21:32:06Z","author_association":"NONE","body":"This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.\n"}}
{"actor":{"display_login":"stale"}}