wsBinding.setURI(uri); wsBinding.setUserSpecifiedURI(uri);
wsBinding.setURI(uri); wsBinding.setUserSpecifiedURI(uri);
wsBinding.setURI(serviceURI);
/** * Create an Async Response Endpoint * @param msg - the Tuscany message * @param respInvoker - the AsyncResponseInvoker for the async response * @return - an Endpoint which embodies the callback address */ private Endpoint createAsyncResponseEndpoint(Message msg, AsyncResponseInvoker<String> respInvoker) { String callbackAddress = respInvoker.getResponseTargetAddress(); if( callbackAddress == null ) return null; // Get the necessary factories ExtensionPointRegistry registry = endpointReference.getCompositeContext().getExtensionPointRegistry(); FactoryExtensionPoint modelFactories = registry.getExtensionPoint(FactoryExtensionPoint.class); RuntimeAssemblyFactory assemblyFactory = (RuntimeAssemblyFactory)modelFactories.getFactory(AssemblyFactory.class); WebServiceBindingFactory webServiceBindingFactory = (WebServiceBindingFactory)modelFactories.getFactory(WebServiceBindingFactory.class); // Create the endpoint RuntimeEndpoint callbackEndpoint = (RuntimeEndpoint)assemblyFactory.createEndpoint(); // Add a binding WebServiceBinding cbBinding = webServiceBindingFactory.createWebServiceBinding(); cbBinding.setURI(callbackAddress); callbackEndpoint.setBinding(cbBinding); // Embed the response Address URI callbackEndpoint.setURI(callbackAddress); callbackEndpoint.setUnresolved(true); return callbackEndpoint; } // end method createAsyncResponseEndpoint
/** * If there is a callback address, create an EPR for the callback with a referenced endpoint that contains * the binding and the target callback address * @param callbackAddress - the callback address - may be null * @param inMC - the Axis incoming message context * @param msg - the Tuscany message * @throws AxisFault - if the callback address has any of the disallowed forms of callback address */ private void createCallbackEPR( String callbackAddress, MessageContext inMC, Message msg ) throws AxisFault { if (callbackAddress != null ) { // Check for special (& not allowed!) WS_Addressing values checkCallbackAddress( callbackAddress, inMC ); // EndpointReference from = assemblyFactory.createEndpointReference(); Endpoint fromEndpoint = assemblyFactory.createEndpoint(); from.setTargetEndpoint(fromEndpoint); from.setStatus(EndpointReference.Status.WIRED_TARGET_FOUND_AND_MATCHED); msg.setFrom(from); RuntimeEndpoint callbackEndpoint = (RuntimeEndpoint)assemblyFactory.createEndpoint(); // WebServiceBinding cbBinding = webServiceBindingFactory.createWebServiceBinding(); cbBinding.setURI(callbackAddress); callbackEndpoint.setBinding(cbBinding); // callbackEndpoint.setURI(callbackAddress); callbackEndpoint.setUnresolved(true); from.setCallbackEndpoint(callbackEndpoint); } // end if } // end method createCallbackEPR
wsBinding.setURI(deployedURI);
cbBinding.setURI(callbackAddress); callbackEndpoint.setBinding(cbBinding);
model.setURI(getPortAddress(port)); model.setUserSpecifiedURI(model.getURI());
model.setURI(getPortAddress(port)); model.setUserSpecifiedURI(model.getURI());