-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Node-soap example? #19
Comments
I don't have a concrete example but wcf.js input is soap so you can try to ask in node-soap what'ss the best way to just extract the raw soap out of a request without sending it. |
Ya, that's what I was hoping to avoid but it may be the only way. It looks like I don't need WS password or token auth, just basic WSAuth to enforce HTTPS (or so the vendor says). I've narrowed it down to needing to enable: WSBinding supporting WS-A Addressing Version 200508. Is this something I can do through wcf.js? |
Please paste here a sample soap. WSBinding is a potentially complex binding, but if you were able to narrow it down to just the WSA headers, then you can manually push them inside the soap envelope or I'm sure node-soap has built in support for them. |
Ya, that's what I'm hoping, I'm just not familiar enough with XML/Soap in general to know where to put them. node-soap's docs do mention WS-Security, however it looks like they only support creds/token based WS-Security auth. They seem to only be using it to enforce https on transport so I'm wondering if there's a hidden noad-soap setting somewhere I could use to get it talking in the right way to the server. I'm trying to hit the WSDL: https://uat1api.berkeleypayment.com/CAMS/BPSClientAPI.svc?singleWsdl Here is a sample working SOAP request for the Login event (generated by node-soap). I've used made up login creds but you can tell if it's working based on the response:
Here's the current response:
Here is the expected response (using SoapUI's default interpretation of the WSDL, I didn't make any changes to the configs):
|
Might also be worth mentioning how I've implemented node-soap:
Initialization function:
|
Try to use ws.js instead of Wcf.js: https://github.com/yaronn/ws.js#ws-addressing take the values of the action and addr ctor param from an outoging request soap ui sends. |
I figured it out! Thanks so much for the help @yaronn. I ended up getting it to work with node-soap alone. I ended up getting an example XML request working in SoapUI without WS-A enabled then basically hacked around with node-soap until I was able to get it to generate the request format needed. The key was adding an Action soap header with the 'wsa' prefix and respective wsa xmlns schema
I achieved this by re-writing the 'xmlnsInEnvelope' (not sure why this wasn't in the envelope already per the WSDL) and adding the Action to the header like so:
Thanks again |
Does anybody happen to have a working example of integrating wcf.js with https://github.com/vpulim/node-soap?
I need to setup an integration from our node server to a .NET API and it would be great to have an example as a starting point.
Thanks!
The text was updated successfully, but these errors were encountered: