{"action":"created","issue":{"url":"https://api.github.com/repos/bhoriuchi/vsphere-connect/issues/12","repository_url":"https://api.github.com/repos/bhoriuchi/vsphere-connect","labels_url":"https://api.github.com/repos/bhoriuchi/vsphere-connect/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/bhoriuchi/vsphere-connect/issues/12/comments","events_url":"https://api.github.com/repos/bhoriuchi/vsphere-connect/issues/12/events","html_url":"https://github.com/bhoriuchi/vsphere-connect/issues/12","id":320981727,"node_id":"MDU6SXNzdWUzMjA5ODE3Mjc=","number":12,"title":"Can't pass parameters to method","user":{"login":"kevinmccarthy","id":2191902,"node_id":"MDQ6VXNlcjIxOTE5MDI=","avatar_url":"https://avatars2.githubusercontent.com/u/2191902?v=4","gravatar_id":"","url":"https://api.github.com/users/kevinmccarthy","html_url":"https://github.com/kevinmccarthy","followers_url":"https://api.github.com/users/kevinmccarthy/followers","following_url":"https://api.github.com/users/kevinmccarthy/following{/other_user}","gists_url":"https://api.github.com/users/kevinmccarthy/gists{/gist_id}","starred_url":"https://api.github.com/users/kevinmccarthy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevinmccarthy/subscriptions","organizations_url":"https://api.github.com/users/kevinmccarthy/orgs","repos_url":"https://api.github.com/users/kevinmccarthy/repos","events_url":"https://api.github.com/users/kevinmccarthy/events{/privacy}","received_events_url":"https://api.github.com/users/kevinmccarthy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-05-07T22:34:22Z","updated_at":"2018-05-31T22:50:48Z","closed_at":null,"author_association":"NONE","body":"Looks like method invocation is not slotting arguments into SOAP document properly.\r\n\r\nExample:\r\n```\r\n// list all files in a given datastore\r\nasync function listFiles( client, datastore ) {\r\n    let flags = {\r\n        fileSize: true,\r\n        fileType:  true,\r\n        modification: true\r\n    };\r\n    let spec = {\r\n        details: flags\r\n    }\r\n    let moref = await vconnect.util.moRef( 'HostDatastoreBrowser', datastore.browser );\r\n    return await client.method( 'SearchDatastore_Task', {\r\n        _this: moref,\r\n        dataStorePath: '/',\r\n        searchSpec: spec\r\n    }).then(function(result) {\r\n        console.log( \"Found \" + results.length + \" files on \" + datastore.name );\r\n        return results;\r\n    }).caught(function(err) {\r\n        console.error( \"Can't list files: \" err );\r\n        throw(err);\r\n    });\r\n}\r\n```\r\n\r\nReturns this:\r\n```\r\nCan't list files: {\"errorCode\":400,\"message\":\"Got <dataStorePath> tag when expecting <_this> tag\\n\\nwhile parsing call information for method SearchDatastore_Task\\nat line 1, column 281\\n\\nwhile parsing SOAP body\\nat line 1, column 270\\n\\nwhile parsing SOAP envelope\\nat line 1, column 38\\n\\nwhile parsing HTTP request for method search\\non object of type vim.host.DatastoreBrowser\\nat line 1, column 0\"}\r\n```"},"comment":{"url":"https://api.github.com/repos/bhoriuchi/vsphere-connect/issues/comments/393707267","html_url":"https://github.com/bhoriuchi/vsphere-connect/issues/12#issuecomment-393707267","issue_url":"https://api.github.com/repos/bhoriuchi/vsphere-connect/issues/12","id":393707267,"node_id":"MDEyOklzc3VlQ29tbWVudDM5MzcwNzI2Nw==","user":{"login":"kevinmccarthy","id":2191902,"node_id":"MDQ6VXNlcjIxOTE5MDI=","avatar_url":"https://avatars2.githubusercontent.com/u/2191902?v=4","gravatar_id":"","url":"https://api.github.com/users/kevinmccarthy","html_url":"https://github.com/kevinmccarthy","followers_url":"https://api.github.com/users/kevinmccarthy/followers","following_url":"https://api.github.com/users/kevinmccarthy/following{/other_user}","gists_url":"https://api.github.com/users/kevinmccarthy/gists{/gist_id}","starred_url":"https://api.github.com/users/kevinmccarthy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevinmccarthy/subscriptions","organizations_url":"https://api.github.com/users/kevinmccarthy/orgs","repos_url":"https://api.github.com/users/kevinmccarthy/repos","events_url":"https://api.github.com/users/kevinmccarthy/events{/privacy}","received_events_url":"https://api.github.com/users/kevinmccarthy/received_events","type":"User","site_admin":false},"created_at":"2018-05-31T22:50:48Z","updated_at":"2018-05-31T22:50:48Z","author_association":"NONE","body":"I am not able to specify the enumerated /dynamic types. For instance: \r\nhttps://pubs.vmware.com/vi3/sdk/ReferenceGuide/vim.host.DatastoreBrowser.Query.html\r\n\r\nthe FileFolderQuery is simply a marker (has no attributes or members), but I method.js does not seen to be able to map 'FileFolderQuery', ['FileFolderQuery'], or { FileFolderQuery: null } into that dynamic type definition.\r\n\r\nIs there any way to specify this using a typing function?"}}
{"actor":{"display_login":"kevinmccarthy"}}