Best Way To Parse A WSDL File In JavaScript
javascript, node.js
Solution
You could use wsdj2j module to consume a WSDL file and generate Javascript library
First, you need to consume your WSDL and generate appropriate JS:
wsdl2.js [serviceName] [/local/path/to/wsdl]
Then prepare the request:
var Service = require("path/to/generated/code");
var EC2 = require("lib/EC2");
This is how we create a new request:
var someRequest = new Service.[WSDL-Binding-Name].[WSDL-Operation-Name]();
var json = { someNumber: 1, someString: "1" };
someRequest = new Service.TestRequest(json);
// someRequest.someNumber == 1
// someRequest.someString == "1"
Executing the request:
someRequest.request(function(err, response) {
// 'response' is a modeled object, it WILL conform to the WSDL.
//... w00p!
});
Problem
am Looking For the Best Way To Parse WSDL File using JavaScript , am developing a small application to generate code for a web Service after the user uploads a wsdl file . So what is the Best Way to implement that , i have no experience in this field ? Best Regards,