Click here to Skip to main content
15,891,733 members
Home / Discussions / C#
   

C#

 
GeneralRe: WebService not returning Color Pin
PIEBALDconsult25-Sep-10 9:18
mvePIEBALDconsult25-Sep-10 9:18 
GeneralRe: WebService not returning Color Pin
Luc Pattyn25-Sep-10 9:34
sitebuilderLuc Pattyn25-Sep-10 9:34 
GeneralRe: WebService not returning Color Pin
PIEBALDconsult25-Sep-10 9:52
mvePIEBALDconsult25-Sep-10 9:52 
GeneralRe: WebService not returning Color Pin
Luc Pattyn25-Sep-10 9:54
sitebuilderLuc Pattyn25-Sep-10 9:54 
GeneralRe: WebService not returning Color Pin
PIEBALDconsult25-Sep-10 12:46
mvePIEBALDconsult25-Sep-10 12:46 
GeneralRe: WebService not returning Color Pin
Luc Pattyn25-Sep-10 13:03
sitebuilderLuc Pattyn25-Sep-10 13:03 
GeneralRe: WebService not returning Color Pin
PIEBALDconsult25-Sep-10 13:53
mvePIEBALDconsult25-Sep-10 13:53 
GeneralRe: WebService not returning Color Pin
Keith Barrow25-Sep-10 12:08
professionalKeith Barrow25-Sep-10 12:08 
Luc Pattyn wrote:
OK, let me provide some context. I'm preparing a proposal specification for a CodeProject Web Service, something that would provide information about members, articles, messages, etc, so several existing and future applications (such as CP Vanity) could use it to their advantage, which would be much preferred over fetching web pages and scraping HTML. The proposal would be discussed amongst interested members before Chris might commit to it and implement it.


Finally Smile | :) . WCF might be a better technology in the long run, you can still expose a vanilla SOAP front end from a WCF service, but WCF is designed to be extensible. IIRC WCF is much better at versioning.

Luc Pattyn wrote:

I expect the CP data model (as well as the subset we want access to) will evolve just like anything else, and I do want future old clients not to break under future new service versions.

This is tricky if the service doesn't allow for this at the outset.

Luc Pattyn wrote:
I'm rather pleased with what IIS and WSDL are offering, as it works perfectly for basic types such as int, float, bool, string, as well as DateTime; it works pretty well for Size too.

You can send custom objects types too. The web services are "contract" based, if you let the service know you it returns as type of MyObject as long as this has been correctly defined it will serialize its properties properly. Some framework classes will get though as they are serializable, though obviously the instance changes

Luc Pattyn wrote:
Color does not get through by default; it needs extra code at both ends.

This is a limitation of web services as a whole (a common interview question is explain the differences/conflicts between web services and Object Orientated systems - this is one of the points) even if you provide a client API that does the aforementioned jiggery-pokery Smile | :) , it doesn't guarantee against someone generating / creating their own client class. Conversely, it is good if your service is designed to cope with this, for example the Objective C required for an iPhone App wouldn't play with MS objects coming over the wire. This is why I suggested sending the value to the client, an iPhone app would be able to convert this to a hex value.

The "classical" way of proceeding with a web services is to convert the sever object model information into the serializable message classes (which flatten also often flatten out the object graph), send those across the wire. The client is then responsible for converting the deserialized [proxy generated] class out into the client's object model. It is possible to provide an API dll with the client classes pre-defined (it may even be desirable for .net clients, I have done this in the past) but it is a good idea to make the system interop with other technologies. I'd love an iPhone app, as would others I'd expect, not to mention Android phone users etc.

If you need a hand with this, feel free to e-mail me, I've a fair amount of WCF experience and a bit of Vanilla SOAP services stuff. I've felt the CP has lacked this feature for some time, so I'd be happy to help.

GeneralRe: WebService not returning Color Pin
Luc Pattyn25-Sep-10 12:51
sitebuilderLuc Pattyn25-Sep-10 12:51 
GeneralRe: WebService not returning Color Pin
PIEBALDconsult25-Sep-10 14:00
mvePIEBALDconsult25-Sep-10 14:00 
GeneralRe: WebService not returning Color Pin
Luc Pattyn25-Sep-10 14:18
sitebuilderLuc Pattyn25-Sep-10 14:18 
GeneralRe: WebService not returning Color Pin
PIEBALDconsult25-Sep-10 15:16
mvePIEBALDconsult25-Sep-10 15:16 
GeneralRe: WebService not returning Color Pin
Luc Pattyn25-Sep-10 15:26
sitebuilderLuc Pattyn25-Sep-10 15:26 
GeneralRe: WebService not returning Color Pin
PIEBALDconsult25-Sep-10 16:20
mvePIEBALDconsult25-Sep-10 16:20 
GeneralRe: WebService not returning Color Pin
Luc Pattyn25-Sep-10 17:26
sitebuilderLuc Pattyn25-Sep-10 17:26 
AnswerRe: WebService not returning Color Pin
PIEBALDconsult25-Sep-10 17:34
mvePIEBALDconsult25-Sep-10 17:34 
GeneralRe: WebService not returning Color Pin
Luc Pattyn25-Sep-10 17:44
sitebuilderLuc Pattyn25-Sep-10 17:44 
GeneralRe: WebService not returning Color Pin
PIEBALDconsult25-Sep-10 17:52
mvePIEBALDconsult25-Sep-10 17:52 
GeneralRe: WebService not returning Color Pin
Luc Pattyn25-Sep-10 18:01
sitebuilderLuc Pattyn25-Sep-10 18:01 
GeneralRe: WebService not returning Color Pin
PIEBALDconsult25-Sep-10 18:04
mvePIEBALDconsult25-Sep-10 18:04 
GeneralRe: WebService not returning Color Pin
Luc Pattyn25-Sep-10 18:10
sitebuilderLuc Pattyn25-Sep-10 18:10 
GeneralRe: WebService not returning Color [modified] Pin
PIEBALDconsult25-Sep-10 18:44
mvePIEBALDconsult25-Sep-10 18:44 
AnswerRe: WebService not returning Color Pin
AspDotNetDev25-Sep-10 21:35
protectorAspDotNetDev25-Sep-10 21:35 
GeneralRe: WebService not returning Color Pin
PIEBALDconsult26-Sep-10 5:01
mvePIEBALDconsult26-Sep-10 5:01 
AnswerRe: WebService not returning Color Pin
PIEBALDconsult26-Sep-10 7:31
mvePIEBALDconsult26-Sep-10 7:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.