Discussion Forums HTML, XML, JavaScript... |
 |
Software Reviews Editors,Others... |
 |
Top100 JavaScript Tutorials, ... |
 |
Tutorials ASP, CSS, Databases... |
Discussion List FAQ, Roundup, Configure ... |
 |
Authoring HTML, JavaScript, CSS... |
 |
Design Layout, Navigation,... |
 |
Graphics Tools, Colors, Images...
|
 |
Software Browsers, Editors, XML...
|
 |
Internet Domains, E-Commerce, ... |
 |
WDVL Resources Intermdiate, Tutorials,... |
 |
WDVL Discussion Lists, Top 100,... |
 |
| Technology Jobs |
 |
|
 |
Web Devs: Moonlight as a Game Developer and Win Cool Prizes by Accepting the RIA Run Challenge
Now, your mission--should you choose to accept: Take your shot at gaming stardom if you think you might have what it takes to build a cool RIA game and you could win an Xbox 360 or other fabulous prizes. Hurry! You only have until May 15, 2008 to enter.
»
Article: Leveraging Your Flash Development with Silverlight
You're not giving up Flash any time soon (and we don't blame you.) But if you could get your Flash application working in Silverlight, why wouldn't you? We show you the tools and techniques required to have your rockin' Flash application rolled for Silverlight. Learn more here.
»
Article: What Does it Take to Build the Best RIA?
With the proliferation of Rich Interactive Application (RIA) platform choices out there, you no longer have to take a one-size-fits-all approach to developing your next RIA application. Knowing the strengths (and weaknesses) of each platform can help you to decide the best RIA for your next application.
»
|
 |
|
|
|
|
|
Basic WSDL Example: XMethods eBay Price Watcher Service - Page 5
April 3, 2002
Before moving on to more complicated WSDL examples, let's
examine another relatively simple one. Example
6-3 provides a WSDL file for the XMethods eBay Price Watcher Service. The
service takes an existing eBay auction ID, and returns the value of the
current bid.
Example 6-3: eBayWatcherService.wsdl (reprinted with permission of
XMethods, Inc.)
<?xml version="1.0"?>
<definitions name="eBayWatcherService"
targetNamespace=
"http://www.xmethods.net/sd/eBayWatcherService.wsdl"
xmlns:tns="http://www.xmethods.net/sd/eBayWatcherService.wsdl"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns="http://schemas.xmlsoap.org/wsdl/">
<message name="getCurrentPriceRequest">
<part name="auction_id" type = "xsd:string"/>
</message>
<message name="getCurrentPriceResponse">
<part name="return" type = "xsd:float"/>
</message>
<portType name="eBayWatcherPortType">
<operation name="getCurrentPrice">
<input
message="tns:getCurrentPriceRequest"
name="getCurrentPrice"/>
<output
message="tns:getCurrentPriceResponse"
name="getCurrentPriceResponse"/>
</operation>
</portType>
<binding name="eBayWatcherBinding" type="tns:eBayWatcherPortType">
<soap:binding
style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="getCurrentPrice">
<soap:operation soapAction=""/>
<input name="getCurrentPrice">
<soap:body
use="encoded"
namespace="urn:xmethods-EbayWatcher"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</input>
<output name="getCurrentPriceResponse">
<soap:body
use="encoded"
namespace="urn:xmethods-EbayWatcher"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</output>
</operation>
</binding>
<service name="eBayWatcherService">
<documentation>
Checks current high bid for an eBay auction
</documentation>
<port name="eBayWatcherPort" binding="tns:eBayWatcherBinding">
<soap:address
location=
"http://services.xmethods.net:80/soap/servlet/rpcrouter"/>
</port>
</service>
</definitions>
Here is an overview of the main WSDL elements:
messages
- Two messages are defined:
getCurrentPriceRequest and getCurrentPriceResponse. The request message contains a
single string parameter; the response message contains a single float
parameter.
portType
- A single operation,
getCurrentPrice, is defined. Again, we see the
request/response operation pattern.
binding
- The
binding element
specifies HTTP SOAP as the transport. The soapAction attribute is left as an empty string ("").
service
- This element specifies that the service is available
at http://services.xmethods.net/soap/servlet/rpcrouter.
To access the eBay watcher service, you can use any of the WSDL
invocation tools defined earlier. For example, the following call to GLUE:
invoke http://www.xmethods.net/sd/2001/EBayWatcherService.wsdl
getCurrentPrice 1271062297
retrieves the current bid price for a Handspring Visor Deluxe: result = 103.5
TIP: The XMethods web site (http://www.xmethods.net/) provides
dozens of sample SOAP and .NET services. Nearly all of these services
include WSDL files and therefore provide an excellent opportunity for
learning WSDL in detail. As you browse the XMethods directory, try
interfacing with the specified services via any of the WSDL invocation tools
described here. Quite likely, you will be amazed at how easy it is to
integrate and invoke new services.
WSDL Invocation Tools, Part I - Page 4
Web Services Essentials
WSDL Invocation Tools, Part II - Page 6
|
|