@Test void buildOneSoapServiceWithWSDLAndNoXSD() throws DocumentParseException { ServiceEntityBuilder builder = new ServiceEntityBuilder(DocumentTools.INSTANCE, new IdGenerator()); Bundle bundle = new Bundle(projectInfo); Folder serviceParentFolder = setUpFolderAndPolicy(bundle, "/soap/policy.xml", "policy"); Service service = new Service(); service.setHttpMethods(Stream.of("POST", "GET").collect(Collectors.toSet())); service.setUrl("/soap/service/url"); service.setPolicy("/soap/policy.xml"); service.setParentFolder(serviceParentFolder); service.setName("soap-service1"); service.setProperties(new HashMap<String, Object>() {{ put("key1", "value1"); put("ENV.key.environment", "something"); }}); service.setWssProcessingEnabled(true); service.setSoapVersion("1.1"); SoapResource wsdlBean = new SoapResource(); wsdlBean.setRootUrl("/test/rooturl/for/soap.wsdl"); wsdlBean.setPath(PathUtils.unixPath(serviceParentFolder.getPath(), service.getName(), "soap.wsdl")); wsdlBean.setContent("wsdl xml content"); wsdlBean.setType(SoapResourceType.WSDL.getType()); service.setWsdlRootUrl(wsdlBean.getRootUrl()); service.addSoapResource(wsdlBean); bundle.putAllServices(new HashMap<String, Service>() {{ put(service.getName(), service); }}); bundle.putAllSoapResources(ImmutableMap.of(wsdlBean.getPath(), wsdlBean)); bundle.buildFolderTree(); List<Entity> services = builder.build(bundle, EntityBuilder.BundleType.DEPLOYMENT, DocumentTools.INSTANCE.getDocumentBuilder().newDocument()); assertEquals(1, services.size()); Entity serviceEntity = services.get(0); verifyService(service, serviceEntity, 1, "soap-service" + 1); }
public List<Entity> build(Bundle bundle, BundleType bundleType, Document document) { return buildEntities(bundle.getServices(), bundle, bundleType, document); }
ServiceEntityBuilder implements EntityBuilder { public List<Entity> build(Bundle bundle, BundleType bundleType, Document document) { return buildEntities(bundle.getServices(), bundle, bundleType, document); } }
ServiceEntityBuilder implements EntityBuilder { public List<Entity> build(Bundle bundle, BundleType bundleType, Document document) { return buildEntities(bundle.getServices(), bundle, bundleType, document); } @Inject  ServiceEntityBuilder(DocumentTools documentTools, IdGenerator idGenerator); }
ServiceEntityBuilder implements EntityBuilder { public List<Entity> build(Bundle bundle, BundleType bundleType, Document document) { return buildEntities(bundle.getServices(), bundle, bundleType, document); } @Inject  ServiceEntityBuilder(DocumentTools documentTools, IdGenerator idGenerator); List<Entity> build(Bundle bundle, BundleType bundleType, Document document); @NotNull @Override Integer getOrder(); }
ServiceEntityBuilder implements EntityBuilder { public List<Entity> build(Bundle bundle, BundleType bundleType, Document document) { return buildEntities(bundle.getServices(), bundle, bundleType, document); } @Inject  ServiceEntityBuilder(DocumentTools documentTools, IdGenerator idGenerator); List<Entity> build(Bundle bundle, BundleType bundleType, Document document); @NotNull @Override Integer getOrder();  }