0

I'm a newbie at SOAP and web services (2 day experience).

I use Bonita Open Solution as a BPMS in which I have a 'WebServer SOAP 1.2' connector. I need to get and write data from/into a database using SOAP. I don't want to use the 'SQL Server' connector which is based on JDBC because the system will be tightly-coupled.

Is there any already implemented SOAP web service in SQL Server 2008 to do that or should I develop my own? In case I should develop my own, I'm guessing the best way to do so is using ASP.NET, am I right?

John Saunders
  • 160,644
  • 26
  • 247
  • 397
Amine Zaine
  • 165
  • 1
  • 21
  • There is none (nor should there be), and you want to develop your own, using WCF. You do _not_ want to just wildly expose your entire database over a web service. Create a service to expose _only_ what your BPMS system requires. – John Saunders Apr 29 '15 at 23:16
  • Can I combine WCF with SOAP ? I read that WCF uses the Open Data Protocol which is a RESTful data access protocol. I need to use SOAP as my BPMS only provides this protocol in his connectors. – Amine Zaine Apr 29 '15 at 23:45
  • WCF supports many protocols, including SOAP and REST. You must have been reading about "[WCF Data Services](https://msdn.microsoft.com/en-us/library/cc668792.aspx)". – John Saunders Apr 30 '15 at 00:30

2 Answers2

1

Before you do anything, you need to decide exactly which data is required by the BPMS system and what access it requires. For instance, it may need read access to some data, but read and write to other data. Your service should only expose the data and operations which are actually required, and nothing more.

Your data is precious - don't expose more of it than necessary.

I recommend that you use Entity Framework in a database-first mode, but only add the required tables to the model. Then, simplify the model by removing columns which are not required, simplifying relationships, etc. Thus, you are exposing a conceptual model of your data which makes sense to the consumer, rather than having to expose every implementation detail of your database (do you really need to expose every junction table, for instance?)

It is then pretty simple to write a WCF service that uses Entity Framework to do the hard work of data access.

John Saunders
  • 160,644
  • 26
  • 247
  • 397
  • I'm still confused why can't I develop a web service that's independent from the database. I mean without sticking to Microsoft's WCF, with JAX-WS for example (in fact, it is harder to develop in a new environment/framework). Sure it may be risky but with WS-Security support I don't think there should be problems, should they? – Amine Zaine Apr 30 '15 at 09:09
0

Even if deprecated, Sql Server 2008 has native SOAP web services (see Native XML Web Services: Deprecated in SQL Server 2008).

You need to balance the risk of a Sql Server upgrade against the cost of developing (and maintain) a custom service.

MatteoSp
  • 2,940
  • 5
  • 28
  • 36
  • So, if I use the native XML Web Services, there will tight-coupling to the version of SQL Server; whereas if I use WCF, there will be tight-coupling to only use SQL Server databases...? – Amine Zaine Apr 30 '15 at 00:06
  • 1
    If you use WCF there will be no coupling. As long as you don't change the service and data contracts (the WSDL) you could change the web service implementation every time you want/need, you could also substitute SQL Server with another db server. – MatteoSp Apr 30 '15 at 00:11
  • I thought that WCF would only work with SQL Server. Thanks for this clarification. – Amine Zaine Apr 30 '15 at 00:14
  • 1
    This is not a good solution to the problem. The OP should simply create a WCF service to access the data, and expose SOAP endpoints, and/or REST, as required. No tight coupling. – John Saunders Apr 30 '15 at 00:29
  • Also, these services do not automatically expose any data! It's necessary to write stored procedures to perform the operations, then the stored procedures are made part of the contract. I don't see how this is a solution to the OP's problem at all. – John Saunders Apr 30 '15 at 00:46
  • Even if I'm with you on which solution is the best, this is not the point. The point is answering to a question that states "Is there any already implemented SOAP web service in SQL Server 2008 to do that or should I develop my own?". – MatteoSp Apr 30 '15 at 07:58
  • To do what? Expose the data? No, there isn't. – John Saunders Apr 30 '15 at 15:34