Skip to main content

Reading a response context

To retrieve a particular response context property, ContextPropertyName , use the code shown below.

Reading a Response Context Property on the Client Side

// Invoke an operation.
port.SomeOperation();

// Read response context property.
java.util.Map<String, Object> responseContext =
   ((javax.xml.ws.BindingProvider)port).getResponseContext();
PropertyType propValue = (PropertyType) 
   responseContext.get(ContextPropertyName);

The response context is of type, java.util.Map<String, Object> , which is a hash map that has keys of type String and values of an arbitrary type. Use java.util.Map.get() to access an entry in the hash map of response context properties.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!