weixin_39644494
weixin_39644494
2021-01-12 10:30

Calling CodeDomProvider.CreateProvider("CSharp") throws Exception in Mono / Linux

I'm in mint 17, tested on mono 3.2.8 and in mono 3.8.0. with node 0.8.27 and in 0.10.32.

I'm getting the same error trying to get a CSharp provider. I need this provider to compile in runtime a Soap proxy client.

This is my node.js client code:


"use strict";
var edge = require('edge');
var ws = edge.func("Startup.cs");
ws( { wsdl: "http://wsf.cdyne.com/WeatherWS/Weather.asmx",
    service: "Weather", 
    method: "GetCityForecastByZIP", 
    parameters: ["33431"]}, 

    function (err, result) {
        if (err) throw err;
        console.log(result);
});

And this is a gist for the Startup.cs file: https://gist.github.com/hernanhht/5e22f134bf52fefadb34

This code works on mono but I'm getting the error on Edge.js


undefined:1
(function (f, ctx) { return function (d, cb) { return f(d, cb, ctx); }; })
                                                      ^
Error: Exception has been thrown by the target of an invocation.
    at unknown source
    at Object.<anonymous> (/home/hernan/kidozen/_connectors/node-soap-api-net/index.js:28:1)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.runMain (module.js:492:10)
    at process.startup.processNextTick.process._tickCallback (node.js:245:9)
</anonymous>

该提问来源于开源项目:tjanczuk/edge

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

4条回答

为你推荐

换一换