ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzatz_5.4.0.1/51/webserv/wswsdlelements.htm

100 lines
3.4 KiB
HTML
Raw Normal View History

2024-04-02 14:02:31 +00:00
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=utf-8">
<LINK rel="stylesheet" type="text/css" href="../../../rzahg/ic.css">
<title>WSDL architecture</title>
</head>
<BODY>
<!-- Java sync-link -->
<SCRIPT LANGUAGE="Javascript" SRC="../../../rzahg/synch.js" TYPE="text/javascript"></SCRIPT>
<h2><a name="wswsdlelements"></a>WSDL architecture</h2>
<p>Web Services Description Language (WSDL) files are written in eXtensible
Markup Language (XML). To learn more about XML, see <a href="wsrefs.htm">Web services resources</a>.</p>
<p><img src="rzaiz626.gif" alt="Anatomy of a WSDL file" width="467" height="289"></p>
<p>A WSDL contains the following parts:</p>
<ul>
<li><p><strong>Web service interface definition</strong><br>This is where the elements are
contained, as well as the namespaces.</p></li>
<li><p><strong>Web service implementation</strong><br>This is where you find the definition of the service and ports. </p></li>
</ul>
<p>A WSDL file describes a Web service with the following elements:</p>
<p><strong>portType</strong></p>
<p>The description of the operations and their
associated messages. PortTypes define abstract operations.</p>
<pre>&lt;portType name=&quot;EightBall&quot;&gt;
&lt;operation name=&quot;getAnswer&quot;&gt;
&lt;input message=&quot;ebs:IngetAnswerRequest&quot;/&gt;
&lt;output message=&quot;ebs:OutgetAnswerResponse&quot;/&gt;
&lt;/operation&gt;
&lt;/portType&gt;
</pre>
<p><strong>message</strong></p>
<p>The description of parameters (input and
output) and return values.</p>
<pre>&lt;message name=&quot;IngetAnswerRequest&quot;&gt;
&lt;part name=&quot;meth1_inType&quot; type=&quot;ebs:questionType&quot;/&gt;
&lt;/message&gt;
&lt;message name=&quot;OutgetAnswerResponse&quot;&gt;
&lt;part name=&quot;meth1_outType&quot; type=&quot;ebs:answerType&quot;/&gt;
&lt;/message&gt;
</pre>
<p><strong>types</strong></p>
<p>The schema for describing XML complex types
used in the messages.</p>
<pre>&lt;types&gt;
&lt;xsd:schema targetNamespace=&quot;...&quot;&gt;
&lt;xsd:complexType name=&quot;questionType&quot;&gt;
&lt;xsd:element name=&quot;question&quot; type=&quot;string&quot;/&gt;
&lt;/xsd:complexType&gt;
&lt;xsd:complexType name=&quot;answerType&quot;&gt;
...
&lt;/types&gt;
</pre>
<p><strong>binding</strong></p>
<p>Bindings describe the protocol used to access
a service, as well as the data formats for the messages defined by a particular
portType.</p>
<pre>&lt;binding name=&quot;EightBallBinding&quot; type=&quot;ebs:EightBall&quot;&gt;
&lt;soap:binding style=&quot;rpc&quot; transport=&quot;schemas.xmlsoap.org/soap/http&quot;&gt;
&lt;operation name=&quot;ebs:getAnswer&quot;&gt;
&lt;soap:operation soapAction=&quot;urn:EightBall&quot;/&gt;
&lt;input&gt;
&lt;soap:body namespace=&quot;urn:EightBall&quot; ... /&gt;
...
</pre>
<p>The remaining parts, services and ports, indicate where you can find the
WSDL.</p>
<p><strong>Service</strong></p>
<p>Contains the Web service name and a list of
the ports.</p>
<p><strong>Ports</strong></p>
<p>Contains the location of the Web service and
the binding to used to access the service.</p>
<pre>&lt;service name=&quot;EightBall&quot;&gt;
&lt;port binding=&quot;ebs:EightBallBinding&quot; name=&quot;EightBallPort&quot;&gt;
&lt;soap:address location=&quot;localhost:8080/axis/EightBall&quot;/&gt;
&lt;/port&gt;
&lt;/service&gt;
</pre>
</body>
</html>