public abstract class SOAPConnection extends Object
 SOAPConnection类是可选的。 一些实现可能不实现这个接口,在这种情况下,调用SOAPConnectionFactory.newInstance() (见下文)将抛出一个UnsupportedOperationException 。 
 客户端可以使用SOAPConnectionFactory对象获取一个SOAPConnection对象,如以下示例所示: 
  SOAPConnectionFactory factory = SOAPConnectionFactory.newInstance();
      SOAPConnection con = factory.createConnection();  
       可以使用SOAPConnection对象将消息直接发送到请求/响应范例之后的URL。 
       也就是说,使用方法call发送消息,该方法发送消息,然后等待直到它得到回复。 
      | Constructor and Description | 
|---|
| SOAPConnection() | 
| Modifier and Type | Method and Description | 
|---|---|
| abstract SOAPMessage | call(SOAPMessage request, Object to)
              将给定的消息发送到指定的端点并阻塞,直到它返回响应。 
             | 
| abstract void | close()
              关闭此 
              SOAPConnection对象。 | 
| SOAPMessage | get(Object to)
              从特定端点获取消息,并阻塞,直到收到, 
             | 
public abstract SOAPMessage call(SOAPMessage request, Object to) throws SOAPException
request - 要发送的 
            SOAPMessage对象 
           to - Object消息应发送位置的Object。 
            它需要支持类型的对象java.lang.String , java.net.URL ,并且当JAXM存在javax.xml.messaging.URLEndpoint 
           SOAPMessage对象是对发送的消息的响应 
           SOAPException - 如果存在SOAP错误 
           public SOAPMessage get(Object to) throws SOAPException
to - 一个Object ,用于标识发送请求的位置。 
            必须支持类型为java.lang.String和java.net.URL对象。 
           SOAPMessage对象是对get消息请求的响应 
           SOAPException - 如果存在SOAP错误 
           public abstract void close()
                    throws SOAPException 
          SOAPConnection对象。 
          SOAPException - 如果存在SOAP错误 
            Submit a bug or feature 
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
 Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.