THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block | ||
---|---|---|
| ||
// Set request context property. java.util.Map<StringMap<String, Object>Object> requestContext = ((javax.xml.ws.BindingProvider)port).getRequestContext(); requestContext.put(ContextPropertyName, PropertyValue); // Invoke an operation. port.SomeOperation(); |
...
Code Block | ||
---|---|---|
| ||
// Invoke an operation. port.SomeOperation(); // Read response context property. java.util.Map<StringMap<String, Object>Object> responseContext = ((javax.xml.ws.BindingProvider)port).getResponseContext(); PropertyType propValue = (PropertyType) responseContext.get(ContextPropertyName); |
...
Context Property Name | Context Property Type |
---|---|
|
|
...
- Non-blocking polling — before attempting to get the result, check whether the response has arrived by calling the non-blocking
Response<T>.isDone()
method. For example:Code Block Response<GreetMeSometimeResponse>Response<GreetMeSometimeResponse> greetMeSomeTimeResp = ...; if (greetMeSomeTimeResp.isDone()) { GreetMeSometimeResponse reply = greetMeSomeTimeResp.get(); }
- Blocking polling — call
Response<T>.get()
right away and block until the response arrives (optionally specifying a timeout). For example, to poll for a response, with a 60 second timeout:Code Block Response<GreetMeSometimeResponse>Response<GreetMeSometimeResponse> greetMeSomeTimeResp = ...; GreetMeSometimeResponse reply = greetMeSomeTimeResp.get( 60L, java.util.concurrent.TimeUnit.SECONDS );
...