Веб-служба WCF в node.js

Может ли кто-нибудь помочь мне сказать, что не так с приведенным ниже кодом

var BasicHttpBinding = require('wcf.js').BasicHttpBinding
, Proxy = require('wcf.js').Proxy
, binding = new BasicHttpBinding()
, proxy = new Proxy(binding,"http://www.restfulwebservices.net/wcf/WeatherForecastService.svc")
, message = '<Envelope xmlns=' +
        '"http://schemas.xmlsoap.org/soap/envelope/">' +
             '<Header />' +
               '<Body>' +
                 '<GetCitiesByCountry xmlns="http://www.restfulwebservices.net/ServiceContracts/2008/01">' +
                  '<Country>korea</Country>' +
                  '</GetCitiesByCountry>' +
                '</Body>' +
           '</Envelope>'

proxy.send(message, "http://www.restfulwebservices.net/ServiceContracts/2008/01/IWeatherForecastService/GetCitiesByCountry", function(response, ctx) {
console.log(response)
});

Я получаю следующую ошибку

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><s:Fault>  <faultcode xmlns:a="http://schemas.microsoft.com/ws/2005/05/addressing/none">a:ActionNotSupported</faultcode><faultstring xml:lang="en-US">The message with Action 'http://www.restfulwebservices.net/ServiceContracts/2008/01/IWeatherForecastService/GetCitiesByCountry' cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher. This may be because of either a contract mismatch (mismatched Actions between sender and receiver) or a binding/security mismatch between the sender and the receiver.  Check that sender and receiver have the same contract and the same binding (including security requirements, e.g. Message, Transport, None).</faultstring></s:Fault></s:Body></s:Envelope>

Любая помощь в этом будет действительно полезной.

Спасибо


person user87267867    schedule 22.03.2013    source источник
comment
вам нужно сравнить сгенерированное мыло/заголовки с рабочим запросом, который вы получаете от клиента wcf   -  person Yaron Naveh    schedule 20.07.2013


Ответы (1)


Wcf.js поддерживает только мыльные сервисы. Вы не можете использовать Wcf.js для веб-служб REST.

person started on node.js    schedule 22.03.2013
comment
Я хочу использовать только для мыльных сервисов. Приведенный выше код является примером этого. или есть ли другой .svc, который я могу взять и использовать в своем коде? - person user87267867; 22.03.2013
comment
тогда как я знаю, что .svc также является мыльным сервисом. - person user87267867; 22.03.2013
comment
@YaronNaveh: Любая помощь в этом. - person user87267867; 25.03.2013