PDA

View Full Version : How to access a WCF service?



JBlinten
3 May 2012, 7:36 AM
Hi!

I am stuck on the very basic problem of finding the correct url to use.

I have made a simple WCF WebService via Visual Studio 10. The service seems to work fine. When I debug the project, the "WCF Test Client" loads and I can invoke all the requests which are defined. I can set breakpoints in my interface & step through the server code when submitted by the Test Client.

Can I do the same thing from ExtJS? I have tried many different url's in an Ajax proxy with no luck. I have scoured the forums and found tons of posts on .Net. However, the results are overwhelming and have not helped.

scottmartin
3 May 2012, 8:44 AM
You may have to look around the NET for this. I was able to find this:
http://ziuek.blogspot.com/2009/04/extjs-and-net-webservices.html
http://michaelarnwine.com/b2evolution/index.php/2010/07/12/wcf-resftul-services-and-extjs

Good luck

Regards,
Scott.

JBlinten
3 May 2012, 10:47 AM
Scott,

Many thanks! I have run across both links in my quest. Unfortunately, neither are helpful. I think my basic problem is that I don't know where VS10 is putting the service and I don't know how to control it's location.

BTW - I am using IIS as a localhost.

Has Sencha posted any info on best practices with common web servers. Clients can't do much without servers!

My background in mostly Windows app development & this is my 1st client side project. It is incredibly frustrating to be able to build a web service with VS10 with 4-5 clicks & then spend days trying to figure out how to use it from ExtJS.......

JBlinten
10 May 2012, 10:41 AM
Just an update on my progress with WCF web services. I have given up and now just use calls to an .asp page. There is a great example on this at http://peterkellner.net/2011/11/04/building-an-senchas-extjs-4-0-mvc-application-with-microsofts-asp-net-mvc3-series-basics/

I (http://peterkellner.net/2011/11/04/building-an-senchas-extjs-4-0-mvc-application-with-microsofts-asp-net-mvc3-series-basics/) know that folks have gotten web services to work, but the basic problem is that Sencha does not support SOAP. So, you end up having to use a webHttpBinding as an endpoint on the service. IMHO, this is a hack, since you end up with a service that cannot be used by anything else. For instance, neither the WCF Test Client or soapUI, can access the service since webBinding cannot expose metadata.