diff options
Diffstat (limited to 'sca-java-2.x/trunk/samples/extending-tuscany/implementation-sample/src/main/java')
2 files changed, 11 insertions, 0 deletions
diff --git a/sca-java-2.x/trunk/samples/extending-tuscany/implementation-sample/src/main/java/sample/api/WSDLReference.java b/sca-java-2.x/trunk/samples/extending-tuscany/implementation-sample/src/main/java/sample/api/WSDLReference.java index bc0d5cc5d8..a25df3e895 100644 --- a/sca-java-2.x/trunk/samples/extending-tuscany/implementation-sample/src/main/java/sample/api/WSDLReference.java +++ b/sca-java-2.x/trunk/samples/extending-tuscany/implementation-sample/src/main/java/sample/api/WSDLReference.java @@ -24,6 +24,7 @@ import org.w3c.dom.Element; public interface WSDLReference { Element call(String op, Element e); + public Element callBare(String op, Element... e); void callAsync(String op, Element e); } diff --git a/sca-java-2.x/trunk/samples/extending-tuscany/implementation-sample/src/main/java/sample/impl/SampleWSDLProxy.java b/sca-java-2.x/trunk/samples/extending-tuscany/implementation-sample/src/main/java/sample/impl/SampleWSDLProxy.java index 176dac6b15..5b42bce28f 100644 --- a/sca-java-2.x/trunk/samples/extending-tuscany/implementation-sample/src/main/java/sample/impl/SampleWSDLProxy.java +++ b/sca-java-2.x/trunk/samples/extending-tuscany/implementation-sample/src/main/java/sample/impl/SampleWSDLProxy.java @@ -68,6 +68,16 @@ class SampleWSDLProxy implements WSDLReference { } @Override + public Element callBare(String op, Element... e) { + try { + // Invoke the named operation on the endpoint reference + return (Element)repr.invoke(ops.get(op), e); + } catch(InvocationTargetException ex) { + throw new RuntimeException(ex); + } + } + + @Override public void callAsync(String op, Element e) { // Asynchronously invoke the named operation on the endpoint reference Message message = mf.createMessage(); |