{"id":20226052,"url":"https://github.com/moszeed/easysoap","last_synced_at":"2025-05-15T23:07:12.415Z","repository":{"id":7116841,"uuid":"8410828","full_name":"moszeed/easysoap","owner":"moszeed","description":"A simple to use SoapClient for Node.js","archived":false,"fork":false,"pushed_at":"2025-04-07T04:12:55.000Z","size":100,"stargazers_count":129,"open_issues_count":12,"forks_count":61,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-04-30T14:33:06.468Z","etag":null,"topics":["nodejs","promise","soap-client"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/moszeed.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2013-02-25T14:34:20.000Z","updated_at":"2025-01-16T21:10:58.000Z","dependencies_parsed_at":"2025-04-20T14:15:50.607Z","dependency_job_id":null,"html_url":"https://github.com/moszeed/easysoap","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moszeed%2Feasysoap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moszeed%2Feasysoap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moszeed%2Feasysoap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moszeed%2Feasysoap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moszeed","download_url":"https://codeload.github.com/moszeed/easysoap/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253561432,"owners_count":21927787,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["nodejs","promise","soap-client"],"created_at":"2024-11-14T07:15:57.617Z","updated_at":"2025-05-15T23:07:07.326Z","avatar_url":"https://github.com/moszeed.png","language":"JavaScript","funding_links":["https://www.patreon.com/moszeed"],"categories":[],"sub_categories":[],"readme":"# EasySoap\n\n**easysoap** is a WSDL SoapClient for Node.js.\n\n##### Support\n\n##### [Buy me a Coffee](https://www.patreon.com/moszeed)\n\n\n\n## How to get ?\ninstall with npm\n\n```shell\nnpm i easysoap\n```\n\n## Usage\n\n### get a soapclient instance\n\n    const EasySoap = require('easysoap');\n    const soapClient = EasySoap(params, opts);\n\n**params** createParams, soapOptions  \n**response** instance of easysoap\n\n##### possible parameter data\n*createParams*\n\n    {\n        host               : 'www.example.com',\n        path               : '/soap/path',\n        wsdl               : '/wsdl/path',\n        headers            : Array or Object,\n        rejectUnauthorized : true/false\n    }\n\n*soapOptions*\n\n    {\n        secure : true/false //is https or http\n    }\n\n###### the following methods available after creating an soapclient instance with *easysoap*\n\n#### *call*\n**params** callParams  \n**response** callResponseObject   \n\n#### *getRequestXml*\n**params** callParams  \n**response** xml (string)  \n\n*callParams*\n\n\t{\n\t    method    : \"sampleMethodName\",\n\t    attributes: Object of custom tag attributes for given params,\n\t    params\t: Object/Array of params\n\t}\n\n\n#### *getXmlDataAsJson*\n**params** xml (string)  \n**response** xmldata as json\n\n#### *getAllFunctions*\n**response** Function Names (array)\n\n#### *getMethodParamsByName*\n**params** methodName (string)  \n**response** methodParams (object)\n\n## Examples\n\n\t(() =\u003e {\n\t    'use strict';\n\t    const EasySoap = require('easysoap');\n\t\n\t    // define soap params\n\t    const params = {\n\t\t   host: 'www.sample.com',\n\t\t   path: '/path/soap/',\n\t\t   wsdl: '/path/wsdl/',\n\t\n\t\t   // set soap headers (optional)\n\t\t   headers: [{\n\t\t       'name'      : 'item_name',\n\t            'value'    : 'item_value',\n\t            'namespace': 'item_namespace'\n\t       }]\n\t    }\n\t\n\t    /*\n\t     * create the client\n\t     */\n\t    var soapClient = EasySoap(params);\n\n\n    /*\n     * get all available functions\n     */\n    soapClient.getAllFunctions()\n       .then((functionArray) =\u003e { console.log(functionArray); })\n       .catch((err) =\u003e { throw new Error(err); });\n\n\n\t/*\n\t * get the method params by given methodName\n\t */\n\tsoapClient.getMethodParamsByName('methodName')\n\t   .then((methodParams) =\u003e {\n\t      console.log(methodParams.request);\n\t      console.log(methodParams.response);\n\t    })\n\t    .catch((err) =\u003e { throw new Error(err); });\n\n\n\t/*\n\t * call soap method\n\t */\n\tsoapClient.call({\n\t   method    : 'methodName',\n\t   attributes: {\n\t      xmlns: 'http://www.sample.com'\n\t   },\n\t   params: {\n\t      testParam: 1,\n\t      testParam: [2, 3],\n\t      testParam: {\n\t         '_value'     : 4,\n\t         '_attributes': {\n\t             'xmlns1': 'http://www.sample.com/other'\n\t         }\n\t      }\n\t   }\n\t})\n\t.then((callResponse) =\u003e {\n\t    console.log(callResponse.data);\t// response data as json\n\t    console.log(callResponse.body);\t// response body\n\t    console.log(callResponse.header);  //response header\n\t})\n\t.catch((err) =\u003e { throw new Error(err); });\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoszeed%2Feasysoap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoszeed%2Feasysoap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoszeed%2Feasysoap/lists"}