Featured post
Can a WCF service be consumed as if it were an ASP.NET Web Service? -
i'm integrating product vendor our existing processes.
this product interfaces our system via asp.net web service. in, need write asp.net web service has particular method names , parameters vendor has specified.
simple enough, we're wanting migrate stuff possible wcf. haven't used wcf yet, see it's replacement asp.net web services (and other things).
seeing how cannot modify vendor's product, way write new web service using wcf if wcf service can consumed if asp.net web service (i.e., far vendor's product concerned, consuming asp.net web service).
can wcf services consumed in way?
yes, web services web services. in general wcf more flexible , more powerful asp.net, can on-the-wire message , out of wcf service same messages asmx service. but, wcf different default.
migrating should mechanical. replace .asmx file containing this:
<%@ webservice language="c#" codebehind="~/app_code/communicationservice.cs" class="communicationservice" %>
...with .svc file containing this:
<%@ servicehost language="c#" codebehind="~/app_code/communicationservice.cs" service="communicationservice" %>
...and done.
but, default settings wcf web service different asp.net web service. in particular, xml namespaces of incoming , outgoing messages may different. not specifies distinct xml namespaces service , messages, do, migration issue. difference in behavior (wcf-vs-aspnet) cause apps able call asmx service, not work "converted" wcf service.
this article discusses issue in detail, , describes workaround: use custom servicehost.
the service host code in article above incomplete in works fix request schema; might/could need similar response schema.
good luck.
- Get link
- X
- Other Apps
Comments
Post a Comment