When I'm trying to create a SOAP endpoint in SQL Server 2016:
CREATE ENDPOINT Weather_CurConditions
STATE = Started
AS HTTP
(
PATH = '/CurrentConditions',
AUTHENTICATION = (INTEGRATED),
PORTS = (CLEAR), CLEAR_PORT = 8080,
SITE = '*'
)
FOR SOAP
(
WEBMETHOD 'GetWeather'(NAME = 'Weather.dbo.usp_GetWeather'),
WSDL = DEFAULT,
DATABASE = 'Weather',
NAMESPACE = DEFAULT
);
I get the following error:
Msg 7878, Level 16, State 1, Line 1
This "CREATE ENDPOINT" statement is not supported on this edition of SQL Server.
Here is the output of SELECT @@VERSION
:
Microsoft SQL Server 2016 (RTM) - 13.0.1601.5 (X64)
Apr 29 2016 23:23:58
Copyright (c) Microsoft Corporation
Enterprise Edition (64-bit) on Windows 8.1 Enterprise 6.3 (Build 9600: )
What can I do ?
1 Answer 1
You can no longer use SOAP/HTTP endpoints. This isn't a SQL Server 2016 problem, since this would not have worked in 2014 either. From the documentation on CREATE ENDPOINT
:
NOTE: Native XML Web Services (SOAP/HTTP endpoints) was removed in SQL Server 2012.
It has been deprecated for at least 8 years (this is the oldest version of the current document I could find):
If you look at that document, you will see that "The CREATE ENDPOINT or ALTER ENDPOINT statement with the FOR SOAP option" was deprecated at that time. Their suggestion for a replacement is to "Use Windows Communications Foundation (WCF) or ASP.NET instead."
Arguably, there could be a better error message, like the following (emphasis mine):
Msg 7877, Level 16, State 1
SOAP/HTTP endpoints are no longer supported in this version of SQL Server.
But your workarounds remain the same:
- Continue using an older version of SQL Server.
- Find another source for this information that doesn't require this type of information.
- As the docs suggest, don't try to make SQL Server perform this work (it's not a web browser) - e.g. create an application or service that stores the data in SQL Server.
-
it means this is deprecated? what is plan B?DanialAbdi– DanialAbdi2017年01月02日 19:43:04 +00:00Commented Jan 2, 2017 at 19:43
-
@DanialAbdi I don't know, because I don't know your requirements. You have a few options at a high level: (1) Keep using an older version of SQL Server that still supports your requirements. (2) Find another source for this information that doesn't require a SOAP endpoint. (3) Don't use SQL Server for this work - e.g. create an application or service that stores the data in SQL Server.Aaron Bertrand– Aaron Bertrand2017年01月02日 19:45:10 +00:00Commented Jan 2, 2017 at 19:45