IT. Expert System.

Java basics

getPort()


getPort public T getPort(javax.xml.namespace.QName portName, java.lang.Class serviceEndpointInterface) The getPort method returns a proxy. A service client uses this proxy to invoke operations on the target service endpoint. The serviceEndpointInterface specifies the service endpoint interface that is supported by the created dynamic proxy instance. Parameters: portName - Qualified name of the service endpoint in the WSDL service description. serviceEndpointInterface - Service endpoint interface supported by the dynamic proxy instance. Returns: Object Proxy instance that supports the specified service endpoint interface. Throws: WebServiceException - This exception is thrown in the following cases: If there is an error in creation of the proxy. If there is any missing WSDL metadata as required by this method. If an illegal serviceEndpointInterface or portName is specified.

Syntax:
public  T getPort(javax.xml.namespace.QName portName,
                     java.lang.Class serviceEndpointInterface)


Example:

import java.io.IOException;
import java.net.InetAddress;
import java.net.Socket;
import java.net.SocketException;
import java.net.UnknownHostException;

public class Main {
   public static void main(String[] args) {
      try {
         InetAddress addr = 
         InetAddress.getByName("74.125.67.100");
         Socket theSocket = new Socket(addr, 80);
         System.out.println("Connected to " 
         + theSocket.getInetAddress()
         + " on port " + theSocket.getPort() + " from port "
         + theSocket.getLocalPort() + " of " 
         + theSocket.getLocalAddress());
      } 
      catch (UnknownHostException e) {
         System.err.println("I can't find " + e  );
      }
      catch (SocketException e) {
         System.err.println("Could not connect to " +e );
      }
      catch (IOException e) {
         System.err.println(e);
      }
   }
}


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 123 / 159177942. Delta: 0.04019 с