Package org.apache.cxf.ws.addressing
Class EndpointReferenceUtils
- java.lang.Object
- 
- org.apache.cxf.ws.addressing.EndpointReferenceUtils
 
- 
 public final class EndpointReferenceUtils extends Object Provides utility methods for obtaining endpoint references, wsdl definitions, etc.
- 
- 
Field SummaryFields Modifier and Type Field Description static StringANONYMOUS_ADDRESS
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static SourceconvertToXML(org.apache.cxf.ws.addressing.EndpointReferenceType epr)static org.apache.cxf.ws.addressing.EndpointReferenceTypeduplicate(org.apache.cxf.ws.addressing.EndpointReferenceType ref)Create a duplicate endpoint reference sharing all atributesstatic StringgetAddress(org.apache.cxf.ws.addressing.EndpointReferenceType ref)Get the address from the provided endpoint reference.static org.apache.cxf.ws.addressing.EndpointReferenceTypegetAnonymousEndpointReference()Create an anonymous endpoint reference.static org.apache.cxf.ws.addressing.EndpointReferenceTypegetEndpointReference(String address)Create an endpoint reference for the provided address.static org.apache.cxf.ws.addressing.EndpointReferenceTypegetEndpointReference(URL wsdlUrl, QName serviceName, String portName)Create an endpoint reference for the provided wsdl, service and portname.static org.apache.cxf.ws.addressing.EndpointReferenceTypegetEndpointReference(org.apache.cxf.ws.addressing.AttributedURIType address)static StringgetEndpointReferenceId(Map<String,Object> messageContext)Obtain the id String from the endpoint reference of the current dispatch.static org.apache.cxf.ws.addressing.EndpointReferenceTypegetEndpointReferenceWithId(QName serviceQName, String portName, String id, Bus bus)Obtain a multiplexed endpoint reference for the deployed service that contains the provided idstatic QNamegetInterfaceName(org.apache.cxf.ws.addressing.EndpointReferenceType ref, Bus bus)static StringgetPortName(org.apache.cxf.ws.addressing.EndpointReferenceType ref)Gets the port name of the provided endpoint reference.static QNamegetPortQName(org.apache.cxf.ws.addressing.EndpointReferenceType ref, Bus bus)static SchemagetSchema(ServiceInfo serviceInfo)static SchemagetSchema(ServiceInfo serviceInfo, Bus b)static QNamegetServiceName(org.apache.cxf.ws.addressing.EndpointReferenceType ref, Bus bus)Gets the service name of the provided endpoint reference.static javax.xml.bind.JAXBElement<org.apache.cxf.ws.addressing.wsdl.ServiceNameType>getServiceNameType(QName serviceName, String portName)static org.apache.cxf.ws.addressing.MetadataTypegetSetMetadata(org.apache.cxf.ws.addressing.EndpointReferenceType ref)static StringgetWSDLLocation(org.apache.cxf.ws.addressing.EndpointReferenceType ref)static org.apache.cxf.ws.addressing.EndpointReferenceTypemint(QName serviceName, Bus bus)Mint logical endpoint reference via the Bus EndpointResolverRegistry.static org.apache.cxf.ws.addressing.EndpointReferenceTypemint(org.apache.cxf.ws.addressing.EndpointReferenceType physical, Bus bus)Mint logical endpoint reference via the Bus EndpointResolverRegistry.static org.apache.cxf.ws.addressing.EndpointReferenceTyperenew(org.apache.cxf.ws.addressing.EndpointReferenceType logical, org.apache.cxf.ws.addressing.EndpointReferenceType physical, Bus bus)Renew logical endpoint reference via the Bus EndpointResolverRegistry.static org.apache.cxf.ws.addressing.EndpointReferenceTyperesolve(org.apache.cxf.ws.addressing.EndpointReferenceType logical, Bus bus)Resolve logical endpoint reference via the Bus EndpointResolverRegistry.static voidsetAddress(org.apache.cxf.ws.addressing.EndpointReferenceType ref, String address)Set the address of the provided endpoint reference.static voidsetInterfaceName(org.apache.cxf.ws.addressing.EndpointReferenceType ref, QName portTypeName)static voidsetPortName(org.apache.cxf.ws.addressing.EndpointReferenceType ref, String portName)static voidsetServiceAndPortName(org.apache.cxf.ws.addressing.EndpointReferenceType ref, QName serviceName, String portName)Sets the service and port name of the provided endpoint reference.static voidsetWSDLLocation(org.apache.cxf.ws.addressing.EndpointReferenceType ref, String... wsdlLocation)
 
- 
- 
- 
Field Detail- 
ANONYMOUS_ADDRESSpublic static final String ANONYMOUS_ADDRESS - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
setServiceAndPortNamepublic static void setServiceAndPortName(org.apache.cxf.ws.addressing.EndpointReferenceType ref, QName serviceName, 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.
 
 - 
getSetMetadatapublic static org.apache.cxf.ws.addressing.MetadataType getSetMetadata(org.apache.cxf.ws.addressing.EndpointReferenceType ref) 
 - 
getServiceNameTypepublic static javax.xml.bind.JAXBElement<org.apache.cxf.ws.addressing.wsdl.ServiceNameType> getServiceNameType(QName serviceName, String portName) 
 - 
getServiceNamepublic static QName getServiceName(org.apache.cxf.ws.addressing.EndpointReferenceType ref, Bus bus) Gets the service name of the provided endpoint reference.- Parameters:
- ref- the endpoint reference.
- Returns:
- the service name.
 
 - 
getPortNamepublic static 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.
 
 - 
getPortQNamepublic static QName getPortQName(org.apache.cxf.ws.addressing.EndpointReferenceType ref, Bus bus) 
 - 
setPortNamepublic static void setPortName(org.apache.cxf.ws.addressing.EndpointReferenceType ref, String portName)
 - 
setInterfaceNamepublic static void setInterfaceName(org.apache.cxf.ws.addressing.EndpointReferenceType ref, QName portTypeName)
 - 
getInterfaceNamepublic static QName getInterfaceName(org.apache.cxf.ws.addressing.EndpointReferenceType ref, Bus bus) 
 - 
setWSDLLocationpublic static void setWSDLLocation(org.apache.cxf.ws.addressing.EndpointReferenceType ref, String... wsdlLocation)
 - 
getWSDLLocationpublic static String getWSDLLocation(org.apache.cxf.ws.addressing.EndpointReferenceType ref) 
 - 
getSchemapublic static Schema getSchema(ServiceInfo serviceInfo) 
 - 
getSchemapublic static Schema getSchema(ServiceInfo serviceInfo, Bus b) 
 - 
getAddresspublic static 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
 
 - 
setAddresspublic static void setAddress(org.apache.cxf.ws.addressing.EndpointReferenceType ref, String address)Set the address of the provided endpoint reference.- Parameters:
- ref- - the endpoint reference
- address- - the address
 
 - 
getEndpointReferencepublic static org.apache.cxf.ws.addressing.EndpointReferenceType getEndpointReference(URL wsdlUrl, QName serviceName, 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- QNameof the service.
- portName- - the name of the port.
- Returns:
- EndpointReferenceType - the endpoint reference
 
 - 
duplicatepublic static org.apache.cxf.ws.addressing.EndpointReferenceType duplicate(org.apache.cxf.ws.addressing.EndpointReferenceType ref) Create a duplicate endpoint reference sharing all atributes- Parameters:
- ref- the reference to duplicate
- Returns:
- EndpointReferenceType - the duplicate endpoint reference
 
 - 
getEndpointReferencepublic static org.apache.cxf.ws.addressing.EndpointReferenceType getEndpointReference(String address) Create an endpoint reference for the provided address.- Parameters:
- address- - address URI
- Returns:
- EndpointReferenceType - the endpoint reference
 
 - 
getEndpointReferencepublic static org.apache.cxf.ws.addressing.EndpointReferenceType getEndpointReference(org.apache.cxf.ws.addressing.AttributedURIType address) 
 - 
getAnonymousEndpointReferencepublic static org.apache.cxf.ws.addressing.EndpointReferenceType getAnonymousEndpointReference() Create an anonymous endpoint reference.- Returns:
- EndpointReferenceType - the endpoint reference
 
 - 
resolvepublic static org.apache.cxf.ws.addressing.EndpointReferenceType resolve(org.apache.cxf.ws.addressing.EndpointReferenceType logical, Bus bus)Resolve logical endpoint reference via the Bus EndpointResolverRegistry.- Parameters:
- logical- the abstract EPR to resolve
- Returns:
- the resolved concrete EPR if appropriate, null otherwise
 
 - 
renewpublic static org.apache.cxf.ws.addressing.EndpointReferenceType renew(org.apache.cxf.ws.addressing.EndpointReferenceType logical, org.apache.cxf.ws.addressing.EndpointReferenceType physical, Bus bus)Renew logical endpoint reference via the Bus EndpointResolverRegistry.- Parameters:
- logical- the original abstract EPR (if still available)
- physical- the concrete EPR to renew
- Returns:
- the renewed concrete EPR if appropriate, null otherwise
 
 - 
mintpublic static org.apache.cxf.ws.addressing.EndpointReferenceType mint(QName serviceName, Bus bus) Mint logical endpoint reference via the Bus EndpointResolverRegistry.- Parameters:
- serviceName- the given serviceName
- Returns:
- the newly minted EPR if appropriate, null otherwise
 
 - 
mintpublic static org.apache.cxf.ws.addressing.EndpointReferenceType mint(org.apache.cxf.ws.addressing.EndpointReferenceType physical, Bus bus)Mint logical endpoint reference via the Bus EndpointResolverRegistry.- Parameters:
- physical- the concrete template EPR
- Returns:
- the newly minted EPR if appropriate, null otherwise
 
 - 
getEndpointReferenceWithIdpublic static org.apache.cxf.ws.addressing.EndpointReferenceType getEndpointReferenceWithId(QName serviceQName, String portName, String id, Bus bus) Obtain a multiplexed endpoint reference for the deployed service that contains the provided id- Parameters:
- serviceQName- identified the target service
- portName- identifies a particular port of the service, may be null
- id- that must be embedded in the returned reference
- bus- the current bus
- Returns:
- a new reference or null if the target destination does not support destination mutiplexing
 
 - 
getEndpointReferenceIdpublic static String getEndpointReferenceId(Map<String,Object> messageContext) Obtain the id String from the endpoint reference of the current dispatch.- Parameters:
- messageContext- the current message context
- Returns:
- the id embedded in the current endpoint reference or null if not found
 
 - 
convertToXMLpublic static Source convertToXML(org.apache.cxf.ws.addressing.EndpointReferenceType epr) 
 
- 
 
-