views:

55

answers:

4

Hi everyone,

I'm designing a set of web services to allow our clients to connect from their apps to one of our systems. Our clients have their apps developed in all varieties of frameworks (.NET, Java, PHP, Python and even the occasional all JS app), so obviously WS is the way to go.

Investigating a little about truly interop WS I've found that the way to go is to design first the WSDL and XSD and derive the implementations from there.

What i'm really looking for is guidance if this is really the way to go. I've read that WCF creates interoperable WS but i'm not a fan of MS creating something standard.

Should i use WCF or there is a good set of tools for designing WSDL and XSD without the pain i'm expecting.

Thanks in advance

A: 

WSDL and XSD are language independent, you just have to have some mechanism to communicate using other languages. Good thing for you to do would be IMHO core data design, so you would not need so many XSD for the same data entities.

Gabriel Ščerbák
+1  A: 

If you want to interoperate with JavaScript, then best to make more of a REST style API. This is basically just standard HTTP calls, so you're interopable from the get-go. However, you've kindof indicated that you want to use SOAP, so ...

If you're going with SOAP/WSDL, I'd definitely advocate using the server platform - yes, even .NET - to generate the WSDL, then simply check that the options you're using are producing a good, interopable WSDL.

I'm a Java developer with a history of PHP & Perl, and I've interoperated with .Net on a number of WS projects, from both sides of the coin (as server and client). There's usually no major problems - just be wary of a couple of things:

  • certain proprietary elements that MS mixes in with the open standards. For example, they may offer NTLM-style authentication, which really isn't needed in most use cases, particularly when you're using SSL certificates.
  • SOAP has taken a few different forms over the years (Document/Literal, RPC/Encoded, ...) you'll probably find you don't need to worry about this, as RPC/Encoded died along with old frameworks, and most modern frameworks tend towards Document/Literal
  • SOAP offers a few bolt-on standards (e.g. MTOM & DIME for attachments, and SOAP-WS for authentication). Try to avoid those bolt-ons, as different platforms implement different subsets.
  • For security, I'd advise to use SSL for the trust & confidentiality, and then either HTTP basic auth, or simply custom string tokens in your soap request definition.

Just keep the WSDL as minimal as possible, try interoperating quite early in the process, and you shouldn't have too many problems

amir75
+1  A: 

You can use WCF and contract-first development.

If interoperability is the main concern then I would recommend using WCF to provide the service implementation but instead of relying on WCF to generate the service interface to use contract-first development to model the interface.

A really good article on how to develop this way is Schema-based Development with Windows Communication Foundation.

If you are going to roll your own WSDL and schemas you are probably going to want to get an editor like XmlSpy or LiquidXml. I like the price of LiquidXML (free!) but I can't recall if you have to pay for the web service features.

Another interesting tool for contract-first development with Visual Studio and WCF is WSCF.blue. I haven't used it but it does appear to be actively developed based on the WCSF.blue roadmap.

Tuzo
A: 

I'm not sure what you mean when you ask "should I use WCF"? WCF is the current mechanism for developing web services (and other kinds of communicating services) on .NET. There is no other current mechanism. The others are obsolete, or else considered "legacy technology".

John Saunders
You can use WCF or ASP.NET Web Services. I think that ASP .NET web services is not obsolete but i may be wrong.
Luj Reyes
@Zyd: you are wrong. See http://johnwsaundersiii.spaces.live.com/blog/cns!600A2BE4A82EA0A6!860.entry
John Saunders
oh my! Just for the fun of it, i've been through the asmx web services online documentation and i haven't been able to find that legacy technology warning. But i think i'm gonna stick with it for now since i have some code already developed.
Luj Reyes
Yes, it appears they lost it from the .NET 4.0 documentation. I have a call into them now to see if this is a change in policy or simply a documentation error. See http://msdn.microsoft.com/en-us/library/bb552872(VS.90).aspx for the original page.
John Saunders