简体   繁体   中英

WCF on mono: alternatives?

I have a C# application which needs to do a SOAP call to a 3rd party web service. I made a simple console application to test and started by adding a service reference using the wdsl. VS2013 is creating classes and methods and I can send a request and I get a valid response back. Although the webservice is on https I needed to set <security enableUnsecuredResponse="true" /> in my app config. This test is working fine on my Win8 dev machine.

I need to run this piece of code on a Ubuntu server with Mono and sadly Mono hasn't implemented all WCF stuff.

I first get complaints about missing method enableUnsecuredResponse , when I remove it I get a System.NullReferenceException .

So this road is leading nowhere. What is a good alternative for WCF which will work in Mono as well?

Here is a couple of links, which describe usage of soap services in mono. But you will have to do that in "mono-first" way. I mean, develop your client with mono and mono tools.

  1. http://www.mono-project.com/archived/web_services/#consuming-web-services
  2. http://developer.xamarin.com/guides/cross-platform/Application_Fundamentals/Web_Services/

Thanks Mimas for your reply.

We managed to solve it by using var httpWebResponse = (HttpWebResponse)httpWebRequest.GetResponse(); and create the request our-self using XmlWriter and handle the response our-self as well. It is a lot more work but at least it is working in MONO as well.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM