wcf-proxy

Invoking WCF service methods without having a proxy

烈酒焚心 提交于 2019-12-20 03:24:06
问题 Is there anyway I can invoke a WCF service without adding service reference or even having a proxy at all. 回答1: You can invoke the service using a HttpWebRequest. Example below:- private static XDocument CallSoapServiceInternal(string uri, string soapAction, string contentType, XDocument reqXml) { var req = (HttpWebRequest)WebRequest.Create(uri); req.ContentType = contentType; req.Method = "POST"; req.Headers.Add("SOAPAction", soapAction); req.Credentials = CredentialCache.DefaultCredentials;

Invoking WCF service methods without having a proxy

巧了我就是萌 提交于 2019-12-20 03:24:00
问题 Is there anyway I can invoke a WCF service without adding service reference or even having a proxy at all. 回答1: You can invoke the service using a HttpWebRequest. Example below:- private static XDocument CallSoapServiceInternal(string uri, string soapAction, string contentType, XDocument reqXml) { var req = (HttpWebRequest)WebRequest.Create(uri); req.ContentType = contentType; req.Method = "POST"; req.Headers.Add("SOAPAction", soapAction); req.Credentials = CredentialCache.DefaultCredentials;

What are the Pitfalls of using a shared static WCF Proxy Client?

醉酒当歌 提交于 2019-12-09 19:15:45
问题 I am considering using a Shared (read static) WCF proxy client for a high throughput application. I believe there is a performance gain in doing this, but I have not benchmarked this as yet. Are there some serious pitfalls to this idea? From my research I can see that there is the issue of handling the fault state, it is not clear what the flow on affect of this state would be to other pending requests. Does anyone have any experience recovering a WCF proxy from it's faulted state? thanks in

Unity to dispose of object

微笑、不失礼 提交于 2019-12-08 18:14:02
问题 Is there a way to make Unity dispose property-injected objects as part of the Teardown? The background is that I am working on an application that uses ASP.NET MVC 2, Unity and WCF. We have written our own MVC controller factory that uses unity to instantiate the controller and WCF proxies are injected using the [Dependency] attribute on public properties of the controller. At the end of the page life cycle the ReleaseController method of the controller factory is called and we call

What is the proper life-cycle of a WCF service client proxy in Silverlight 3?

烂漫一生 提交于 2019-12-04 22:22:17
问题 I'm finding mixed answers to my question out in the web. To elaborate on the question: Should I instantiate a service client proxy once per asynchronous invocation, or once per Silverlight app? Should I close the service client proxy explicitly (as I do in my ASP.NET MVC application calling WCF services synchronously)? I've found plenty of bloggers and forum posters out contradicting each other. Can anyone point to any definitive sources or evidence to answer this once and for all? 回答1: I've

What are the Pitfalls of using a shared static WCF Proxy Client?

早过忘川 提交于 2019-12-04 14:58:57
I am considering using a Shared (read static) WCF proxy client for a high throughput application. I believe there is a performance gain in doing this, but I have not benchmarked this as yet. Are there some serious pitfalls to this idea? From my research I can see that there is the issue of handling the fault state, it is not clear what the flow on affect of this state would be to other pending requests. Does anyone have any experience recovering a WCF proxy from it's faulted state? thanks in advance! Once the channel is in a faulted state it will stay that way. So yes, I think a static client

What is the proper life-cycle of a WCF service client proxy in Silverlight 3?

可紊 提交于 2019-12-03 14:31:01
I'm finding mixed answers to my question out in the web. To elaborate on the question: Should I instantiate a service client proxy once per asynchronous invocation, or once per Silverlight app? Should I close the service client proxy explicitly (as I do in my ASP.NET MVC application calling WCF services synchronously)? I've found plenty of bloggers and forum posters out contradicting each other. Can anyone point to any definitive sources or evidence to answer this once and for all? I've been using Silverlight with WCF since V2 (working with V4 now), and here's what I've found. In general, it

Invoking WCF service methods without having a proxy

落爺英雄遲暮 提交于 2019-12-01 23:48:32
Is there anyway I can invoke a WCF service without adding service reference or even having a proxy at all. You can invoke the service using a HttpWebRequest. Example below:- private static XDocument CallSoapServiceInternal(string uri, string soapAction, string contentType, XDocument reqXml) { var req = (HttpWebRequest)WebRequest.Create(uri); req.ContentType = contentType; req.Method = "POST"; req.Headers.Add("SOAPAction", soapAction); req.Credentials = CredentialCache.DefaultCredentials; req.Timeout = 20000; //req.Timeout = System.Threading.Timeout.Infinite; using (var reqStream = req

Handling WCF Proxy null return issue

▼魔方 西西 提交于 2019-11-28 12:43:52
I have a WCF Client Proxy connected to a third party webservice. The proxy works fine with nearly everything except on function. This function works just fine with a ASMX proxy. I have added service trace logging and can see the response from the service coming back. Only the proxy returns null. So now I know for sure that the proxy is at fault. Where to from here? RESOLUTION I found the issue. WCF is less forgiving than an ASMX proxy. The service WSDL specifies that the returned object was called "data", and the actual xml passed back was called "result" So that was a great goose chase! I

Handling WCF Proxy null return issue

吃可爱长大的小学妹 提交于 2019-11-27 07:11:26
问题 I have a WCF Client Proxy connected to a third party webservice. The proxy works fine with nearly everything except on function. This function works just fine with a ASMX proxy. I have added service trace logging and can see the response from the service coming back. Only the proxy returns null. So now I know for sure that the proxy is at fault. Where to from here? RESOLUTION I found the issue. WCF is less forgiving than an ASMX proxy. The service WSDL specifies that the returned object was