Package org.apache.cxf.ws.addressing
Class EndpointReferenceUtils
java.lang.Object
org.apache.cxf.ws.addressing.EndpointReferenceUtils
Provides utility methods for obtaining endpoint references, wsdl definitions, etc.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic Sourcestatic EndpointReferenceTypeCreate a duplicate endpoint reference sharing all atributesstatic StringGet the address from the provided endpoint reference.static EndpointReferenceTypeCreate an anonymous endpoint reference.static EndpointReferenceTypegetEndpointReference(String address) Create an endpoint reference for the provided address.static EndpointReferenceTypegetEndpointReference(URL wsdlUrl, QName serviceName, String portName) Create an endpoint reference for the provided wsdl, service and portname.static EndpointReferenceTypegetEndpointReference(AttributedURIType address) static StringgetEndpointReferenceId(Map<String, Object> messageContext) Obtain the id String from the endpoint reference of the current dispatch.static EndpointReferenceTypegetEndpointReferenceWithId(QName serviceQName, String portName, String id, Bus bus) Obtain a multiplexed endpoint reference for the deployed service that contains the provided idstatic QNamegetInterfaceName(EndpointReferenceType ref, Bus bus) static StringGets the port name of the provided endpoint reference.static QNamegetPortQName(EndpointReferenceType ref, Bus bus) static SchemagetSchema(ServiceInfo serviceInfo) static SchemagetSchema(ServiceInfo serviceInfo, Bus b) static QNamegetServiceName(EndpointReferenceType ref, Bus bus) Gets the service name of the provided endpoint reference.static jakarta.xml.bind.JAXBElement<ServiceNameType>getServiceNameType(QName serviceName, String portName) static MetadataTypestatic Stringstatic EndpointReferenceTypeMint logical endpoint reference via the Bus EndpointResolverRegistry.static EndpointReferenceTypemint(EndpointReferenceType physical, Bus bus) Mint logical endpoint reference via the Bus EndpointResolverRegistry.static EndpointReferenceTyperenew(EndpointReferenceType logical, EndpointReferenceType physical, Bus bus) Renew logical endpoint reference via the Bus EndpointResolverRegistry.static EndpointReferenceTyperesolve(EndpointReferenceType logical, Bus bus) Resolve logical endpoint reference via the Bus EndpointResolverRegistry.static voidsetAddress(EndpointReferenceType ref, String address) Set the address of the provided endpoint reference.static voidsetInterfaceName(EndpointReferenceType ref, QName portTypeName) static voidsetPortName(EndpointReferenceType ref, String portName) static voidsetServiceAndPortName(EndpointReferenceType ref, QName serviceName, String portName) Sets the service and port name of the provided endpoint reference.static voidsetWSDLLocation(EndpointReferenceType ref, String... wsdlLocation)
-
Field Details
-
ANONYMOUS_ADDRESS
- See Also:
-
-
Method Details
-
setServiceAndPortName
public static void setServiceAndPortName(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.
-
getSetMetadata
-
getServiceNameType
public static jakarta.xml.bind.JAXBElement<ServiceNameType> getServiceNameType(QName serviceName, String portName) -
getServiceName
Gets the service name of the provided endpoint reference.- Parameters:
ref- the endpoint reference.- Returns:
- the service name.
-
getPortName
Gets the port name of the provided endpoint reference.- Parameters:
ref- the endpoint reference.- Returns:
- the port name.
-
getPortQName
-
setPortName
-
setInterfaceName
-
getInterfaceName
-
setWSDLLocation
-
getWSDLLocation
-
getSchema
-
getSchema
-
getAddress
Get the address from the provided endpoint reference.- Parameters:
ref- - the endpoint reference- Returns:
- String the address of the endpoint
-
setAddress
Set the address of the provided endpoint reference.- Parameters:
ref- - the endpoint referenceaddress- - the address
-
getEndpointReference
public static 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- - theQNameof the service.portName- - the name of the port.- Returns:
- EndpointReferenceType - the endpoint reference
-
duplicate
Create a duplicate endpoint reference sharing all atributes- Parameters:
ref- the reference to duplicate- Returns:
- EndpointReferenceType - the duplicate endpoint reference
-
getEndpointReference
Create an endpoint reference for the provided address.- Parameters:
address- - address URI- Returns:
- EndpointReferenceType - the endpoint reference
-
getEndpointReference
-
getAnonymousEndpointReference
Create an anonymous endpoint reference.- Returns:
- EndpointReferenceType - the endpoint reference
-
resolve
Resolve logical endpoint reference via the Bus EndpointResolverRegistry.- Parameters:
logical- the abstract EPR to resolve- Returns:
- the resolved concrete EPR if appropriate, null otherwise
-
renew
public static EndpointReferenceType renew(EndpointReferenceType logical, 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
-
mint
Mint logical endpoint reference via the Bus EndpointResolverRegistry.- Parameters:
serviceName- the given serviceName- Returns:
- the newly minted EPR if appropriate, null otherwise
-
mint
Mint logical endpoint reference via the Bus EndpointResolverRegistry.- Parameters:
physical- the concrete template EPR- Returns:
- the newly minted EPR if appropriate, null otherwise
-
getEndpointReferenceWithId
public static 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 serviceportName- identifies a particular port of the service, may be nullid- that must be embedded in the returned referencebus- the current bus- Returns:
- a new reference or null if the target destination does not support destination mutiplexing
-
getEndpointReferenceId
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
-
convertToXML
-