{"action":"created","issue":{"url":"https://api.github.com/repos/vpulim/node-soap/issues/548","labels_url":"https://api.github.com/repos/vpulim/node-soap/issues/548/labels{/name}","comments_url":"https://api.github.com/repos/vpulim/node-soap/issues/548/comments","events_url":"https://api.github.com/repos/vpulim/node-soap/issues/548/events","html_url":"https://github.com/vpulim/node-soap/issues/548","id":55996721,"number":548,"title":"How to send args to method?","user":{"login":"kevbaker","id":43454,"avatar_url":"https://avatars.githubusercontent.com/u/43454?v=3","gravatar_id":"","url":"https://api.github.com/users/kevbaker","html_url":"https://github.com/kevbaker","followers_url":"https://api.github.com/users/kevbaker/followers","following_url":"https://api.github.com/users/kevbaker/following{/other_user}","gists_url":"https://api.github.com/users/kevbaker/gists{/gist_id}","starred_url":"https://api.github.com/users/kevbaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevbaker/subscriptions","organizations_url":"https://api.github.com/users/kevbaker/orgs","repos_url":"https://api.github.com/users/kevbaker/repos","events_url":"https://api.github.com/users/kevbaker/events{/privacy}","received_events_url":"https://api.github.com/users/kevbaker/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-30T05:37:06Z","updated_at":"2015-02-09T14:10:17Z","closed_at":"2015-01-30T07:40:08Z","body":"I am attempting to send arguments to a method on this SOAP API. I am getting an error. It seems like I might be formatting the request incorrectly.\r\n\r\n### Describe\r\n\r\nThe \"describe\" method for the service shows\r\n\r\n```javascript\r\n\r\n    var url = 'https://www.floristone.com/webservices4/flowershop.cfc?wsdl';\r\n\r\n    soap.createClient(url, function(err, client) {\r\n      var clientDescribe = client.describe();\r\n\r\n      console.log(\"client describe:\");\r\n      console.log(clientDescribe);\r\n    });\r\n\r\n  // =>\r\n\r\n  getProducts2013: \r\n   { input: \r\n      { APIKey: 'xsd:string',\r\n        APIPassword: 'xsd:string',\r\n        category: 'xsd:string',\r\n        numProducts: 'xsd:double',\r\n        startAt: 'xsd:double' },\r\n```\r\n\r\n\r\n\r\n### Below is my code:\r\n\r\nBased on the above I assume I should be using the \"input\" object keys for my arguments. Does this make sense? \r\n\r\n```javascript\r\nvar soap = require('soap');\r\nvar url = 'https://www.floristone.com/webservices4/flowershop.cfc?wsdl';\r\nvar args = {APIKey:\"key123abc\", APIPassword:\"pwd123abc\", category:\"aaz\", numProducts:10, startAt:0};\r\n\r\nsoap.createClient(url, function(err, client) {\r\n  client.getProducts2013(args, function(err,result){\r\n    if(!err){\r\n      console.log(\"Result:\")\r\n      console.log(result);\r\n      return result.products;\r\n    }\r\n    else {\r\n      console.log(\"Error:\")\r\n      console.log(err);\r\n    }\r\n\r\n  });\r\n});\r\n\r\n// ==> { [TypeError: Cannot read property 'Body' of undefined]...}\r\n```\r\n\r\nThe documentation for the service shows this method `getProducts2013(apiKey, apiPassword, category, numProducts, startAt)`. Does it still make sense for me to format my args the way I have above. I'm getting the above \"Body\" error.\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/vpulim/node-soap/issues/comments/73513798","html_url":"https://github.com/vpulim/node-soap/issues/548#issuecomment-73513798","issue_url":"https://api.github.com/repos/vpulim/node-soap/issues/548","id":73513798,"user":{"login":"matthewcanty","id":2089581,"avatar_url":"https://avatars.githubusercontent.com/u/2089581?v=3","gravatar_id":"","url":"https://api.github.com/users/matthewcanty","html_url":"https://github.com/matthewcanty","followers_url":"https://api.github.com/users/matthewcanty/followers","following_url":"https://api.github.com/users/matthewcanty/following{/other_user}","gists_url":"https://api.github.com/users/matthewcanty/gists{/gist_id}","starred_url":"https://api.github.com/users/matthewcanty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthewcanty/subscriptions","organizations_url":"https://api.github.com/users/matthewcanty/orgs","repos_url":"https://api.github.com/users/matthewcanty/repos","events_url":"https://api.github.com/users/matthewcanty/events{/privacy}","received_events_url":"https://api.github.com/users/matthewcanty/received_events","type":"User","site_admin":false},"created_at":"2015-02-09T14:10:17Z","updated_at":"2015-02-09T14:10:17Z","body":"Hi @kevbaker, do you think a similar thing might be happening to me here: http://stackoverflow.com/questions/28399266/typeerror-when-trying-to-call-national-rail-soap-api-via-node\r\n\r\nCan't figure out what is wrong based on the error - not even if it is client or server side."}}