Link to home
Start Free TrialLog in
Avatar of satmisha
satmishaFlag for India

asked on

Web service Design Approach query

I have following requirement
1.      XML based service that would call the sql store proc and publish the result.
2.      End consumer of the service are java based app and mobile apps.
3.      No need of transactions.
4.      Read only web service no requirement of Add, update & delete.
Environment:
1.      VS 2013
2.      Sql Server 2012
Expert can you please help me to understand better design for said requirement. Shall I go for WCF with Entity Framework or something else ?
I appreciate if you could also send some better link for above said requirement.
Looking forward to hearing from you.
Avatar of ste5an
ste5an
Flag of Germany image

Questions:

R1) Means you should read data from database by using a stored procedure and transmit the data formatted as XML to the client?
R3 & R4) You only read data from the database? No inserts or updates?

You need to clarify your requirements first. They are too imprecise.

Comments:
R1) This does not describe the kind of service. Should it be a web service or a classic service? When it should be a web service, should it be a SOAP or a RESTful service? When it should be a classic service, should it be a custom services over TCP/IP or a SOAP service?
R2) The consumer type is imho irrelevant. In conjunction with R1 it is necessary to define what services are exactly required.

As your requirements are pretty vague right now, the most common way for the sketched use-case would be one or more RESTful web service using the Web API project template in VS.
Avatar of satmisha

ASKER

Thanks for your prompt reply. Here is the reply:

R1: This would be soap based service which will return the XML to the clients.

I guess based on my understanding that above said requirements can be fulfilled using WCF services. what's the point to move for web API/restful service ? Is there anything that can not be full filled by WCF service ?

Looking forward to hearing from you?
Also is it good to use  Entity Framework within WCF service to execute store procedure or is there any better way for that as well ?
It depends. As you said you only need to read data. Here using a direct approach using SqlCommand etc. can be much simpler. Cause you may don't need to fiddle with objects.

EF can make it easier to add extensions later.

And for the service type - I don't develop for mobile devices - but using a RESTful services is here often the better choice. Because when you want to do an HTML5 app, it's easier to interface with.
Thanks ste5an. Few more questions here, apologies for that

1. Could you please send across some link which shows how services are exposing store proc data over soap ?

2. If I make WCF soap services which returns XML data, can mobile/PDA consume it ?

Looking forward to hearing from you.
Hi experts can you please help on it ?
ASKER CERTIFIED SOLUTION
Avatar of Anil Golamari
Anil Golamari
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Apologies for my late response. Thanks for your help.