Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / February 2008

Tip: Looking for answers? Try searching our database.

DISCO file?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
cj - 08 Feb 2008 20:27 GMT
I realize it's a discovery document but

http://localhost/service2.asmx?DISCO

gives me

<discovery>
<contractRef ref="http://localhost/service2.asmx?wsdl"
docRef="http://localhost/service2.asmx"/>
<soap address="http://localhost/service2.asmx" binding="q1:Service2Soap"/>
<soap address="http://localhost/service2.asmx" binding="q2:Service2Soap12"/>
</discovery>

which tells me nothing.  So what is it supposed to be telling me?  Or is
it supposed to be telling the computer something?

Now if I just type in

http://localhost/service2.asmx

I get a nice looking page that shows me the two web methods I have
exposed and allows me to test them--though I must say it still tells me
very little about them.

If I type in

http://localhost/service2.asmx?WSDL

I get well a lot of xml stuff (I'll put it at the bottom of the message)
and most I can identify since I wrote the services but I'd be hard
pressed to read this stuff from someone else's web service and tell you
what it does.  What is all this for?

Can someone give me an overview of what the difference between these
documents is and what uses each?  Is a human supposed to read this stuff
and understand it?

<wsdl:definitions targetNamespace="http://tempuri.org/">

    <wsdl:types>

    <s:schema elementFormDefault="qualified"
targetNamespace="http://tempuri.org/">

    <s:element name="GoodbyeWorld">
<s:complexType/>
</s:element>

    <s:element name="GoodbyeWorldResponse">

    <s:complexType>

    <s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="GoodbyeWorldResult"
type="s:string"/>
</s:sequence>
</s:complexType>
</s:element>

    <s:element name="GoodbyeCJ">
<s:complexType/>
</s:element>

    <s:element name="GoodbyeCJResponse">

    <s:complexType>

    <s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="GoodbyeCJResult"
type="s:string"/>
</s:sequence>
</s:complexType>
</s:element>
</s:schema>
</wsdl:types>

    <wsdl:message name="GoodbyeWorldSoapIn">
<wsdl:part name="parameters" element="tns:GoodbyeWorld"/>
</wsdl:message>

    <wsdl:message name="GoodbyeWorldSoapOut">
<wsdl:part name="parameters" element="tns:GoodbyeWorldResponse"/>
</wsdl:message>

    <wsdl:message name="GoodbyeCJSoapIn">
<wsdl:part name="parameters" element="tns:GoodbyeCJ"/>
</wsdl:message>

    <wsdl:message name="GoodbyeCJSoapOut">
<wsdl:part name="parameters" element="tns:GoodbyeCJResponse"/>
</wsdl:message>

    <wsdl:portType name="Service2Soap">

    <wsdl:operation name="GoodbyeWorld">
<wsdl:input message="tns:GoodbyeWorldSoapIn"/>
<wsdl:output message="tns:GoodbyeWorldSoapOut"/>
</wsdl:operation>

    <wsdl:operation name="GoodbyeCJ">
<wsdl:input message="tns:GoodbyeCJSoapIn"/>
<wsdl:output message="tns:GoodbyeCJSoapOut"/>
</wsdl:operation>
</wsdl:portType>

    <wsdl:binding name="Service2Soap" type="tns:Service2Soap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>

    <wsdl:operation name="GoodbyeWorld">
<soap:operation soapAction="http://tempuri.org/GoodbyeWorld"
style="document"/>

    <wsdl:input>
<soap:body use="literal"/>
</wsdl:input>

    <wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>

    <wsdl:operation name="GoodbyeCJ">
<soap:operation soapAction="http://tempuri.org/GoodbyeCJ" style="document"/>

    <wsdl:input>
<soap:body use="literal"/>
</wsdl:input>

    <wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>

    <wsdl:binding name="Service2Soap12" type="tns:Service2Soap">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http"/>

    <wsdl:operation name="GoodbyeWorld">
<soap12:operation soapAction="http://tempuri.org/GoodbyeWorld"
style="document"/>

    <wsdl:input>
<soap12:body use="literal"/>
</wsdl:input>

    <wsdl:output>
<soap12:body use="literal"/>
</wsdl:output>
</wsdl:operation>

    <wsdl:operation name="GoodbyeCJ">
<soap12:operation soapAction="http://tempuri.org/GoodbyeCJ"
style="document"/>

    <wsdl:input>
<soap12:body use="literal"/>
</wsdl:input>

    <wsdl:output>
<soap12:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>

    <wsdl:service name="Service2">

    <wsdl:port name="Service2Soap" binding="tns:Service2Soap">
<soap:address location="http://localhost/service2.asmx"/>
</wsdl:port>

    <wsdl:port name="Service2Soap12" binding="tns:Service2Soap12">
<soap12:address location="http://localhost/service2.asmx"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Mr. Arnold - 09 Feb 2008 00:09 GMT
>I realize it's a discovery document but
>
[quoted text clipped - 12 lines]
> which tells me nothing.  So what is it supposed to be telling me?  Or is
> it supposed to be telling the computer something?

It tells you everything.

The location of the Web Sevice the Service2.asmx, and it's using HTTP. It
could have been using HTTPS.
It tells you that it's a SOAP Web service.

It could have been http://cj@nospam/nospam.com/service2.asmx.

The Web service client application would need to use this information to
discover/locate the Web service on the Internet or Intranet.

> Now if I just type in
>
[quoted text clipped - 3 lines]
> and allows me to test them--though I must say it still tells me very
> little about them.

That's what it's suppose to do if you have published the Web service
properly. If you can't do that, then the Web service in not published
properly and something.

> If I type in
>
[quoted text clipped - 15 lines]
> <s:schema elementFormDefault="qualified"
> targetNamespace="http://tempuri.org/">

It's telling you the taget namepace of the of the Web server URL, which
could be http://cj@nospam/nospam.com if a Web service client application
wanted to consume the Web service at that location.
> −
> <s:element name="GoodbyeWorld">
[quoted text clipped - 32 lines]
> <wsdl:part name="parameters" element="tns:GoodbyeWorld"/>
> </wsdl:message>

It's telling you the two Web methods that are exposed on the Web service.

> −
> <wsdl:message name="GoodbyeWorldSoapOut">
[quoted text clipped - 93 lines]
> </wsdl:service>
> </wsdl:definitions>

The the rest of it is telling you that you have a SOAP  Web service.

You can go to the .Net Command prompt and use the WSDL.exe utility to
consume the Web service located at http://localhost/service2.asmx, generate
a C# or VB.net class about the Web service and put the class in your Web
service client application to consume the Web service, which is how it's
done most of the time when developer one publishes a Web service that
another application developer can use to consume a Web service on the
Intranet,  Internet or localhost.

The Web Service can be consumed by any type of .Net solution such as a .NET
ASP, Console, Windows Desktop or Windows Service application, which can be
done with the DISCO, if one knew the Web Service Methods in the Web service
and didn't need a class generated.

A Web Service is an XML Web Service.
cj - 10 Feb 2008 00:47 GMT
>> I realize it's a discovery document but
>>
[quoted text clipped - 24 lines]
> The Web service client application would need to use this information to
> discover/locate the Web service on the Internet or Intranet.

your definition of everything and mine are apparently quite different.
:)  But I see what you mean.

>> Now if I just type in
>>
[quoted text clipped - 7 lines]
> properly. If you can't do that, then the Web service in not published
> properly and something.

>> If I type in
>>
[quoted text clipped - 172 lines]
>
> A Web Service is an XML Web Service.

This stuff must be mainly for the client program to understand and not
me.  Thanks for the explanation.  I hope you will answer my other
question (writing/publishing/consuming) now which involves the use of
these files and touches on that .net command prompt and wsdl.exe
utility.  I've used a couple web services before--not written by me--and
never used wsdl.exe.
Steven Cheng[MSFT] - 11 Feb 2008 03:11 GMT
Hi Cj,

Yes, the disco document is another kind of document which can provide the
location of all the necessary documents of a certain webservice. Just like
WSDL document, disco document is expected to be parsed and read by
webservice client code generator rather than human beings :)

Also, in .net framework, there is a utility "disco.exe" which is used to
capture webservice information from a remote site(if that site has publish
webservice as disco files). You can also search the "webservice" , "disco"
on the web for more information on this.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
Date: Sat, 09 Feb 2008 19:47:34 -0500
From: cj <cj@nospam.nospam>
User-Agent: Thunderbird 2.0.0.6 (Windows/20070728)
MIME-Version: 1.0
Subject: Re: DISCO file?

Mr. Arnold wrote:

>> I realize it's a discovery document but
>>
[quoted text clipped - 24 lines]
> The Web service client application would need to use this information to
> discover/locate the Web service on the Internet or Intranet.

your definition of everything and mine are apparently quite different.
:)  But I see what you mean.

>> Now if I just type in
>>
[quoted text clipped - 7 lines]
> properly. If you can't do that, then the Web service in not published
> properly and something.

>> If I type in
>>
[quoted text clipped - 172 lines]
>
> A Web Service is an XML Web Service.

This stuff must be mainly for the client program to understand and not
me.  Thanks for the explanation.  I hope you will answer my other
question (writing/publishing/consuming) now which involves the use of
these files and touches on that .net command prompt and wsdl.exe
utility.  I've used a couple web services before--not written by me--and
never used wsdl.exe.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.