Retrieving an Endpoint Reference
Prerequisites
Enable the SOAP binding that delivers the message to the Spring component for WS-Addressing to use reference parameters.
Procedure
-
Import context, endpoint reference, request context, wildcard extension, and URI class definitions:
import com.tibco.amf.platform.runtime.extension.context.ComponentContext;
import com.tibco.amf.platform.runtime.extension.context.EndpointReference;
import com.tibco.amf.platform.runtime.extension.context.RequestContext;
import com.tibco.amf.platform.runtime.extension.context.WildCardExtension;
import java.net.URI;
-
Declare the component context:
@Context
public ComponentContext componentContext;
-
Retrieve the request context:
RequestContext requestContext = (RequestContext)componentContext.getRequestContext();
-
Retrieve the endpoint reference:
EndpointReference<Element> endpointReference = requestContext.getEndpointReference(Element.class);
-
Optionally retrieve the URI and reference parameters from the endpoint reference:
URI uri = endpointReference.getAddress().getURI();
WildCardExtension<Element> refElements = endpointReference.getReferenceParameters();
Copyright © 2022. Cloud Software Group, Inc. All Rights Reserved.