I have website build using python and I want to connect with point of sell in the client side
there is any way to send data and get result from windows service or any other way ?
You can create and send an HTTP/HTTPS request according to the configuration and specification of the WCF of the service you want to use.
WCF and Python
How to post complex type to WCF using Python's requests?
However, it may not be possible.
WCF with netTcpBinding + cPython
Please start with obtaining service specifications.
Related
We are building a C# Windows Service to host a WCF service integrated with a legacy C++ backend that will service requests made to the WCF service.
Is it possible to construct the C# front-end so that it accepts a minimum SOAP request (possibly a default query in the envelope) and then pass the entire SOAP message (or at least the XML contents of the envelope) to the C++ backend for interpretation so that the details of the interface don't have to be duplicated in C# or exposed to clients of the service (which would know which requests are available and the data structures required for each)?
We would also need to be able to construct partial XML in the C++ backend which the C# front-end would then insert into a SOAP envelope to make the response.
Is it sensible to target using SOAP for this or would it simplify things to use a simpler XML structure (home-grown or alternate standard) that can be passed in its entirety to the backend where the entire response would be constructed?
Thanks for reading, any advice welcomed :)
Well, I am thinking about creating a web application with C# and asp.net mvc 4. The idea is create an asp.net web application that can be use in any browser, so I can use my application anywhere and any computer.
But in the communication, can I use WCF or the communication is over HTTP and I can't choose other transport?
I mean that if WCF is only to communicate two desktop/mobile applications or it could be use for web applications too?
In a web application is possible to have a duplex communication?
You can use HTTP bindings in WCF if you want to use SOAP. Otherwise you may want to look into WebApi which provides a more natural abstraction over HTTP. For duplex communication over HTTP you can consider SignalR.
can I use WCF
Yes, WCF can be hosted in an asp.net application.
Duplex Communication cant induced easily in Client-server model where system is working in disconnected fashion.
What happen when when your client(browser) want some data.
1) Request comes to server
2) Server ask to WCF duplex service and forgot to wait for response as it is duplex in nature.
3) WCF duplex respond to Server with data
4) Now server can process that data either by saving or logging to Database but doesn't know who was the client that asked for and how to intimate them.
So what is the solution
User SignalR with Some weird coding.
OR
Call WCF service directly from Browser by jquery $.ajax call So your browser directly will have response from WCF service.
I am developing a smart device application, which is going to communicate with a wcf service over wi-fi. As there is no option to add a service reference into a smart device project I decided to use the NetCFSvcUtil.exe. Everything works great!
But...
In the end I understood that the application must interact with the service in the background.
Having read this article Microsoft .NET Compact Framework Background Processing Techniques. I decided to use the Asynchronous Web Service Call. There http://msdn.microsoft.com/ru-ru/library/aa347733.aspx I found the /async parameter, but it appeared to not work for the NetCFSvcUtil.exe.
What can I do to get the async proxy for my smart device application? Is there a way to generate it or I'm expected to add async methods to the interface with my own hands? Maybe it would be suitable for .Net CF to use SvcUtil.exe to generate the async proxy in my case?
A further more information like which platform you are using to build your Smart phone application would be helpful.
I have done Blackberry development and consumed web services. There are two ways you could build your web services
RestFul Service - Consumption of web services would be pretty easy. Posting data could be a little pain as multipart form data is posted as stream in Wcf - Rest Starter Kit
Soap Service - If you decide to use SOAP, then for blackberry and Android you have to use preverified KSOAP -2 to send and receive soap messages between your app and the web service. If you decide to use KSOAP -2 , go back ASMX services. Somehow WCF services does not communicate with KSOAP -2 (due to change in SOAP version or something) where as a simple ASMX service works pretty smoothly. There are dozens of article which you could use to learn how to use KSOAP
he original idea was to host it in a windows service...
Windows Services could never be web facing. If you want any thing to be web facing, you need a Web Server !
In the end it worked. The "Add web reference" tool created a proxy with Begin/End async methods and the proxy interacted with the wcf service hosted by a simple console application (later a windows service) through the URL property of the proxy.
I want to ask if i built my server-client application using WCF technique can i connect java client application and objective-c client application with this server technique . because i want to build cross-platform application but i want the server to be c# server
Can I connect them together or not ?
is there another technique for the server application using c# ?
Yes you should be using RESTful service in order to create cross platform service. this way you can access your wcf service methods using
http://yourdomain.com//service.svc/users/{username}/bookmarks?tag={tag}
But there is a problem with consuming restful service you need to implement authentication in order to secure them properly to avoid DOS attack and other malicious use. Best approach to secure restful service is to use Hashing paramters in every service call. hash param could be derived from a secretkey,datetime, message salt etc.. for more info check this.
WCF, RESTful Web Services and custom authentication
I would suggest you should be creating restful service in JSON format so that it will be light weight and cause less overhead on data package.
http://www.codeproject.com/Articles/327420/WCF-REST-Service-with-JSON
Regards.
I have a WCF webservice that acts as a proxy between a WCF windows service and a client interface. This is done so that our program can have a central "state" server, while the webservices can be distributed.
Ideally i would like to cut out the middle IIS hosted WCF webservice serialization and feed the bytes sent by the client directly to the windows service via IIS. Is this possible?
Why not using NLB directly? I think that a cluster will do a better job distributing requests than a proxy WCF service.
It's possible but you'll want to not use WCF in the middle. The level of difficulty depends on the technology you're using for your transport. For example, if you're using BasicHttp (good ol' SOAP) you can write a proxy in ASP.NET that routes the bytes from the client to the server via an HttpWebRequest.
You also could consider installing a reverse proxy on your web boxes to route your WCF requests through to your central web service.