Sunday, February 19, 2012

CREATE ENDPOINT (Transact-SQL)

I'm new to SQL Server 2005. I was attempting to run the SQL described in the
help file section called 'CREATE ENDPOINT (Transact-SQL) '. Here is that
SQL:
CREATE ENDPOINT sql_endpoint
STATE = STARTED
AS HTTP(
PATH = '/sql',
AUTHENTICATION = (INTEGRATED ),
PORTS = ( CLEAR ),
SITE = 'B37KGVK71Z\DEVSQLSVR'
)
FOR SOAP (
WEBMETHOD 'GetSqlInfo'
(name='master.dbo.xp_msver',
SCHEMA=STANDARD ),
WEBMETHOD 'DayAsNumber'
(name='master.sys.fn_MSdayasnumber'),
WSDL = DEFAULT,
SCHEMA = STANDARD,
DATABASE = 'master',
NAMESPACE = 'http://tempUri.org/'
);
GO
The result I am getting is as follows:
Msg 7807, Level 16, State 1, Line 1
An error ('0x80070057') occurred while attempting to register the endpoint
'sql_endpoint'.
Can someone tell me how to find out what error 0x80070057 is, and/or suggest
how to resolve this problem?
It's the semi-generic "parameter is incorrect" error. It
looks like it's from what you have specified for SITE. Try
specifying the site as server name only - B37KGVK71Z
-Sue
On Mon, 3 Apr 2006 10:15:02 -0700, Ken
<Ken@.discussions.microsoft.com> wrote:

>I'm new to SQL Server 2005. I was attempting to run the SQL described in the
>help file section called 'CREATE ENDPOINT (Transact-SQL) '. Here is that
>SQL:
>--
>CREATE ENDPOINT sql_endpoint
>STATE = STARTED
>AS HTTP(
> PATH = '/sql',
> AUTHENTICATION = (INTEGRATED ),
> PORTS = ( CLEAR ),
> SITE = 'B37KGVK71Z\DEVSQLSVR'
> )
>FOR SOAP (
> WEBMETHOD 'GetSqlInfo'
> (name='master.dbo.xp_msver',
> SCHEMA=STANDARD ),
> WEBMETHOD 'DayAsNumber'
> (name='master.sys.fn_MSdayasnumber'),
> WSDL = DEFAULT,
> SCHEMA = STANDARD,
> DATABASE = 'master',
> NAMESPACE = 'http://tempUri.org/'
> );
>GO
>---
>The result I am getting is as follows:
>Msg 7807, Level 16, State 1, Line 1
>An error ('0x80070057') occurred while attempting to register the endpoint
>'sql_endpoint'.
>---
>Can someone tell me how to find out what error 0x80070057 is, and/or suggest
>how to resolve this problem?
|||Sue,
Ok. That worked. Now if it's a SOAP endpoint I should be able to get to it
in a browser? Or is this SOAP but not IIS?
What I need is : How do I test it works without writing a .NET application?
Ken
"Sue Hoegemeier" wrote:

> It's the semi-generic "parameter is incorrect" error. It
> looks like it's from what you have specified for SITE. Try
> specifying the site as server name only - B37KGVK71Z
> -Sue
> On Mon, 3 Apr 2006 10:15:02 -0700, Ken
> <Ken@.discussions.microsoft.com> wrote:
>
>
|||No...you can't just point your browser at it and have it do
something. It's an HTTP SOAP endpoint - HTTP is the
communication protocol. If you want to mess with Web
Services and this functionality without writing code, try
the sample application available with SQL Server 2005. Check
books online for the information on the sample app:
Sample Applications for Sending Native XML Web Services
Requests.
All of the code and the client apps (C# or VB.Net) are
included with the sample. Steps on how to set it up are in
books online.
-Sue
SQL Server MVP
On Tue, 4 Apr 2006 14:36:03 -0700, Ken
<Ken@.discussions.microsoft.com> wrote:
[vbcol=seagreen]
>Sue,
>Ok. That worked. Now if it's a SOAP endpoint I should be able to get to it
>in a browser? Or is this SOAP but not IIS?
>What I need is : How do I test it works without writing a .NET application?
>Ken
>---
>"Sue Hoegemeier" wrote:
|||Sue,
Thank you for your help. I tried what you suggested. But there still seems
to be a problem. To illustrate the problem I am having, I first removed
sql_endpoint, and then reconstructed it so I could make sure I was not
missing steps.
The problem is that after I create the endpoint it appears to not be
registered in the HTTP.sys - so can you follow the steps below and advise me.
I used the instructions posted at
"http://msdn2.microsoft.com/en-us/library/ms188682(SQL.90).aspx - Reserving
URL Namespaces by Using Http.sys" to try to confirm the endpoint.
Can you please look at the steps I followed below and advise me.
---
Step 1. I droped sql_endpoint.
IF EXISTS (SELECT * FROM sys.endpoints e WHERE e.name = N'sql_endpoint')
DROP ENDPOINT [sql_endpoint]
Step2: I made sure I was sysadmin.
Step3: I recreated sql_endpoint as follows , and got the message "Command(s)
completed successfully." -
CREATE ENDPOINT sql_endpoint
STATE = STARTED
AS HTTP (
PATH = '/sql/AdvWorks',
AUTHENTICATION B37KGVK71Z= (INTEGRATED ),
PORTS = ( CLEAR ),
SITE = 'B37KGVK71Z'
)
FOR SOAP (
WEBMETHOD 'GetSqlInfo'
(name='master.dbo.xp_msver',
SCHEMA=STANDARD ),
WEBMETHOD 'DayAsNumber'
(name='master.sys.fn_MSdayasnumber'),
WSDL = DEFAULT,
SCHEMA = STANDARD,
DATABASE = 'master',
NAMESPACE = 'http://planet.Xorthal.local/'
);
GO
Step 4: I followed the advice of site
"http://msdn2.microsoft.com/en-us/library/ms188682(SQL.90).aspx" and used the
utility "httpcfg.exe" to verify that the url was reserved. The command I
entered and the response I got (no data) is shown below - which appears to
say the endpoint creation did.
c:> httpcfg query urlacl
c:>
Step 5: I observed that the response that should have appeared was
something like
URL: http://B37KGVK71Z:80/sql/AdvWorks
ACL: ...
__________________________________________________
"Sue Hoegemeier" wrote:

> No...you can't just point your browser at it and have it do
> something. It's an HTTP SOAP endpoint - HTTP is the
> communication protocol. If you want to mess with Web
> Services and this functionality without writing code, try
> the sample application available with SQL Server 2005. Check
> books online for the information on the sample app:
> Sample Applications for Sending Native XML Web Services
> Requests.
> All of the code and the client apps (C# or VB.Net) are
> included with the sample. Steps on how to set it up are in
> books online.
> -Sue
> SQL Server MVP
> On Tue, 4 Apr 2006 14:36:03 -0700, Ken
> <Ken@.discussions.microsoft.com> wrote:
>
>

No comments:

Post a Comment