Apache CXF API

org.apache.cxf.wsdl
Class EndpointReferenceUtils

java.lang.Object
  extended by org.apache.cxf.wsdl.EndpointReferenceUtils

public final class EndpointReferenceUtils
extends java.lang.Object

Provides utility methods for obtaining endpoint references, wsdl definitions, etc.


Field Summary
static java.lang.String ANONYMOUS_ADDRESS
           
 
Method Summary
static java.lang.String getAddress(org.apache.cxf.ws.addressing.EndpointReferenceType ref)
          Get the address from the provided endpoint reference.
static org.apache.cxf.ws.addressing.EndpointReferenceType getAnonymousEndpointReference()
          Create an anonymous endpoint reference.
static org.apache.cxf.ws.addressing.EndpointReferenceType getEndpointReference(java.lang.String address)
          Create an endpoint reference for the provided address.
static org.apache.cxf.ws.addressing.EndpointReferenceType getEndpointReference(java.net.URL wsdlUrl, javax.xml.namespace.QName serviceName, java.lang.String portName)
          Create an endpoint reference for the provided wsdl, service and portname.
static org.apache.cxf.ws.addressing.EndpointReferenceType getEndpointReference(WSDLManager manager, java.lang.Object implementor)
          Gets an endpoint reference for the provided implementor object.
static javax.xml.namespace.QName getInterfaceName(org.apache.cxf.ws.addressing.EndpointReferenceType ref)
           
static javax.wsdl.Port getPort(WSDLManager manager, org.apache.cxf.ws.addressing.EndpointReferenceType ref)
          Gets the WSDL port for the provided endpoint reference.
static java.lang.String getPortName(org.apache.cxf.ws.addressing.EndpointReferenceType ref)
          Gets the port name of the provided endpoint reference.
static javax.xml.validation.Schema getSchema(ServiceInfo serviceInfo)
           
static javax.xml.namespace.QName getServiceName(org.apache.cxf.ws.addressing.EndpointReferenceType ref)
          Gets the service name of the provided endpoint reference.
static javax.xml.bind.JAXBElement<org.apache.cxf.ws.addressing.wsdl.ServiceNameType> getServiceNameType(javax.xml.namespace.QName serviceName, java.lang.String portName)
           
static javax.jws.WebService getWebServiceAnnotation(java.lang.Class<?> cls)
          Get the WebService for the provided class.
static javax.wsdl.Definition getWSDLDefinition(WSDLManager manager, org.apache.cxf.ws.addressing.EndpointReferenceType ref)
          Gets the WSDL definition for the provided endpoint reference.
static java.lang.String getWSDLLocation(org.apache.cxf.ws.addressing.EndpointReferenceType ref)
           
static void setAddress(org.apache.cxf.ws.addressing.EndpointReferenceType ref, java.lang.String address)
          Set the address of the provided endpoint reference.
static void setInterfaceName(org.apache.cxf.ws.addressing.EndpointReferenceType ref, javax.xml.namespace.QName portTypeName)
           
static void setMetadata(org.apache.cxf.ws.addressing.EndpointReferenceType ref, java.util.List<javax.xml.transform.Source> metadata)
          Sets the metadata on the provided endpoint reference.
static void setServiceAndPortName(org.apache.cxf.ws.addressing.EndpointReferenceType ref, javax.xml.namespace.QName serviceName, java.lang.String portName)
          Sets the service and port name of the provided endpoint reference.
static void setWSDLLocation(org.apache.cxf.ws.addressing.EndpointReferenceType ref, java.lang.String... wsdlLocation)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ANONYMOUS_ADDRESS

public static final java.lang.String ANONYMOUS_ADDRESS
See Also:
Constant Field Values
Method Detail

setServiceAndPortName

public static void setServiceAndPortName(org.apache.cxf.ws.addressing.EndpointReferenceType ref,
                                         javax.xml.namespace.QName serviceName,
                                         java.lang.String portName)
Sets the service and port name of the provided endpoint reference.

Parameters:
ref - the endpoint reference.
serviceName - the name of service.
portName - the port name.

getServiceNameType

public static javax.xml.bind.JAXBElement<org.apache.cxf.ws.addressing.wsdl.ServiceNameType> getServiceNameType(javax.xml.namespace.QName serviceName,
                                                                                                               java.lang.String portName)

getServiceName

public static javax.xml.namespace.QName getServiceName(org.apache.cxf.ws.addressing.EndpointReferenceType ref)
Gets the service name of the provided endpoint reference.

Parameters:
ref - the endpoint reference.
Returns:
the service name.

getPortName

public static java.lang.String getPortName(org.apache.cxf.ws.addressing.EndpointReferenceType ref)
Gets the port name of the provided endpoint reference.

Parameters:
ref - the endpoint reference.
Returns:
the port name.

setInterfaceName

public static void setInterfaceName(org.apache.cxf.ws.addressing.EndpointReferenceType ref,
                                    javax.xml.namespace.QName portTypeName)

getInterfaceName

public static javax.xml.namespace.QName getInterfaceName(org.apache.cxf.ws.addressing.EndpointReferenceType ref)

setWSDLLocation

public static void setWSDLLocation(org.apache.cxf.ws.addressing.EndpointReferenceType ref,
                                   java.lang.String... wsdlLocation)

getWSDLLocation

public static java.lang.String getWSDLLocation(org.apache.cxf.ws.addressing.EndpointReferenceType ref)

setMetadata

public static void setMetadata(org.apache.cxf.ws.addressing.EndpointReferenceType ref,
                               java.util.List<javax.xml.transform.Source> metadata)
                        throws EndpointUtilsException
Sets the metadata on the provided endpoint reference.

Parameters:
ref - the endpoint reference.
metadata - the list of metadata source.
Throws:
EndpointUtilsException

getWSDLDefinition

public static javax.wsdl.Definition getWSDLDefinition(WSDLManager manager,
                                                      org.apache.cxf.ws.addressing.EndpointReferenceType ref)
                                               throws javax.wsdl.WSDLException
Gets the WSDL definition for the provided endpoint reference.

Parameters:
manager - - the WSDL manager
ref - - the endpoint reference
Returns:
Definition the wsdl definition
Throws:
javax.wsdl.WSDLException

getSchema

public static javax.xml.validation.Schema getSchema(ServiceInfo serviceInfo)

getPort

public static javax.wsdl.Port getPort(WSDLManager manager,
                                      org.apache.cxf.ws.addressing.EndpointReferenceType ref)
                               throws javax.wsdl.WSDLException
Gets the WSDL port for the provided endpoint reference.

Parameters:
manager - - the WSDL manager
ref - - the endpoint reference
Returns:
Port the wsdl port
Throws:
javax.wsdl.WSDLException

getAddress

public static java.lang.String getAddress(org.apache.cxf.ws.addressing.EndpointReferenceType ref)
Get the address from the provided endpoint reference.

Parameters:
ref - - the endpoint reference
Returns:
String the address of the endpoint

setAddress

public static void setAddress(org.apache.cxf.ws.addressing.EndpointReferenceType ref,
                              java.lang.String address)
Set the address of the provided endpoint reference.

Parameters:
ref - - the endpoint reference
address - - the address

getEndpointReference

public static org.apache.cxf.ws.addressing.EndpointReferenceType getEndpointReference(java.net.URL wsdlUrl,
                                                                                      javax.xml.namespace.QName serviceName,
                                                                                      java.lang.String portName)
Create an endpoint reference for the provided wsdl, service and portname.

Parameters:
wsdlUrl - - url of the wsdl that describes the service.
serviceName - - the QName of the service.
portName - - the name of the port.
Returns:
EndpointReferenceType - the endpoint reference

getEndpointReference

public static org.apache.cxf.ws.addressing.EndpointReferenceType getEndpointReference(java.lang.String address)
Create an endpoint reference for the provided address.

Parameters:
address - - address URI
Returns:
EndpointReferenceType - the endpoint reference

getAnonymousEndpointReference

public static org.apache.cxf.ws.addressing.EndpointReferenceType getAnonymousEndpointReference()
Create an anonymous endpoint reference.

Returns:
EndpointReferenceType - the endpoint reference

getWebServiceAnnotation

public static javax.jws.WebService getWebServiceAnnotation(java.lang.Class<?> cls)
Get the WebService for the provided class. If the class itself does not have a WebService annotation, this method is called recursively on the class's interfaces and superclass.

Parameters:
cls - - the Class .
Returns:
WebService - the web service

getEndpointReference

public static org.apache.cxf.ws.addressing.EndpointReferenceType getEndpointReference(WSDLManager manager,
                                                                                      java.lang.Object implementor)
Gets an endpoint reference for the provided implementor object.

Parameters:
manager - - the wsdl manager.
implementor - - the service implementor.
Returns:
EndpointReferenceType - the endpoint reference
Throws:
javax.wsdl.WSDLException

Apache CXF API

Apache CXF is an effort undergoing incubation at the Apache Software Foundation(ASF) and sponsored by the Apache Incubator PMC.