Entering content frame

Object documentation PropertyContext Interface Locate the document in its SAP Library structure

Definition

The PropertyContext type is used to describe features. This type is very simple and typically it resembles a Hashtable in which you can put values and other Hashtable-s ( PropertyContext-s). The PropertyContextenables us to build trees of key-value, and key-PropertyContext pairs. It is also possible to have both the property and sub-context available at the same time. This class is essential for working with the protocols and bindings, as it stores all configuration information. A brief overview of the PropertyCotnext methods follows:

·        Object getProperty(String key) – gets subContext. If the returned context is a new one, its defined property returns false

·        void setSubContext(String key, PropertyContext context)– sets a sub-context

·        void setProperty(String key, Object content) – sets a property

·        void clear() – clears a property context

·        PropertyContext getSubContext(String key) – returns a sub-property context

·        Enumeration getPropertyKeys() – returns property keys

·        Enumeration getSubcontextKeys() – returns sub-context keys

·        void define() – marks this context as defined explicitly, although it may have no properties set

·        boolean isDefined() – checks if anything is set in this context

·        void joinPropertyContext(String key, PropertyContext context) – joins property sub-context with an existing one

PropertyContext getClone() – returns a clone of this property context

Use

There are two sub-contexts available. Their key values are:

com.sap.engine.services.webservices.jaxrpc.wsdl2java.ClientTransportBinding.BINDING_CONFIG

com.sap.engine.services.webservices.jaxrpc.wsdl2java.ClientTransportBinding.FEATURE_CONFIG

By invoking the method context.getSubContext(ClientTransportBinding.BINDING_CONFIG), you can get the binding configuration that is currently used. The only binding property that is common to all bindings is ClientTransportBinding.ENDPOINT. You can use this to get the endpoint configured:

context.getSubContext(ClientTransportBinding.BINDING_CONFIG).getProperty(ClientTransportBinding.ENDPOINT);

You can inspect other binding configuration properties such as the operation nameconfigured for the current call, but there are just a few that are common to all bindings, as each binding implementation is free to put whatever it requires in this context. You can retrieve a feature configuration, by invoking:

context.getSubContext(ClientTransportBinding.FEATURE_CONFIG)

All features are passed as sub-contexts with feature uri as a key. All feature properties that are reconfigured are properties of these sub-contexts. The main feature/property keys are put as final fields in the package com.sap.engine.services.webservices.jaxrpc.wsdl2java.features. Currently, there are only several features described – Authentication, Proxy, Header and Session feature. The protocol may select the feature it supports, and process it as the required configuration for this feature can be found within its context. Also, the protocol implementation can interact with other feature providers on the chain. Remember that the ClientTransportBinding implementation is always the last in the chain.

 

Leaving content frame