Class PortAddressResolver

java.lang.Object
com.sun.xml.ws.api.server.PortAddressResolver

public abstract class PortAddressResolver extends Object
Resolves port address for an endpoint. A WSDL may contain multiple endpoints, and some of the endpoints may be packaged in a single WAR file. If an endpoint is serving the WSDL, it would be nice to fill the port addresses of other endpoints in the WAR.

This interface is implemented by the caller of SDDocument.writeTo(com.sun.xml.ws.api.server.PortAddressResolver, com.sun.xml.ws.api.server.DocumentAddressResolver, java.io.OutputStream) method so that the SDDocument can correctly fills the addresses of known endpoints.

Author:
Jitendra Kotamraju
  • Constructor Details

    • PortAddressResolver

      public PortAddressResolver()
      Default constructor.
  • Method Details

    • getAddressFor

      @Nullable public abstract String getAddressFor(@NotNull QName serviceName, @NotNull String portName)
      Gets the endpoint address for a WSDL port
      Parameters:
      serviceName - WSDL service name(wsd:service in WSDL) for which address is needed. Always non-null.
      portName - WSDL port name(wsdl:port in WSDL) for which address is needed. Always non-null.
      Returns:
      The address needs to be put in WSDL for port element's location attribute. Can be null. If it is null, existing port address is written as it is (without any patching).
    • getAddressFor

      @Nullable public String getAddressFor(@NotNull QName serviceName, @NotNull String portName, String currentAddress)
      Gets the endpoint address for a WSDL port
      Parameters:
      serviceName - WSDL service name(wsd:service in WSDL) for which address is needed. Always non-null.
      portName - WSDL port name(wsdl:port in WSDL) for which address is needed. Always non-null.
      currentAddress - Whatever current address specified for the port in the WSDL
      Returns:
      The address needs to be put in WSDL for port element's location attribute. Can be null. If it is null, existing port address is written as it is (without any patching).