com.sun.xml.ws.api.server
Class PortAddressResolver

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

public abstract class PortAddressResolver
extends java.lang.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.


Constructor Summary
PortAddressResolver()
           
 
Method Summary
abstract  java.lang.String getAddressFor(javax.xml.namespace.QName serviceName, java.lang.String portName)
          Gets the endpoint address for a WSDL port
 java.lang.String getAddressFor(javax.xml.namespace.QName serviceName, java.lang.String portName, java.lang.String currentAddress)
          Gets the endpoint address for a WSDL port
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PortAddressResolver

public PortAddressResolver()
Method Detail

getAddressFor

@Nullable
public abstract java.lang.String getAddressFor(@NotNull
                                                        javax.xml.namespace.QName serviceName,
                                                        @NotNull
                                                        java.lang.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 java.lang.String getAddressFor(@NotNull
                                               javax.xml.namespace.QName serviceName,
                                               @NotNull
                                               java.lang.String portName,
                                               java.lang.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).


Copyright (c) 1997-2012 Oracle and/or its affiliates. All rights reserved.