By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,795 Members | 1,761 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,795 IT Pros & Developers. It's quick & easy.

How to generate WSDL form a .asmx WebService?

P: n/a
I created a simple webservice .asmx on Visual Studio 2005. As I plan to
deploy it to Sharepoint Portal 2003, I copied asmx to \web server
extensions\60\ISAPI directory of the server, where all other general
webservices reside. Everything is just fine - i can access the service with
the browser, method list is displayed as well as help texts for them.

my question is - how do I generate .wsdl and .disco files for the service?

I read through lot of help materials but no hint! Should this be generated
by hand? Or is it kind of additional feature of Visual Studio Team edition?
Apr 17 '07 #1
Share this Question
Share on Google+
5 Replies


P: n/a
"kris" <kr**@discussions.microsoft.comwrote in message
news:F0**********************************@microsof t.com...
>I created a simple webservice .asmx on Visual Studio 2005. As I plan to
deploy it to Sharepoint Portal 2003, I copied asmx to \web server
extensions\60\ISAPI directory of the server, where all other general
webservices reside. Everything is just fine - i can access the service
with
the browser, method list is displayed as well as help texts for them.

my question is - how do I generate .wsdl and .disco files for the service?

I read through lot of help materials but no hint! Should this be generated
by hand? Or is it kind of additional feature of Visual Studio Team
edition?
If you enter
http://sharepointsite.company.com/We...vice.asmx?WSDL, do you
receive a WSDL back?

Sorry, I've never deployed a web service to Sharepoint.
--

John Saunders [MVP]
Apr 17 '07 #2

P: n/a

"John Saunders [MVP]" wrote:
If you enter
http://sharepointsite.company.com/We...vice.asmx?WSDL, do you
receive a WSDL back?
no I don't. and that is because I don't have any WSDL document.

I get an "File Not Found" error page generated by sharepoint and I
understand why - in Sharepoint each webservice have at least three files:
1. blah.asmx - webservice itself
2. blahwsdl.aspx - which contains the wsdl document
3. blahdisco.aspx - which is the .disco file

I only have the asmx. .disco is quite simple to generate, but wsdl is kind
of complicated thing, and would take quite a lot of time to develop by hand.
that is why i am asking how to generate it.

I have Visual Studio 2005 bought it comes with lot of documentation, guides
references all that. But after couple of days searching I could find NO HINT
about how should the WSDL document be generated. Should it be generated
automatically after all? This should not been that difficult question to
anyone more familiar with VS or for any Microsoft support staff...

Apr 19 '07 #3

P: n/a

update to initial message. found this:
http://msdn.microsoft.com/newsgroups...ee5&sloc=en-us

tried all this as described in message as well as in original msdn
walkthrough:
1. copied service.asmx to SP server ISAPI folder (tried layouts aswell)
2. ran disco utility towards the service in both cases (also tried different
..net versions, a 1.1 and 2.0)

all I get is bunch of errors:

ERROR: http://devintra:8080/_layouts/HansaListings.asmx
- The document at the url http://devintra:8080/_layouts/HansaListings.asmx
was not recognized as a known document type.
The error message from each known type may help you fix the problem:
- Report from 'http://devintra:8080/_layouts/HansaListings.asmx' is 'The
document format is not recognized (the content type is 'text/html; charset
=utf-8').'.
- Report from 'DISCO Document' is 'Discovery document at the URL
http://devintra:8080/_layouts/1033/e...ErrorText=File Not Found. could
not be found.'.
- The document format is not recognized.
- Report from 'WSDL Document' is 'The document format is not recognized (the
content type is 'text/html; charset=utf-8').'.
- Report from 'XML Schema' is 'The document format is not recognized (the
content type is 'text/html; charset=utf-8').'.
If you would like more help, please type "disco /?".

if I make copy another SP services' *disco.aspx, the operation succeeds. so
I really dont understand here how the .NET should generate those files on the
server because the errors indicate that the disco.exe gets the same "Not
found" error page as myself when accessing the service?wsdl with browser.

Apr 19 '07 #4

P: n/a
"kris" <kr**@discussions.microsoft.comwrote in message
news:0C**********************************@microsof t.com...
>
"John Saunders [MVP]" wrote:
>If you enter
http://sharepointsite.company.com/We...vice.asmx?WSDL, do
you
receive a WSDL back?

no I don't. and that is because I don't have any WSDL document.

I get an "File Not Found" error page generated by sharepoint and I
understand why - in Sharepoint each webservice have at least three files:
1. blah.asmx - webservice itself
2. blahwsdl.aspx - which contains the wsdl document
3. blahdisco.aspx - which is the .disco file

I only have the asmx. .disco is quite simple to generate, but wsdl is kind
of complicated thing, and would take quite a lot of time to develop by
hand.
that is why i am asking how to generate it.
I'm not familiar with Sharepoint web services. In normal .NET web services,
typing the "?WSDL" url causes .NET to generate the WSDL by using reflection
against the .asmx. If this doesn't work, then you may want to try posting in
a Sharepoint newsgroup. It would seem this is less of a .asmx problem and
more of a Sharepoint .asmx problem.
--

John Saunders [MVP]
Apr 19 '07 #5

P: n/a
I'm not familiar with Sharepoint web services. In normal .NET web services,
typing the "?WSDL" url causes .NET to generate the WSDL by using reflection
against the .asmx. If this doesn't work, then you may want to try posting in
a Sharepoint newsgroup. It would seem this is less of a .asmx problem and
more of a Sharepoint .asmx problem.
--
thanks mate, that answered my question. since we are not developing plain
..net applications but only in sharepoint context, i did not know that.

now i created separate virtual server on our dev environment, copied the
..asmx and everything looks like it should. thanks again.

Apr 20 '07 #6

This discussion thread is closed

Replies have been disabled for this discussion.