asd
asd

Reputation:

Web Service Vs WCF

I want to develop a web service or WCF .net application for java application development. Which is best for java application web service or WCF and why? By java application it call .net web service or WCF for fetching data and shown to client site. I am confused that which one is best in this situation.

Upvotes: 0

Views: 1572

Answers (1)

Thorarin
Thorarin

Reputation: 48476

From my experience, WSDL generated by WCF web services are more standards compliant than legacy ASMX web services, so I would always advise using WCF.

One thing I've noticed however, is that using parameters in operation contracts (rather than using data contracts or message contracts for them) might be a little bit clumsy to consume from Java.

For example:

[ServiceContract]
public interface ICalculatorService
{
    [OperationContract]
    int Add(int firstValue, int secondValue);
}

Commonly used tools in Java will use Integer objects for these parameters (rather than primitive types), because the WSDL indicates that firstValue and secondValue are optional. I've written a Blog post on how to make WCF generate better WSDL so it won't do that.

Upvotes: 2

Related Questions