michaelkrauklis
Programmer
Hello All,
I'm currently developing an API that will be used by our current clients, as well as future clients yet to be defined. We would like this API to have the ability to be secure, so the built in features for WCF seemed like a natural fit. Unfortunately our current clients are running on non-Microsoft platforms and will have trouble with something like wsHttpBinding. I don't want to spend my time debugging their platforms so I'm hoping to make our interface flexible and accessible to different clients, even at the cost of some security.
That being said, my first thought was to offer up two endpoints: one with a custom/basicHttpBinding, and one with wsHttpBinding. Each of these exposes several variations of operation, some expecting a GET, some a POST with the URL parameters in the HTTP envelope, and others with the XML representation of the request object in the HTTP envelope. This is exacerbated by the varying return types available. Currently I am exposing an XML response that actually contains a status, error message, etc, or a straight string that is a representation of the a fore mentioned structure. In short, this is not a viable long term solution as the API gets more and more complex.
My thoughts are as follows:
* Get rid of the string response and always return structured XML. I say this only because I've been unable to figure out how to return raw text as a response, so since I'm already wrapping with the string element I may as well return the entire response in a more structured fashion.
* Offer up three versions of each operation:
Basic HTTP GET [Request:Url-Params;Response:Xml]
Basic HTTP POST [Request:Xml;Response:Xml]
WS HTTP [Full handshake and security]
I'm thinking this should accommodate my simplest clients, but allow for a more robust solution for those who require it.
Soooo, I've only really been digging into WCF for the past two days and I'm probably going about this all wrong. I'm looking for advice on my methodology and/or my approach. I have looked all over the place and there is plenty of information on deciding what binding should be used, but nothing regarding the decisions to be made when multiple bindings may be required. Maybe multiple bindings is a bad idea to begin with. Any advice will be greatly appreciated.
Thanks,
Mike K.
"If debugging is the process of removing bugs, then programming must be the process of putting them in." --Dykstra
I'm currently developing an API that will be used by our current clients, as well as future clients yet to be defined. We would like this API to have the ability to be secure, so the built in features for WCF seemed like a natural fit. Unfortunately our current clients are running on non-Microsoft platforms and will have trouble with something like wsHttpBinding. I don't want to spend my time debugging their platforms so I'm hoping to make our interface flexible and accessible to different clients, even at the cost of some security.
That being said, my first thought was to offer up two endpoints: one with a custom/basicHttpBinding, and one with wsHttpBinding. Each of these exposes several variations of operation, some expecting a GET, some a POST with the URL parameters in the HTTP envelope, and others with the XML representation of the request object in the HTTP envelope. This is exacerbated by the varying return types available. Currently I am exposing an XML response that actually contains a status, error message, etc, or a straight string that is a representation of the a fore mentioned structure. In short, this is not a viable long term solution as the API gets more and more complex.
My thoughts are as follows:
* Get rid of the string response and always return structured XML. I say this only because I've been unable to figure out how to return raw text as a response, so since I'm already wrapping with the string element I may as well return the entire response in a more structured fashion.
* Offer up three versions of each operation:
Basic HTTP GET [Request:Url-Params;Response:Xml]
Basic HTTP POST [Request:Xml;Response:Xml]
WS HTTP [Full handshake and security]
I'm thinking this should accommodate my simplest clients, but allow for a more robust solution for those who require it.
Soooo, I've only really been digging into WCF for the past two days and I'm probably going about this all wrong. I'm looking for advice on my methodology and/or my approach. I have looked all over the place and there is plenty of information on deciding what binding should be used, but nothing regarding the decisions to be made when multiple bindings may be required. Maybe multiple bindings is a bad idea to begin with. Any advice will be greatly appreciated.
Thanks,
Mike K.
"If debugging is the process of removing bugs, then programming must be the process of putting them in." --Dykstra