return ex;
}
public void run() {
try {
BindingProvider bp = (BindingProvider)port;
Map<String, Object> requestContext = bp.getRequestContext();
JMSMessageHeadersType requestHeader = new JMSMessageHeadersType();
requestContext.put(JMSConstants.JMS_CLIENT_REQUEST_HEADERS, requestHeader);
for (int idx = 0; idx < 5; idx++) {
String request = "World" + ((prefix != null) ? ":" + prefix : "");
String correlationID = null;
if (corrFactory != null) {
correlationID = corrFactory.createCorrealtionID();
requestHeader.setJMSCorrelationID(correlationID);
request += ":" + correlationID;
}
String expected = "Hello " + request;
String response = port.greetMe(request);
assertEquals("Response didn't match expected request", expected, response);
if (corrFactory != null) {
Map<String, Object> responseContext = bp.getResponseContext();
JMSMessageHeadersType responseHeader =
(JMSMessageHeadersType)responseContext.get(
JMSConstants.JMS_CLIENT_RESPONSE_HEADERS);
assertEquals("Request and Response CorrelationID didn't match",
correlationID, responseHeader.getJMSCorrelationID());