node-soap | A SOAP client and server for node.js | SOAP library
kandi X-RAY | node-soap Summary
kandi X-RAY | node-soap Summary
A SOAP client and server for node.js.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Create a stubbed client .
- Returns a method that calls call to a given error .
- Returns a method that calls a method on the response .
- Reset all stub methods on the client .
- Registers a stubbed client .
- Reset stub methods
- Gets stubbed stub for a client .
node-soap Key Features
node-soap Examples and Code Snippets
Community Discussions
Trending Discussions on node-soap
QUESTION
On server side the wsdl is used to build/describe the soap api, however, when using the node-soap to make a soap client - what is the wsdl used for?
This guy seems to write every tiny bit of the XML as JSON and adding it all as arguments in the method call - Shouldn't the WSDL and node-soap package do some magic here to simplify the arguments needed for the request?
...ANSWER
Answered 2021-Aug-03 at 11:19When you have a SOAP web service, you have to send messages using SOAP... obviously.
That means that from whatever programming language you make a call, or from whatever programming language you build a response, you need to marshal and unmarshal objects to SOAP XML and vice-versa.
Because SOAP is a protocol, it is strict on how those XML messages must look. And because there are strict rules, you can have tools generate those messages and handle that marshal/unmarshal for you automatically, if only you had some description of the service's API that can be used by the tools. And here is where the WSDL enters.
The WSDL describes the contract exposed by the SOAP web service, and at the same time, the contract clients need to respect in order to make the calls. With appropriate tools, you can generate skeleton code on the server and stub code on the client from the WSDL to handle the SOAP communication for you. That can be done statically by generating code, or dynamically by reading the WSDL during execution and exposing methods that you can use to invoke the service's operations.
So, to answer your question, node-soap on the client side creates a dynamic client by reading the WSDL and then allows you to call SOAP operations on the web service like JavaScript methods, instead of bothering to write SOAP XML by hand. You can obviously build that SOAP XML by hand if you don't have a client, but if you have a client already you should use that as it keeps things more clean.
QUESTION
I'm trying to make a SOAP request using node-soap - I can successful create a client but when I try to call the operation defined in the WSDL it returns undefined
? Is this how I correctly call an operation?
ANSWER
Answered 2021-Jun-28 at 14:56You have to use the Async
Method.
Append Async
to the method GetStockInfoNewOrdersForSeasonAsync
QUESTION
I'm trying to build a node service to pull information from Quickbooks Desktop. The most logical route seems to be the Quickbooks Desktop Web Connector.
I have tried with both quickbooks-js and creating a node-soap class from the wsdl and while the server runs fine, I don't see any logs about connections.
From the client side, I have been trying to connect to this nodejs service, but QBWC almost immediately stops responding. This is the full log for attempting to add my connection:
Log file initialized at Monday, January 11, 2021 - 7:44 AM UTC
Timestamp format used: YYYYMMDD.HH:MM:SS UTC QBWebConnector 2.2 has been initialized with its logging status to level = DEBUG. Please restart QBWebConnector for any change in log level to take effect. Use file menu to clear log.20210111.07:44:08 UTC : QBWebConnector.RegistryManager.setUpdateLock() : HKEY_CURRENT_USER\Software\Intuit\QBWebConnector\UpdateLock has been set to False 20210111.07:44:08 UTC : QBWebConnector.RegistryManager.setUpdateLock() : ********************* Update session unlocked ********************* 20210111.07:44:09 UTC : QBWebConnector.RegistryManager.setUpdateLock() : HKEY_CURRENT_USER\Software\Intuit\QBWebConnector\UpdateLock has been set to False 20210111.07:44:09 UTC : QBWebConnector.RegistryManager.setUpdateLock() : ********************* Update session unlocked ********************* 20210111.07:44:09 UTC : QBWebConnector_Load() : QuickBooks Web Connector 2.3.0.198 has started. Monday, January 11, 2021 at 7:44:09 AM 20210111.07:44:09 UTC : QBWebConnector_Load() : QBWC Form Loaded 20210111.07:44:20 UTC : QWCReader.ParseQWC() : Contents of QWC file: - Troubleshoot access via QuickBooks
IDNTS_FS1
https://8001-XXX.ws-eu03.gitpod.io
Helps troubleshoot QBWebConnector for QuickBooks
https://8001-XXX.ws-eu03.gitpod.io
test
{A9A83089-7DA7-4d27-A08C-7E1626E9395A}
{AE931E67-4AA5-4374-A32D-8EA4BEC91981}
QBFS Document
0xF 20210111.07:44:20 UTC : QBWebConnector.WebServiceManager.ReadQWC(QWCReader QWC) : Parsing application configuration xml file to load its content to variables
From the client side, I have tried the Quickbooks testing connection, and received the following logfile (looks like it worked):
Log file initialized at Friday, January 8, 2021 - 12:25 PM UTC
Timestamp format used: YYYYMMDD.HH:MM:SS UTC QBWebConnector 2.2 has been initialized with its logging status to level = DEBUG. Please restart QBWebConnector for any change in log level to take effect. Use file menu to clear log.20210108.12:25:31 UTC : QBWebConnector.RegistryManager.setUpdateLock() : HKEY_CURRENT_USER\Software\Intuit\QBWebConnector\UpdateLock has been set to False 20210108.12:25:31 UTC : QBWebConnector.RegistryManager.setUpdateLock() : ********************* Update session unlocked ********************* 20210108.12:25:31 UTC : QBWebConnector.RegistryManager.setUpdateLock() : HKEY_CURRENT_USER\Software\Intuit\QBWebConnector\UpdateLock has been set to False 20210108.12:25:31 UTC : QBWebConnector.RegistryManager.setUpdateLock() : ********************* Update session unlocked ********************* 20210108.12:25:31 UTC : QBWebConnector_Load() : QuickBooks Web Connector 2.3.0.198 has started. Friday, January 8, 2021 at 12:25:31 PM 20210108.12:25:31 UTC : QBWebConnector_Load() : QBWC Form Loaded 20210108.12:26:19 UTC : QWCReader.ParseQWC() : Contents of QWC file: - Troubleshoot access via QuickBooks
onError="s......
IDNTS_FS1
https://test.developer.intuit.com/QBWC/TroubleshootWebServiceFS/Service.asmx Helps troubleshoot QBWebConnector for QuickBooks
http://developer.intuit.com/QBWebConnector/
test
{A9A83089-7DA7-4d27-A08C-7E1626E9395A}
{AE931E67-4AA5-4374-A32D-8EA4BEC91981}
QBFS Document
0xF 20210108.12:26:19 UTC : QBWebConnector.WebServiceManager.ReadQWC(QWCReader QWC) : Parsing application configuration xml file to load its content to variables 20210108.12:26:30 UTC : QBWebConnector.RegistryManager.createRegKey() : Error creating registry key for appName = <> 20210108.12:26:30 UTC : QBWebConnector.RegistryManager.createRegKey() : Reason: Value cannot be null. Parameter name: name 20210108.12:26:30 UTC : QBWebConnector.SOAPWebService.SerializeToRegistry() : Error saving Troubleshoot access via QuickBooks to Registry: Object reference not set to an instance of an object. 20210108.12:26:30 UTC : QBWebConnector.SOAPWebService.ConnectToQB() : Connecting to QuickBooks... 20210108.12:26:52 UTC : QBWebConnector.SOAPWebService.ConnectToQB() : Connected., Session started 20210108.12:26:52 UTC : QBWebConnector.SOAPWebService.AddToQuickBooks() : Application name = Troubleshoot access via QuickBooks 20210108.12:26:52 UTC : QBWebConnector.SOAPWebService.AddToQuickBooks() : Querying company file to find if owner/file id exists. 20210108.12:26:52 UTC : QBWebConnector.SOAPWebService.findFileIDinQB() : Latest QBXML version supported = v14.0 20210108.12:26:52 UTC : QBWebConnector.SOAPWebService.findFileIDinQB() : Querying QuickBooks for existance of owner/file id 20210108.12:26:52 UTC : QBWebConnector.SOAPWebService.findFileIDinQB() : XML dump follows: -20210108.12:26:53 UTC : QBWebConnector.SOAPWebService.findFileIDinQB() : XML dump follows: -
requestID="......20210108.12:26:53 UTC : QBWebConnector.SOAPWebService.findFileIDinQB() : Status message: A query request did not find a matching object in QuickBooks 20210108.12:26:53 UTC : QBWebConnector.SOAPWebService.AddToQuickBooks() : FileID did not exist. Creating new FileID in company file 20210108.12:26:53 UTC : QBWebConnector.SOAPWebService.registerDataExtInQB() : Creating DataExtDef named FileID assigned to Company object for the ownerID = {A9A83089-7DA7-4d27-A08C-7E1626E9395A} 20210108.12:26:53 UTC : QBWebConnector.SOAPWebService.registerDataExtInQB() : XML dump follows: -
onError="s......20210108.12:26:53 UTC : QBWebConnector.SOAPWebService.registerDataExtInQB() : XML dump follows: -
requestID="1"......20210108.12:26:53 UTC : QBWebConnector.SOAPWebService.registerDataExtInQB() : Data extension definition has been created in QuickBooks for owner id. 20210108.12:26:53 UTC : QBWebConnector.SOAPWebService.AddToQuickBooks() : Registered FileID to company file successfully. 20210108.12:26:53 UTC : QBWebConnector.SOAPWebService.enterDataExtValueInQB() : XML dump follows: -
onError="s......20210108.12:26:53 UTC : QBWebConnector.SOAPWebService.enterDataExtValueInQB() : XML dump follows: -
requestID="1" st......20210108.12:26:53 UTC : QBWebConnector.SOAPWebService.enterDataExtValueInQB() : Data extension value has been created in QuickBooks for FileID 20210108.12:26:53 UTC : QBWebConnector.SOAPWebService.AddToQuickBooks() : Entered FileID value to company file successfully. 20210108.12:26:53 UTC : QBWebConnector.SOAPWebService.registerDataExtInQB() : Creating DataExtDef named AppLock assigned to Company object for the ownerID = {A9A83089-7DA7-4d27-A08C-7E1626E9395A} 20210108.12:26:53 UTC : QBWebConnector.SOAPWebService.registerDataExtInQB() : XML dump follows: -
onError="s......20210108.12:26:54 UTC : QBWebConnector.SOAPWebService.registerDataExtInQB() : XML dump follows: -
requestID="1"......20210108.12:26:54 UTC : QBWebConnector.SOAPWebService.registerDataExtInQB() : Data extension definition has been created in QuickBooks for owner id. 20210108.12:26:54 UTC : QBWebConnector.SOAPWebService.AddToQuickBooks() : Registered the AppLock to company file successfully. 20210108.12:26:54 UTC : QBWebConnector.CompanyFileLock.Send_DataExtDefAddRqXML() : XML dump follows: -
onError="s......20210108.12:26:54 UTC : QBWebConnector.CompanyFileLock.Send_DataExtDefAddRqXML() : XML dump follows: -
requestID="1"......
I tried rolling my own XML connection file based on the spec but I eventually copy-pasta'd the spec and just swapped out the URLs. The only file I can get any log after the variable line for is the Quickbooks test one.
I feel like if I can fix logging, I can at least see what the problem is so I have something to work with. I'm using Quickbooks Pro 2021 if that helps.
Thanks for reading.
...ANSWER
Answered 2021-Jan-12 at 07:15So there seems to be some implied limit on the domain length. GitPod's domains are quite long and that seems to have caused the crash. It is undocumented to the best of my knowledge.
QUESTION
I'm making a NodeJS web service that contains API REST and SOAP methods (Im using https://www.npmjs.com/package/soap) with Express. With API REST I don't have any problem but with SOAP I have an inconvenient, when I try to consume the SOAP method from a testing C# application I can see that the parameters are going fine, but in the response I have the next error in C# (Response is not correct XML code)
When I consume the method from a NodeJS client with node-soap too the response working fine.
Part of my NodeJS code:
...ANSWER
Answered 2020-Jul-26 at 05:14Answer to my question, the problem was the WSDL configuration. With this configuration I made this works with C# web reference. The principal problem, the style, I changed it from "rpc" to "document" and configure correctly the element for the response.
QUESTION
I'm using this lib: https://github.com/vpulim/node-soap, to get data from an API. I have a file caled apiDecoder.ts with the following code:
...ANSWER
Answered 2020-Mar-05 at 16:13I sugest you to call all libraries outside class scope, ex:
QUESTION
I'm trying to send a request to a WSDL API from a node.js server on an Ubuntu OS. I'm using node-soap
like this:
ANSWER
Answered 2020-Jan-14 at 05:42Ok, I found the solution. After creating the client, you need to set the end-point like this:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install node-soap
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page