dannywooly

Hi All

Im developing an API in .net 2.0 and i want to keep in mind any useful tips/information relating to migrating it to 3.0. The current idea i have is that each method will take a string of XML with parameters imbedded in it and the return will be an object with xml in the string property.

This allows full intergration to 3rd Parties and offers me a degree of flexibility with the API once released.

Is this a good approach bearing in mind .NET 3.0 might be 4-5 months round the corner for us

Any ideas or tips/tricks to this kind of implementation approach

Thanks for your time

Danny




Re: Windows Communication Foundation (Indigo) API Messaging with WCF

Martin Petersen-Frey - MSFT

That will work fine. Is the interoperatbility offered by WSDL generated proxies insufficient for you The XML string may be unnecessary.




Re: Windows Communication Foundation (Indigo) API Messaging with WCF

dannywooly

Hi

Thanks for the reply, could you expand a bit on your question i didn't quite understand what you ment.

Many thanks

Danny






Re: Windows Communication Foundation (Indigo) API Messaging with WCF

Martin Petersen-Frey - MSFT

I was wondering why you needed to pass an XML string. It's fine but I was wondering. If it's for interop purposes, the WSDL generated for the service endpoints should handle it.






Re: Windows Communication Foundation (Indigo) API Messaging with WCF

dannywooly

Im sorry i don't understand are you saying i can use the WSDL to pass the parameters

Im a little new to this so would appreicate so information or sample code or websites to read and understand.

Thanks for your time

Danny





Re: Windows Communication Foundation (Indigo) API Messaging with WCF

Martin Petersen-Frey - MSFT

No. Here's what I meant. Ordinarily, it isn't necessary to pass XML strings. Generally your data is serialized and deserialized into CLR datatypes. This is usually much more convenient. I was just suggesting that it may be possible to use that mechanism instead of passing around, and therefore parsing, XML strings. The shape of the XML a service expects is defined in the WSDL contracts it generates. Therefore, it's genearally possible and convenient to create a proxy using svcutil.exe that defines types corresponding to the WSDL for that service.




Re: Windows Communication Foundation (Indigo) API Messaging with WCF

dannywooly

But what if i changed the parameters used in a method call, i could make this change without breaking 3rd party code!





Re: Windows Communication Foundation (Indigo) API Messaging with WCF

Martin Petersen-Frey - MSFT

If you need a truely dynmic interface then, yes, XML strings are a good way to go. If 3rd party code depends on it then indeed that's the way to go.