uTools-Manuals/docs/java/javax/xml/soap/SOAPConnection.html

204 lines
9.9 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<div class="header">
<div class="subTitle">
javax.xml.soap
</div>
<h2 class="title" title="Class SOAPConnection">Class SOAPConnection</h2>
</div><div class="contentContainer">
<ul class="inheritance">
<li><a href="../../../java/lang/Object.html" title="class in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>javax.xml.soap.SOAPConnection</li>
</ul> </li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr/> <br/> <pre>public abstract class <span class="typeNameLabel">SOAPConnection</span>
extends <a href="../../../java/lang/Object.html" title="class in java.lang">Object</a></pre>
<div class="block">
<span>客户端可以将消息直接发送到远程方例如由URL表示的点对点连接。</span>
<p> <span>SOAPConnection类是可选的。</span> <span>一些实现可能不实现这个接口,在这种情况下,调用<code>SOAPConnectionFactory.newInstance()</code> (见下文)将抛出一个<code>UnsupportedOperationException</code></span> </p>
<p> <span>客户端可以使用<a href="../../../javax/xml/soap/SOAPConnectionFactory.html" title="javax.xml.soap中的类"><code>SOAPConnectionFactory</code></a>对象获取一个<code>SOAPConnection</code>对象,如以下示例所示:</span> </p>
<pre> <span>SOAPConnectionFactory factory = SOAPConnectionFactory.newInstance();
SOAPConnection con = factory.createConnection();</span> </pre>
<span>可以使用<code>SOAPConnection</code>对象将消息直接发送到请求/响应范例之后的URL。</span>
<span>也就是说,使用方法<code>call</code>发送消息,该方法发送消息,然后等待直到它得到回复。</span>
</div> </li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
<!-- --> </a> <h3>构造方法摘要</h3>
<table border="0" cellpadding="3" cellspacing="0" class="memberSummary" summary="Constructor Summary table, listing constructors, and an explanation">
<caption>
<span>构造方法</span>
<span class="tabEnd"> </span>
</caption>
<tbody>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../javax/xml/soap/SOAPConnection.html#SOAPConnection--">SOAPConnection</a></span>()</code> </td>
</tr>
</tbody>
</table> </li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- --> </a> <h3>方法摘要</h3>
<table border="0" cellpadding="3" cellspacing="0" class="memberSummary" summary="Method Summary table, listing methods, and an explanation">
<caption>
<span class="activeTableTab" id="t0"><span>所有方法</span><span class="tabEnd"> </span></span>
<span class="tableTab" id="t2"><span><a href="javascript:show(2);">接口方法</a></span><span class="tabEnd"> </span></span>
<span class="tableTab" id="t3"><span><a href="javascript:show(4);">抽象方法</a></span><span class="tabEnd"> </span></span>
<span class="tableTab" id="t4"><span><a href="javascript:show(8);">具体的方法</a></span><span class="tabEnd"> </span></span>
</caption>
<tbody>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor" id="i0">
<td class="colFirst"><code>abstract <a href="../../../javax/xml/soap/SOAPMessage.html" title="class in javax.xml.soap">SOAPMessage</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/xml/soap/SOAPConnection.html#call-javax.xml.soap.SOAPMessage-java.lang.Object-">call</a></span>(<a href="../../../javax/xml/soap/SOAPMessage.html" title="class in javax.xml.soap">SOAPMessage</a> request, <a href="../../../java/lang/Object.html" title="class in java.lang">Object</a> to)</code>
<div class="block">
将给定的消息发送到指定的端点并阻塞,直到它返回响应。
</div> </td>
</tr>
<tr class="rowColor" id="i1">
<td class="colFirst"><code>abstract void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/xml/soap/SOAPConnection.html#close--">close</a></span>()</code>
<div class="block">
关闭此
<code>SOAPConnection</code>对象。
</div> </td>
</tr>
<tr class="altColor" id="i2">
<td class="colFirst"><code><a href="../../../javax/xml/soap/SOAPMessage.html" title="class in javax.xml.soap">SOAPMessage</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/xml/soap/SOAPConnection.html#get-java.lang.Object-">get</a></span>(<a href="../../../java/lang/Object.html" title="class in java.lang">Object</a> to)</code>
<div class="block">
从特定端点获取消息,并阻塞,直到收到,
</div> </td>
</tr>
</tbody>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- --> </a> <h3>Methods inherited from class java.lang.<a href="../../../java/lang/Object.html" title="class in java.lang">Object</a></h3> <code><a href="../../../java/lang/Object.html#clone--">clone</a>, <a href="../../../java/lang/Object.html#equals-java.lang.Object-">equals</a>, <a href="../../../java/lang/Object.html#finalize--">finalize</a>, <a href="../../../java/lang/Object.html#getClass--">getClass</a>, <a href="../../../java/lang/Object.html#hashCode--">hashCode</a>, <a href="../../../java/lang/Object.html#notify--">notify</a>, <a href="../../../java/lang/Object.html#notifyAll--">notifyAll</a>, <a href="../../../java/lang/Object.html#toString--">toString</a>, <a href="../../../java/lang/Object.html#wait--">wait</a>, <a href="../../../java/lang/Object.html#wait-long-">wait</a>, <a href="../../../java/lang/Object.html#wait-long-int-">wait</a></code></li>
</ul> </li>
</ul> </li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- --> </a> <h3>构造方法详细信息</h3> <a name="SOAPConnection--">
<!-- --> </a>
<ul class="blockListLast">
<li class="blockList"> <h4>SOAPConnection</h4> <pre>public SOAPConnection()</pre> </li>
</ul> </li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- --> </a> <h3>方法详细信息</h3> <a name="call-javax.xml.soap.SOAPMessage-java.lang.Object-">
<!-- --> </a>
<ul class="blockList">
<li class="blockList"> <h4>call</h4> <pre>public abstract <a href="../../../javax/xml/soap/SOAPMessage.html" title="class in javax.xml.soap">SOAPMessage</a> call(<a href="../../../javax/xml/soap/SOAPMessage.html" title="class in javax.xml.soap">SOAPMessage</a> request,
<a href="../../../java/lang/Object.html" title="class in java.lang">Object</a> to)
throws <a href="../../../javax/xml/soap/SOAPException.html" title="class in javax.xml.soap">SOAPException</a></pre>
<div class="block">
将给定的消息发送到指定的端点并阻塞,直到它返回响应。
</div>
<dl>
<dt>
<span class="paramLabel">参数</span>
</dt>
<dd>
<code>request</code> - 要发送的
<code>SOAPMessage</code>对象
</dd>
<dd>
<span><code>to</code> - <code>Object</code>消息应发送位置的Object。</span>
<span>它需要支持类型的对象<code>java.lang.String</code> <code>java.net.URL</code> 并且当JAXM存在<code>javax.xml.messaging.URLEndpoint</code></span>
</dd>
<dt>
<span class="returnLabel">结果</span>
</dt>
<dd>
<code>SOAPMessage</code>对象是对发送的消息的响应
</dd>
<dt>
<span class="throwsLabel">异常</span>
</dt>
<dd>
<code><a href="../../../javax/xml/soap/SOAPException.html" title="class in javax.xml.soap">SOAPException</a></code> - 如果存在SOAP错误
</dd>
</dl> </li>
</ul> <a name="get-java.lang.Object-">
<!-- --> </a>
<ul class="blockList">
<li class="blockList"> <h4>get</h4> <pre>public <a href="../../../javax/xml/soap/SOAPMessage.html" title="class in javax.xml.soap">SOAPMessage</a> get(<a href="../../../java/lang/Object.html" title="class in java.lang">Object</a> to)
throws <a href="../../../javax/xml/soap/SOAPException.html" title="class in javax.xml.soap">SOAPException</a></pre>
<div class="block">
从特定端点获取消息,并阻塞,直到收到,
</div>
<dl>
<dt>
<span class="paramLabel">参数</span>
</dt>
<dd>
<span><code>to</code> - 一个<code>Object</code> ,用于标识发送请求的位置。</span>
<span>必须支持类型为<code>java.lang.String</code><code>java.net.URL</code>对象。</span>
</dd>
<dt>
<span class="returnLabel">结果</span>
</dt>
<dd>
<code>SOAPMessage</code>对象是对get消息请求的响应
</dd>
<dt>
<span class="throwsLabel">异常</span>
</dt>
<dd>
<code><a href="../../../javax/xml/soap/SOAPException.html" title="class in javax.xml.soap">SOAPException</a></code> - 如果存在SOAP错误
</dd>
<dt>
<span class="simpleTagLabel">从以下版本开始:</span>
</dt>
<dd>
SAAJ 1.3
</dd>
</dl> </li>
</ul> <a name="close--">
<!-- --> </a>
<ul class="blockListLast">
<li class="blockList"> <h4>close</h4> <pre>public abstract void close()
throws <a href="../../../javax/xml/soap/SOAPException.html" title="class in javax.xml.soap">SOAPException</a></pre>
<div class="block">
关闭此
<code>SOAPConnection</code>对象。
</div>
<dl>
<dt>
<span class="throwsLabel">异常</span>
</dt>
<dd>
<code><a href="../../../javax/xml/soap/SOAPException.html" title="class in javax.xml.soap">SOAPException</a></code> - 如果存在SOAP错误
</dd>
</dl> </li>
</ul> </li>
</ul> </li>
</ul>
</div>
</div>