<div dir="ltr" style="text-align: justify;">
<p>The <b><;portType>;</b> element combines multiple message elements to form a complete oneway or round-trip operation.<br />
For example, a <b><;portType>;</b> can combine one request and one response message into a single request/response operation. This is most commonly used in <b><i>SOAP </i></b>services. A <b><i>portType </i></b>can define multiple operations.<br />
<b>Lets take a piece of code from the Example Session:</b></p>
<pre class="highlight"><;portType name="HelloWorld_PortType">; 
 <;operation name="sayHelloWorld">; 
 <;input message="tns:SayHelloRequest"/>; 
 <;output message="tns:SayHelloResponse"/>; 
 <;/operation>; 
 <;/portType>; 
</pre>
<ul>
<li>The <i><b>portType </b></i>element defines a single operation, called <b><i>sayHelloWorld</i></b>.</li>
<li>The operation itself consists of a single input message <b><i>SayHelloRequest</i></b></li>
<li>The operation itself consists of a single output message <b><i>SayHelloResponse</i></b></li>
</ul>
<div id="ads-id" align="center"></div>
<h2><b>Operation Types</b></h2>
<p>The request-response type is the most common operation type, but <b>WSDL </b>defines four types:</p>
<table border="1">
<tbody>
<tr>
<th align="left" width="30%">Type</th>
<th align="left" width="70%">Definition</th>
</tr>
<tr>
<td valign="top">One-way</td>
<td valign="top">The operation can receive a message but will not return a response</td>
</tr>
<tr>
<td valign="top">Request-response</td>
<td valign="top">The operation can receive a request and will return a response</td>
</tr>
<tr>
<td valign="top">Solicit-response</td>
<td valign="top">The operation can send a request and will wait for a response</td>
</tr>
<tr>
<td valign="top">Notification</td>
<td valign="top">The operation can send a message but will not wait for a response</td>
</tr>
</tbody>
</table>
<h3><b>One-way :</b></h3>
<p>The service receives a message. The operation therefore has a single input element. The grammar for a one-way operation is:</p>
<pre class="highlight"><;wsdl:definitions .... >; <;wsdl:portType .... >; * 
 <;wsdl:operation name="nmtoken">; 
 <;wsdl:input name="nmtoken"? message="qname"/>; 
 <;/wsdl:operation>; 
 <;/wsdl:portType >; 
<;/wsdl:definitions>; 
</pre>
<h3><b>Request-response:</b></h3>
<p>The service receives a message and sends a response. The operation therefore has one input element, followed by one output element. To encapsulate errors, an optional fault element can also be specified. The grammar for a request-response operation is:</p>
<pre class="highlight"><;wsdl:definitions .... >; 
 <;wsdl:portType .... >; * 
 <;wsdl:operation name="nmtoken" parameterOrder="nmtokens">; 
 <;wsdl:input name="nmtoken"? message="qname"/>; 
 <;wsdl:output name="nmtoken"? message="qname"/>; 
 <;wsdl:fault name="nmtoken" message="qname"/>;* 
 <;/wsdl:operation>; 
 <;/wsdl:portType >; 
<;/wsdl:definitions>; 
</pre>
<h3><b>Solicit-response:</b></h3>
<p>The service sends a message and receives a response. The operation therefore has one output element, followed by one input element. To encapsulate errors, an optional fault element can also be specified. The grammar for a solicit-response operation is:</p>
<pre class="highlight"><;wsdl:definitions .... >; 
 <;wsdl:portType .... >; * 
 <;wsdl:operation name="nmtoken" parameterOrder="nmtokens">; 
 <;wsdl:output name="nmtoken"? message="qname"/>; 
 <;wsdl:input name="nmtoken"? message="qname"/>; 
 <;wsdl:fault name="nmtoken" message="qname"/>;* 
 <;/wsdl:operation>; 
 <;/wsdl:portType >; 
<;/wsdl:definitions>; 
</pre>
<h3><b>Notification :</b></h3>
<p>The service sends a message. The operation therefore has a single output element. Following is the grammar for a notification operation:</p>
<pre class="highlight"><;wsdl:definitions .... >; 
 <;wsdl:portType .... >; * 
 <;wsdl:operation name="nmtoken">; 
 <;wsdl:output name="nmtoken"? message="qname"/>; 
 <;/wsdl:operation>; 
 <;/wsdl:portType >; 
<;/wsdl:definitions>; 
</pre>
<p><i><b>References</b></i><br />
<i><b><a href="http://en.wikipedia.org/wiki/Web_Services_Description_Language" target="_blank" rel="noopener">Wikipedia for WSDL</a></b></i></p>
<p> ;</p>
<div style="background-color: pink; border-width: thin; text-align: center;"><b><;<;<a href="https://dineshonjava.com/wsdl-message-element/">Previous</a> <;<; || <a href="https://dineshonjava.com/core-java-baby-step-to-be-best-java-ian/">Index </a>|| >;>;<a href="https://dineshonjava.com/wsdl-binding-element/">Next</a> >;>;</b></div>
<p> ;</p>
</div>
<div class="wp-post-navigation"> 
									 <div class="wp-post-navigation-pre"> 
									 <a href="https://dineshonjava.com/wsdl-message-element/">Previous</a> 
									 </div> 
									 <div class="wp-post-navigation-next"> 
									 <a href="https://dineshonjava.com/wsdl-binding-element/">Next</a> 
									 </div> 
									</div>
<script type="text/javascript">
jQuery(document).ready(function($) {
 $.post('https://dineshonjava.com/wp-admin/admin-ajax.php', {action: 'mts_view_count', id: '454'});
});
</script>
Strategy Design Patterns We can easily create a strategy design pattern using lambda. To implement…
Decorator Pattern A decorator pattern allows a user to add new functionality to an existing…
Delegating pattern In software engineering, the delegation pattern is an object-oriented design pattern that allows…
Technology has emerged a lot in the last decade, and now we have artificial intelligence;…
Managing a database is becoming increasingly complex now due to the vast amount of data…
Overview In this article, we will explore Spring Scheduler how we could use it by…