public File getOutputFile() { JaxWsImplementorInfo jaxwsImpl = serviceFactory.getJaxWsImplementorInfo(); String wsdlLocation = jaxwsImpl.getWsdlLocation(); if (!StringUtils.isEmpty(wsdlLocation)) { try { URI uri = new URI(wsdlLocation); if ("file".equals(uri.getScheme()) || StringUtils.isEmpty(uri.getScheme())) { File f = new File(uri); if (f.exists()) { return f; } } } catch (Exception e) { //ignore } File f = new File(wsdlLocation); if (f.exists()) { return f; } } return super.getOutputFile(); }
@Override protected String detectTransportIdFromAddress(String ad) { ConduitInitiatorManager cim = getBus().getExtension(ConduitInitiatorManager.class); ConduitInitiator ci = cim.getConduitInitiatorForUri(getAddress()); if (ci != null) { return ci.getTransportIds().get(0); } return null; }
@Override public ServiceBuilder newBuilder(FrontendFactory.Style s) { DataBinding dataBinding; final String dbn = getDatabindingName(); if (ToolConstants.JAXB_DATABINDING.equals(dbn)) { dataBinding = new JAXBDataBinding(); } else if (ToolConstants.AEGIS_DATABINDING.equals(dbn)) { dataBinding = new AegisDatabinding(); } else { throw new ToolException("Unsupported databinding: " + dbn); } AbstractServiceFactory builder = null; if (Style.Jaxws.equals(s)) { builder = new JaxwsServiceBuilder(); } else if (Style.Simple.equals(s)) { builder = new SimpleServiceBuilder(); } else { throw new ToolException("Unsupported frontend style: " + s); } builder.setDataBinding(dataBinding); builder.setServiceClass(serviceClass); return builder; } }
public ServiceInfo createService() { try { return createEndpoint().getEndpointInfo().getService(); } catch (Exception e) { throw new RuntimeException(e); } }
public void setServiceClass(Class<?> clz) { super.setServiceClass(clz); getServiceFactory().setServiceClass(clz); }
@Override protected WSDLEndpointFactory getWSDLEndpointFactory() { if (destinationFactory == null) { try { destinationFactory = getBus().getExtension(DestinationFactoryManager.class) .getDestinationFactory(transportId); } catch (Throwable t) { try { Object o = getBus().getExtension(ConduitInitiatorManager.class) .getConduitInitiator(transportId); if (o instanceof WSDLEndpointFactory) { return (WSDLEndpointFactory)o; } } catch (Throwable th) { //ignore } } } if (destinationFactory instanceof WSDLEndpointFactory) { return (WSDLEndpointFactory)destinationFactory; } return null; }
@Override public ServiceBuilder newBuilder(FrontendFactory.Style s) { ApplicationContext applicationContext = getApplicationContext(beanDefinitions); DataBinding dataBinding; String databindingBeanName = databindingNameToBeanName(databindingName); try { dataBinding = (DataBinding)applicationContext.getBean(databindingBeanName); } catch (RuntimeException e) { throw new ToolException("Cannot get databinding bean " + databindingBeanName + " for databinding " + databindingName, e); } String beanName = getBuilderBeanName(s); ServiceBuilder builder = null; try { builder = applicationContext.getBean(beanName, ServiceBuilder.class); AbstractServiceFactory serviceFactory = (AbstractServiceFactory)builder; serviceFactory.setDataBinding(dataBinding); } catch (RuntimeException e) { throw new ToolException("Can not get ServiceBuilder bean " + beanName + "to initialize the ServiceBuilder for style: " + s + " Reason: \n" + e.getMessage(), e); } builder.setServiceClass(serviceClass); return builder; }
@Override protected String detectTransportIdFromAddress(String ad) { ConduitInitiatorManager cim = getBus().getExtension(ConduitInitiatorManager.class); ConduitInitiator ci = cim.getConduitInitiatorForUri(getAddress()); if (ci != null) { return ci.getTransportIds().get(0); } return null; }
@Override public ServiceBuilder newBuilder(FrontendFactory.Style s) { DataBinding dataBinding; final String dbn = getDatabindingName(); if (ToolConstants.JAXB_DATABINDING.equals(dbn)) { dataBinding = new JAXBDataBinding(); } else if (ToolConstants.AEGIS_DATABINDING.equals(dbn)) { dataBinding = new AegisDatabinding(); } else { throw new ToolException("Unsupported databinding: " + dbn); } AbstractServiceFactory builder = null; if (Style.Jaxws.equals(s)) { builder = new JaxwsServiceBuilder(); } else if (Style.Simple.equals(s)) { builder = new SimpleServiceBuilder(); } else { throw new ToolException("Unsupported frontend style: " + s); } builder.setDataBinding(dataBinding); builder.setServiceClass(serviceClass); return builder; } }
public ServiceInfo createService() { try { return createEndpoint().getEndpointInfo().getService(); } catch (Exception e) { throw new RuntimeException(e); } }
public void setServiceClass(Class<?> clz) { super.setServiceClass(clz); getServiceFactory().setServiceClass(clz); }
@Override protected WSDLEndpointFactory getWSDLEndpointFactory() { if (destinationFactory == null) { try { destinationFactory = getBus().getExtension(DestinationFactoryManager.class) .getDestinationFactory(transportId); } catch (Throwable t) { try { Object o = getBus().getExtension(ConduitInitiatorManager.class) .getConduitInitiator(transportId); if (o instanceof WSDLEndpointFactory) { return (WSDLEndpointFactory)o; } } catch (Throwable th) { //ignore } } } if (destinationFactory instanceof WSDLEndpointFactory) { return (WSDLEndpointFactory)destinationFactory; } return null; }
@Override public ServiceBuilder newBuilder(FrontendFactory.Style s) { ApplicationContext applicationContext = getApplicationContext(beanDefinitions); DataBinding dataBinding; String databindingBeanName = databindingNameToBeanName(databindingName); try { dataBinding = (DataBinding)applicationContext.getBean(databindingBeanName); } catch (RuntimeException e) { throw new ToolException("Cannot get databinding bean " + databindingBeanName + " for databinding " + databindingName, e); } String beanName = getBuilderBeanName(s); ServiceBuilder builder = null; try { builder = applicationContext.getBean(beanName, ServiceBuilder.class); AbstractServiceFactory serviceFactory = (AbstractServiceFactory)builder; serviceFactory.setDataBinding(dataBinding); } catch (RuntimeException e) { throw new ToolException("Can not get ServiceBuilder bean " + beanName + "to initialize the ServiceBuilder for style: " + s + " Reason: \n" + e.getMessage(), e); } builder.setServiceClass(serviceClass); return builder; }
public File getOutputFile() { JaxWsImplementorInfo jaxwsImpl = serviceFactory.getJaxWsImplementorInfo(); String wsdlLocation = jaxwsImpl.getWsdlLocation(); if (!StringUtils.isEmpty(wsdlLocation)) { try { URI uri = new URI(wsdlLocation); if ("file".equals(uri.getScheme()) || StringUtils.isEmpty(uri.getScheme())) { File f = new File(uri); if (f.exists()) { return f; } } } catch (Exception e) { //ignore } File f = new File(wsdlLocation); if (f.exists()) { return f; } } return super.getOutputFile(); }