Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2005 > SQL Server 2005
|
SQL Server 2005 General discussion of SQL Server *2005* version only.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 8th, 2007, 01:35 PM
Authorized User
 
Join Date: Feb 2007
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default how can i access my url outside my server?

Inside my local server ,I created an webservice and i can access that thru the link http://localhost/helloworld?wsdl.
How can i access the same url from my desktop or thru other computer


Thanks
 
Old February 8th, 2007, 02:08 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

The pc you have the service hosted on must be forward facing if you wish to reach it over the internet. By forward facing I mean the PC is exposed to the internet and has and IP address, etc.

If, however, you are just trying to view the webservices from other pcs on your internal network, you just have to do http://<machinename>/helloworld.wsdl

Take care when facing a pc outwards onto the internet because it is now exposed to the internet; take all necessary security percautions.

================================================== =========
I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.
================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from planoie's profile^^
^^Modified text taken from gbianchi profile^^
================================================== =========
 
Old February 8th, 2007, 02:27 PM
Authorized User
 
Join Date: Feb 2007
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default

When i try to access by using http://<machinename>/helloworld?wsdl
i am getting the following error

HTTP Error 404 - File or directory not found.
Internet Information Services (IIS)
 
Old February 8th, 2007, 02:37 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

the machine you are trying to access it from, is it on the same network as the machine that is hosting the webservice? (BTW, I assume that you are NOT entering http://<machinename>/helloworld?wsdl into the address bar. replace <machinename> with the name of the pc you are trying to access)

================================================== =========
I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.
================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from planoie's profile^^
^^Modified text taken from gbianchi profile^^
================================================== =========
 
Old February 8th, 2007, 02:43 PM
Authorized User
 
Join Date: Feb 2007
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default

the server name , machine name and the computer name are all the same
 
Old February 8th, 2007, 02:50 PM
SQLScott's Avatar
Wrox Author
 
Join Date: Dec 2004
Posts: 338
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Can you provide information as to how your webserivce was created?

Scott Klein
Author - Professional SQL Server 2005 XML
http://www.wrox.com/WileyCDA/WroxTit...764597922.html
 
Old February 8th, 2007, 03:01 PM
Authorized User
 
Join Date: Feb 2007
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default

i created endpoints and able to view wsdl

http://<servername>/hello_world
it's a stored procedure created in master database.
when i just try to view the output from this like

http:///<servername>/hello_world

it's giving me an error http501/http505 error.

i read in other article like, when soap is not able to process message , it'll be giving out as http errors.

my endpoint creation is as follows:


CREATE ENDPOINT hello_endpoint
STATE = STARTED
AS HTTP(
PATH = '/helloworld',
AUTHENTICATION = (INTEGRATED ),
PORTS = ( CLEAR ),
SITE = 'testserver'
)
FOR SOAP (
WEBMETHOD 'GetSqlInfo' (name='master.dbo.helloworld', SCHEMA=STANDARD ),
WSDL = DEFAULT,
BATCHES = ENABLED,
DATABASE = 'master',
NAMESPACE = 'http://testserver/helloworld'
);

GO



i already created a stored procedure hello world:

USE [master]
GO

CREATE PROCEDURE [dbo].[helloworld]
(@msg nvarchar(256)= "Hello Sql Server")
AS BEGIN
select @msg as 'message'
END


.I am not able to find any solution for this.Any help would be a great help for me.


thanks for all
 
Old February 8th, 2007, 03:25 PM
SQLScott's Avatar
Wrox Author
 
Join Date: Dec 2004
Posts: 338
Thanks: 0
Thanked 2 Times in 2 Posts
Default

OK, i will look into this shortly and get back to you...

Scott Klein
Author - Professional SQL Server 2005 XML
http://www.wrox.com/WileyCDA/WroxTit...764597922.html
 
Old February 9th, 2007, 12:21 AM
SQLScott's Avatar
Wrox Author
 
Join Date: Dec 2004
Posts: 338
Thanks: 0
Thanked 2 Times in 2 Posts
Default

You need to specify the port, like this:

CREATE ENDPOINT hello_endpoint
STATE = STARTED
AS HTTP (
    PATH = '/helloworld',
    AUTHENTICATION = (INTEGRATED),
    PORTS = (CLEAR),
    CLEAR_PORT = 888,
    SITE = '*'
)
FOR SOAP (
    WEBMETHOD 'GetSqlInfo'
    (
        NAME = 'master.dbo.helloworld',
        FORMAT = ROWSETS_ONLY,
                WSDL = DEFAULT
    );
GO

Try that and let me know what happens...

Scott Klein
Author - Professional SQL Server 2005 XML
http://www.wrox.com/WileyCDA/WroxTit...764597922.html
 
Old February 9th, 2007, 09:30 AM
Authorized User
 
Join Date: Feb 2007
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default

scott,
thanks for your help.
I registered the endpoint and executed your script.
sp_reserve_http_namespace N'http://*:888/helloworld'
I try to access the url inside and out side the server, in both the places i got the same

http://<machinename>or<servername>/helloworld?wsdl
And i got the same error message as before.
And also i try to register the endpoint
sp_reserve_http_namespace N'http://*:80/helloworld'


Got the error message as

Bad Request (Invalid Hostname)





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to use only 1 url for user to access? calyn_gately ASP.NET 3.5 Basics 4 August 12th, 2008 04:41 PM
URL Access to SSRS is asking for authentication Khushwinder BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 5 February 29th, 2008 05:08 AM
Secure access of Reports without a URL in ASP.NET Philip York BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 2 November 29th, 2005 03:46 AM
Valid Server URL dotnetprogrammer VS.NET 2002/2003 1 February 16th, 2005 05:56 PM
Retrieve and store the images from server URL ccc_storage Classic ASP Professional 13 August 19th, 2004 07:28 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.