Hi, I am trying to post data on a soap server but I am failed to send it.
Given service returns city weather again a zip code http://wsf.cdyne.com/WeatherWS/Weather.asmx/GetCityWeatherByZIP http://wsf.cdyne.com/WeatherWS/Weather.asmx?op=GetCityWeatherByZIP (main site ) here are fully params for that POST /WeatherWS/Weather.asmx HTTP/1.1 Host: wsf.cdyne.com Content-Type: text/xml; charset=utf-8 Content-Length: length SOAPAction: "http://ws.cdyne.com/WeatherWS/GetCityWeatherByZIP" <?xml version="1.0" encoding="utf-8"?> soap:Body string /soap:Body <https://github.com/soap:Body> /soap:Envelope <https://github.com/soap:Envelope> here is my code var body = '<?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <GetCityWeatherByZIP xmlns="http://ws.cdyne.com/WeatherWS/"> <ZIP>string</ZIP> </GetCityWeatherByZIP> </soap:Body> </soap:Envelope>'; var url = "http://wsf.cdyne.com/WeatherWS/Weather.asmx/GetCityWeatherByZIP"; var Curl = require('node-libcurl').Curl; curl = new Curl(); curl.setOpt('URL', url); curl.setOpt('SSL_VERIFYHOST', 0); curl.setOpt('SSL_VERIFYPEER', 0); curl.setOpt('HTTPHEADER', [{"Content-Type": 'text/xml'}]); curl.setOpt('POSTFIELDS', body); curl.on('end', function (statusCode, body, headers) { }); curl.on('error', function (error) { console.log(error); }); curl.perform(); -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/9ddd1006-d1a0-441a-9a44-ea45b135ac3c%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
