简体   繁体   中英

Making WCF web service look like a ASMX web service when asked?

I'm currently using Xcelsius to connect to my WCF web service, however it doesn't work. Googling around I see that Xcelsius can't connect to WCF web services but can't seem to find out why.

Assuming the web service gives away what type it is (WCF or ASMX) is it possible to perhaps spoof this? Something similar changing your user agent in a browser.

Edit

Xcelsius is expecting the address to the services WSDL (http://localhost:3951/Service1.svc?wsdl). As for the format that my WCF service is emiting, it's

public string GetData(int value)
{
    return string.Format("You entered: {0}", value);
}

I've also tried using FlatWSDL, however that doesn't seem to change anything.

Simply use basicHttpBinding in your service, and will look like an ASMX service to any consumer.

That still might not be enough, if the consumer is expecting a particular format. You would then need to duplicate the expected format.

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