diff options
author | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2010-12-03 12:23:19 +0000 |
---|---|---|
committer | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2010-12-03 12:23:19 +0000 |
commit | 1a206d215b186fc87acd7c7662dbc2d29b974557 (patch) | |
tree | ae967297a10b1d11185e3dd91d1fb969b112ab4b /sca-java-2.x/trunk/unreleased/samples/implementation-sample-async/src/main/java/sampleasync/impl/SampleWSDLProxy.java | |
parent | cb3ac51c3f65a47a8870bcd8cad4baf96ebe4bf3 (diff) |
TUSCANY-3801 - update to match infrastructure changes to support native async bindings (not committed yet)
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1041784 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r-- | sca-java-2.x/trunk/unreleased/samples/implementation-sample-async/src/main/java/sampleasync/impl/SampleWSDLProxy.java | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/sca-java-2.x/trunk/unreleased/samples/implementation-sample-async/src/main/java/sampleasync/impl/SampleWSDLProxy.java b/sca-java-2.x/trunk/unreleased/samples/implementation-sample-async/src/main/java/sampleasync/impl/SampleWSDLProxy.java index 55a4d6b488..a02132ac9e 100644 --- a/sca-java-2.x/trunk/unreleased/samples/implementation-sample-async/src/main/java/sampleasync/impl/SampleWSDLProxy.java +++ b/sca-java-2.x/trunk/unreleased/samples/implementation-sample-async/src/main/java/sampleasync/impl/SampleWSDLProxy.java @@ -72,16 +72,27 @@ class SampleWSDLProxy implements WSDLReference { Message message = mf.createMessage(); message.setBody(new Object[]{e}); + // We could MESSAGE_ID here if required. If not the infrastructure + // will generate a UUID + String messageID = "myuniqueid"; + message.getHeaders().put(Constants.MESSAGE_ID, messageID); + + // save the message id ready for when we process the response + asyncMessageMap.put(messageID, op); + // We could add implementation specific headers here if required + //message.getHeaders().put(Constants.???, ???); + try { repr.invokeAsync(ops.get(op), message); } catch (Throwable ex) { ex.printStackTrace(); } - // save the message id ready for when we process the response - String messageID = (String) message.getHeaders().get(Constants.MESSAGE_ID); - - asyncMessageMap.put(messageID, op); + // if we don't provide a message id we can get the one the + // infrastructure generates + //String messageID = (String) message.getHeaders().get(Constants.MESSAGE_ID); + //asyncMessageMap.put(messageID, op); + } } |