private URI prepareUri(Message<?> requestMessage) throws URISyntaxException { if (this.destinationProvider != null) { return this.destinationProvider.getDestination(); } Map<String, Object> uriVariables = ExpressionEvalMap.from(this.uriVariableExpressions) .usingEvaluationContext(this.evaluationContext) .withRoot(requestMessage) .build(); UriComponents uriComponents = UriComponentsBuilder.fromUriString(this.uri).buildAndExpand(uriVariables); return this.encodeUri ? uriComponents.toUri() : new URI(uriComponents.toUriString()); }
/** Returns the default URI to be used on operations that do not have a URI parameter. */ public String getDefaultUri() { if (destinationProvider != null) { URI uri = destinationProvider.getDestination(); return uri != null ? uri.toString() : null; } else { return null; } }
/** Returns the default URI to be used on operations that do not have a URI parameter. */ public String getDefaultUri() { if (destinationProvider != null) { URI uri = destinationProvider.getDestination(); return uri != null ? uri.toString() : null; } else { return null; } }
/** Returns the default URI to be used on operations that do not have a URI parameter. */ public String getDefaultUri() { if (destinationProvider != null) { URI uri = destinationProvider.getDestination(); return uri != null ? uri.toString() : null; } else { return null; } }
/** Returns the default URI to be used on operations that do not have a URI parameter. */ public String getDefaultUri() { if (destinationProvider != null) { URI uri = destinationProvider.getDestination(); return uri != null ? uri.toString() : null; } else { return null; } }
@Override public String getDefaultUri() { final DestinationProvider destinationProvider = this.getDestinationProvider(); if (destinationProvider != null) { final URI uri = destinationProvider.getDestination(); if (uri == null) { return null; } if (portOverride == null) { return uri.toString(); } final URI overridenUri; try { overridenUri = new URI(uri.getScheme(), uri.getUserInfo(), uri.getHost(), portOverride, uri.getPath(), uri.getQuery(), uri.getFragment()); } catch (URISyntaxException e) { this.logger.error("Could not override port on URI " + uri + " to " + portOverride, e); return uri.toString(); } return overridenUri.toString(); } return null; }
public Object invoke(MethodInvocation arg0) throws Throwable { if(arg0.getArguments().length != 1) { throw new ClientItcbException(ClientItcbExceptionMappingErrors.COMMON_CLIENT_NOT_CORRECT_INTERFACE, messageSource.getMessage("common-client.exception.not_correct_interface", new Object[] {arg0.getMethod()}, LocaleContextHolder.getLocale())); } try { return getWebServiceTemplate().marshalSendAndReceive(arg0.getArguments()[0]); } catch (CommonItcbException cie) { throw cie; } catch (SoapFaultClientException sfce) { logger.error(sfce.getFaultCode(), sfce); throw new ClientItcbException(ClientItcbExceptionMappingErrors.COMMON_CLIENT_TECHNICAL_ERROR, messageSource.getMessage("common-client.exception.technical_error", new Object[] {arg0.getMethod(), getWebServiceTemplate().getDestinationProvider().getDestination(), sfce.getMessage()}, LocaleContextHolder.getLocale()), sfce); } catch(java.lang.Throwable e) { logger.error(e.getMessage(), e); if(getInterceptors() != null) { for (ClientInterceptorTransportExceptionListener clientInterceptor : clientInterceptorTransportExceptionListener) { clientInterceptor.handleTransportException(e, arg0.getArguments()[0]); } } throw new ClientItcbException(ClientItcbExceptionMappingErrors.COMMON_CLIENT_TECHNICAL_ERROR, messageSource.getMessage("common-client.exception.technical_error", new Object[] {arg0.getMethod(), getWebServiceTemplate().getDestinationProvider().getDestination(), e.getMessage()}, LocaleContextHolder.getLocale()), e); } }
throw new ClientItcbException(ClientItcbExceptionMappingErrors.COMMON_CLIENT_TECHNICAL_ERROR, messageSource.getMessage("common-client.exception.technical_error", new Object[] {arg0.getMethod(), getWebServiceTemplate().getDestinationProvider().getDestination()}, LocaleContextHolder.getLocale())); throw new ClientItcbException(ClientItcbExceptionMappingErrors.COMMON_CLIENT_TECHNICAL_ERROR, messageSource.getMessage("common-client.exception.technical_error", new Object[] {arg0.getMethod(), getWebServiceTemplate().getDestinationProvider().getDestination()}, LocaleContextHolder.getLocale()));
throw new ClientItcbException(ClientItcbExceptionMappingErrors.COMMON_CLIENT_TECHNICAL_ERROR, messageSource.getMessage("common-client.exception.technical_error", new Object[] {arg0.getMethod(), getWebServiceTemplate().getDestinationProvider().getDestination(), sfce.getMessage()}, LocaleContextHolder.getLocale()), sfce); throw new ClientItcbException(ClientItcbExceptionMappingErrors.COMMON_CLIENT_TECHNICAL_ERROR, messageSource.getMessage("common-client.exception.technical_error", new Object[] {arg0.getMethod(), getWebServiceTemplate().getDestinationProvider().getDestination(), e.getMessage()}, LocaleContextHolder.getLocale()), e);