From 9b6a3e46fe018e063f2a8fdd67cb90e200ec65e7 Mon Sep 17 00:00:00 2001 From: scottkurz Date: Tue, 6 Dec 2011 20:34:56 +0000 Subject: Switch invoker method signatures, as we don't need to pass binding around. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1211098 13f79535-47bb-0310-9956-ffa450edef68 --- .../sca/binding/ws/jaxws/JAXWSBindingInvoker.java | 30 +++++++++++----------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/JAXWSBindingInvoker.java b/sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/JAXWSBindingInvoker.java index b46ddf7a7f..57262cb96f 100644 --- a/sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/JAXWSBindingInvoker.java +++ b/sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/JAXWSBindingInvoker.java @@ -118,11 +118,11 @@ public class JAXWSBindingInvoker implements Invoker, DataExchangeSemantics { if (endpointReference.getReference().isForCallback()) { this.dynamicDispatchForCallback = true; } else { - this.staticDispatch = createStaticDispatch(wsBinding); + this.staticDispatch = createStaticDispatch(); } } - protected Dispatch createDynamicDispatch(WebServiceBinding wsBinding) { + protected Dispatch createDynamicDispatch() { QName serviceName = wsBinding.getService().getQName(); QName portName = new QName(serviceName.getNamespaceURI(), wsBinding.getPort().getName()); Service service = Service.create(serviceName); @@ -131,7 +131,7 @@ public class JAXWSBindingInvoker implements Invoker, DataExchangeSemantics { return service.createDispatch(portName, SOAPMessage.class, Service.Mode.MESSAGE); } - protected Dispatch createStaticDispatch(WebServiceBinding wsBinding) { + protected Dispatch createStaticDispatch() { URL wsdlLocation = null; try { if (wsBinding.getGeneratedWSDLDocument() != null && wsBinding.getGeneratedWSDLDocument().getDocumentBaseURI() != null) { @@ -150,17 +150,17 @@ public class JAXWSBindingInvoker implements Invoker, DataExchangeSemantics { } if (wsdlLocation != null) { - return createDispatchFromWSDL(wsBinding, wsdlLocation); + return createDispatchFromWSDL(wsdlLocation); } else { - return createDispatchFromURI(wsBinding, wsBinding.getURI()); + return createDispatchFromURI(wsBinding.getURI()); } } - protected Dispatch createDynamicDispatch(WebServiceBinding wsBinding, String uri) { - return createDispatchFromURI(wsBinding, uri); + protected Dispatch createDynamicDispatch(String uri) { + return createDispatchFromURI(uri); } - private Dispatch createDispatchFromWSDL(WebServiceBinding wsBinding, URL wsdlLocation) { + private Dispatch createDispatchFromWSDL(URL wsdlLocation) { QName serviceName = wsBinding.getServiceName(); QName portName = new QName(serviceName.getNamespaceURI(), wsBinding.getPortName()); Service service = Service.create(wsdlLocation, serviceName); @@ -168,7 +168,7 @@ public class JAXWSBindingInvoker implements Invoker, DataExchangeSemantics { return service.createDispatch(portName, SOAPMessage.class, Service.Mode.MESSAGE); } - protected Dispatch createDispatchFromURI(WebServiceBinding wsBinding, String uri) { + protected Dispatch createDispatchFromURI(String uri) { QName serviceName = wsBinding.getService().getQName(); QName portName = new QName(serviceName.getNamespaceURI(), wsBinding.getPort().getName()); Service service = Service.create(serviceName); @@ -320,7 +320,7 @@ public class JAXWSBindingInvoker implements Invoker, DataExchangeSemantics { Endpoint ep = msg.getTo(); if (ep != null && ep.getBinding() != null) { String address = ep.getBinding().getURI(); - invocationDispatch = createDynamicDispatch(wsBinding, address); + invocationDispatch = createDynamicDispatch(address); } else { throw new ServiceRuntimeException("[BWS20025] Unable to determine destination endpoint for endpoint reference " + endpointReference); } @@ -382,7 +382,7 @@ public class JAXWSBindingInvoker implements Invoker, DataExchangeSemantics { // if target endpoint was not specified when this invoker was created, // use dynamically specified target endpoint passed in with the message - String to = getPortLocation(wsBinding); + String to = getPortLocation(); if (to == null) { Endpoint ep = msg.getTo(); if (ep != null && ep.getBinding() != null) { @@ -398,10 +398,10 @@ public class JAXWSBindingInvoker implements Invoker, DataExchangeSemantics { return address; } // end method getToAddress - protected String getPortLocation(WebServiceBinding binding) { + protected String getPortLocation() { String ep = null; - if (binding.getPort() != null) { - List wsdlPortExtensions = binding.getPort().getExtensibilityElements(); + if (wsBinding.getPort() != null) { + List wsdlPortExtensions = wsBinding.getPort().getExtensibilityElements(); for (final Object extension : wsdlPortExtensions) { if (extension instanceof SOAPAddress) { ep = ((SOAPAddress)extension).getLocationURI(); @@ -415,7 +415,7 @@ public class JAXWSBindingInvoker implements Invoker, DataExchangeSemantics { } } if (ep == null || ep.equals("")) { - ep = binding.getURI(); + ep = wsBinding.getURI(); } return ep; } -- cgit v1.2.3