@Test public void testTN_BPEL4WSProcessTModel() throws WSDLException, JAXBException, Exception { String targetNamespace = "http: QName serviceName = new QName (targetNamespace, "ReservationAndBookingTickets"); String bpelOverViewUrl = "http: Definition wsdlDefinition = rw.readWSDL("bpel/bpel-technote.wsdl"); @SuppressWarnings("unchecked") Map<QName,PortType> portTypes= (Map<QName,PortType>) wsdlDefinition.getAllPortTypes(); TModel bpel4WSTModel = bpel2UDDI.createBPEL4WSProcessTModel(serviceName, targetNamespace, portTypes, bpelOverViewUrl); System.out.println("***** BPEL4WS Process TModel: " + bpel4WSTModel.getName().getValue()); if (serialize) System.out.println(pTModel.print(bpel4WSTModel)); Assert.assertNotNull(bpel4WSTModel); }
public TModel createBPEL4WSProcessTModel(QName serviceName, String targetNamespace, Map<QName,PortType> portTypes, String bpelOverviewURL) { TModel tModel = new TModel(); tModel.setTModelKey(keyDomainURI + serviceName.getLocalPart() + "Process"); Name name = new Name(); name.setLang("en"); name.setValue(serviceName.getLocalPart()); tModel.setName(name); OverviewURL overviewURL = new OverviewURL(); overviewURL.setValue("http: OverviewDoc overviewDoc = new OverviewDoc(); overviewDoc.setOverviewURL(overviewURL); tModel.getOverviewDoc().add(overviewDoc); CategoryBag categoryBag = new CategoryBag(); if (targetNamespace!=null) { KeyedReference namespaceReference = WSDL2UDDI.newKeyedReference( "uddi:uddi.org:xml:namespace", "uddi-org:xml:namespace", targetNamespace); categoryBag.getKeyedReference().add(namespaceReference); } KeyedReference typesReference = WSDL2UDDI.newKeyedReference( "uddi:uddi.org:bpel:types", "uddi-org:bpel:types", "process"); categoryBag.getKeyedReference().add(typesReference); for (QName qName : portTypes.keySet()) { String portTypeKey = keyDomainURI + qName.getLocalPart(); KeyedReference portTypeReference = WSDL2UDDI.newKeyedReference( "uddi:uddi.org:wsdl:porttypereference", "uddi-org:wsdl:portTypeReference", portTypeKey); categoryBag.getKeyedReference().add(portTypeReference); } tModel.setCategoryBag(categoryBag); if (log.isDebugEnabled()) { log.debug(new PrintUDDI<TModel>().print(tModel)); } return tModel; }
BPEL2UDDI extends AnnotationProcessor { public TModel createBPEL4WSProcessTModel(QName serviceName, String targetNamespace, Map<QName,PortType> portTypes, String bpelOverviewURL) { TModel tModel = new TModel(); tModel.setTModelKey(keyDomainURI + serviceName.getLocalPart() + "Process"); Name name = new Name(); name.setLang("en"); name.setValue(serviceName.getLocalPart()); tModel.setName(name); OverviewURL overviewURL = new OverviewURL(); overviewURL.setValue("http: OverviewDoc overviewDoc = new OverviewDoc(); overviewDoc.setOverviewURL(overviewURL); tModel.getOverviewDoc().add(overviewDoc); CategoryBag categoryBag = new CategoryBag(); if (targetNamespace!=null) { KeyedReference namespaceReference = WSDL2UDDI.newKeyedReference( "uddi:uddi.org:xml:namespace", "uddi-org:xml:namespace", targetNamespace); categoryBag.getKeyedReference().add(namespaceReference); } KeyedReference typesReference = WSDL2UDDI.newKeyedReference( "uddi:uddi.org:bpel:types", "uddi-org:bpel:types", "process"); categoryBag.getKeyedReference().add(typesReference); for (QName qName : portTypes.keySet()) { String portTypeKey = keyDomainURI + qName.getLocalPart(); KeyedReference portTypeReference = WSDL2UDDI.newKeyedReference( "uddi:uddi.org:wsdl:porttypereference", "uddi-org:wsdl:portTypeReference", portTypeKey); categoryBag.getKeyedReference().add(portTypeReference); } tModel.setCategoryBag(categoryBag); if (log.isDebugEnabled()) { log.debug(new PrintUDDI<TModel>().print(tModel)); } return tModel; } }
BPEL2UDDI extends AnnotationProcessor { public TModel createBPEL4WSProcessTModel(QName serviceName, String targetNamespace, Map<QName,PortType> portTypes, String bpelOverviewURL) { TModel tModel = new TModel(); tModel.setTModelKey(keyDomainURI + serviceName.getLocalPart() + "Process"); Name name = new Name(); name.setLang("en"); name.setValue(serviceName.getLocalPart()); tModel.setName(name); OverviewURL overviewURL = new OverviewURL(); overviewURL.setValue("http: OverviewDoc overviewDoc = new OverviewDoc(); overviewDoc.setOverviewURL(overviewURL); tModel.getOverviewDoc().add(overviewDoc); CategoryBag categoryBag = new CategoryBag(); if (targetNamespace!=null) { KeyedReference namespaceReference = WSDL2UDDI.newKeyedReference( "uddi:uddi.org:xml:namespace", "uddi-org:xml:namespace", targetNamespace); categoryBag.getKeyedReference().add(namespaceReference); } KeyedReference typesReference = WSDL2UDDI.newKeyedReference( "uddi:uddi.org:bpel:types", "uddi-org:bpel:types", "process"); categoryBag.getKeyedReference().add(typesReference); for (QName qName : portTypes.keySet()) { String portTypeKey = keyDomainURI + qName.getLocalPart(); KeyedReference portTypeReference = WSDL2UDDI.newKeyedReference( "uddi:uddi.org:wsdl:porttypereference", "uddi-org:wsdl:portTypeReference", portTypeKey); categoryBag.getKeyedReference().add(portTypeReference); } tModel.setCategoryBag(categoryBag); if (log.isDebugEnabled()) { log.debug(new PrintUDDI<TModel>().print(tModel)); } return tModel; } BPEL2UDDI(UDDIClerk clerk, URLLocalizer urlLocalizer, Properties properties); }
BPEL2UDDI extends AnnotationProcessor { public TModel createBPEL4WSProcessTModel(QName serviceName, String targetNamespace, Map<QName,PortType> portTypes, String bpelOverviewURL) { TModel tModel = new TModel(); tModel.setTModelKey(keyDomainURI + serviceName.getLocalPart() + "Process"); Name name = new Name(); name.setLang("en"); name.setValue(serviceName.getLocalPart()); tModel.setName(name); OverviewURL overviewURL = new OverviewURL(); overviewURL.setValue("http: OverviewDoc overviewDoc = new OverviewDoc(); overviewDoc.setOverviewURL(overviewURL); tModel.getOverviewDoc().add(overviewDoc); CategoryBag categoryBag = new CategoryBag(); if (targetNamespace!=null) { KeyedReference namespaceReference = WSDL2UDDI.newKeyedReference( "uddi:uddi.org:xml:namespace", "uddi-org:xml:namespace", targetNamespace); categoryBag.getKeyedReference().add(namespaceReference); } KeyedReference typesReference = WSDL2UDDI.newKeyedReference( "uddi:uddi.org:bpel:types", "uddi-org:bpel:types", "process"); categoryBag.getKeyedReference().add(typesReference); for (QName qName : portTypes.keySet()) { String portTypeKey = keyDomainURI + qName.getLocalPart(); KeyedReference portTypeReference = WSDL2UDDI.newKeyedReference( "uddi:uddi.org:wsdl:porttypereference", "uddi-org:wsdl:portTypeReference", portTypeKey); categoryBag.getKeyedReference().add(portTypeReference); } tModel.setCategoryBag(categoryBag); if (log.isDebugEnabled()) { log.debug(new PrintUDDI<TModel>().print(tModel)); } return tModel; } BPEL2UDDI(UDDIClerk clerk, URLLocalizer urlLocalizer, Properties properties); String getKeyDomainURI(); void setKeyDomainURI(String keyDomainURI); UDDIClerk getClerk(); void setClerk(UDDIClerk clerk); String getLang(); void setLang(String lang); URLLocalizer getUrlLocalizer(); void setUrlLocalizer(URLLocalizer urlLocalizer); @SuppressWarnings("unchecked") BindingTemplate register(QName serviceName, String portName, URL serviceUrl, Definition wsdlDefinition); String unRegister(QName serviceName, String portName, URL serviceUrl); BusinessService lookupService(String serviceKey); BusinessService createBusinessService(QName serviceName, Definition wsdlDefinition); Set<TModel> createWSDLPortTypeTModels(String wsdlURL, Map<QName,PortType> portTypes); Set<TModel> createWSDLBindingTModels(String wsdlURL, Map<QName,Binding> bindings); TModel createBPEL4WSProcessTModel(QName serviceName, String targetNamespace, Map<QName,PortType> portTypes, String bpelOverviewURL); BindingTemplate createBPELBinding(QName serviceName, String portName, URL serviceUrl, Definition wsdlDefinition); FindTModel createFindTModelForProcessName(QName serviceName); FindTModel createFindProcessesForPortTypes(String portTypeKey); GetTModelDetail createFindAllPortTypesForProcess_1(String processKey); GetTModelDetail createFindAllPortTypesForProcess_2(List<String> portTypeTModelKeys); FindBinding createFindImplementationsForProcess(String processKey); }
BPEL2UDDI extends AnnotationProcessor { public TModel createBPEL4WSProcessTModel(QName serviceName, String targetNamespace, Map<QName,PortType> portTypes, String bpelOverviewURL) { TModel tModel = new TModel(); tModel.setTModelKey(keyDomainURI + serviceName.getLocalPart() + "Process"); Name name = new Name(); name.setLang("en"); name.setValue(serviceName.getLocalPart()); tModel.setName(name); OverviewURL overviewURL = new OverviewURL(); overviewURL.setValue("http: OverviewDoc overviewDoc = new OverviewDoc(); overviewDoc.setOverviewURL(overviewURL); tModel.getOverviewDoc().add(overviewDoc); CategoryBag categoryBag = new CategoryBag(); if (targetNamespace!=null) { KeyedReference namespaceReference = WSDL2UDDI.newKeyedReference( "uddi:uddi.org:xml:namespace", "uddi-org:xml:namespace", targetNamespace); categoryBag.getKeyedReference().add(namespaceReference); } KeyedReference typesReference = WSDL2UDDI.newKeyedReference( "uddi:uddi.org:bpel:types", "uddi-org:bpel:types", "process"); categoryBag.getKeyedReference().add(typesReference); for (QName qName : portTypes.keySet()) { String portTypeKey = keyDomainURI + qName.getLocalPart(); KeyedReference portTypeReference = WSDL2UDDI.newKeyedReference( "uddi:uddi.org:wsdl:porttypereference", "uddi-org:wsdl:portTypeReference", portTypeKey); categoryBag.getKeyedReference().add(portTypeReference); } tModel.setCategoryBag(categoryBag); if (log.isDebugEnabled()) { log.debug(new PrintUDDI<TModel>().print(tModel)); } return tModel; } BPEL2UDDI(UDDIClerk clerk, URLLocalizer urlLocalizer, Properties properties); String getKeyDomainURI(); void setKeyDomainURI(String keyDomainURI); UDDIClerk getClerk(); void setClerk(UDDIClerk clerk); String getLang(); void setLang(String lang); URLLocalizer getUrlLocalizer(); void setUrlLocalizer(URLLocalizer urlLocalizer); @SuppressWarnings("unchecked") BindingTemplate register(QName serviceName, String portName, URL serviceUrl, Definition wsdlDefinition); String unRegister(QName serviceName, String portName, URL serviceUrl); BusinessService lookupService(String serviceKey); BusinessService createBusinessService(QName serviceName, Definition wsdlDefinition); Set<TModel> createWSDLPortTypeTModels(String wsdlURL, Map<QName,PortType> portTypes); Set<TModel> createWSDLBindingTModels(String wsdlURL, Map<QName,Binding> bindings); TModel createBPEL4WSProcessTModel(QName serviceName, String targetNamespace, Map<QName,PortType> portTypes, String bpelOverviewURL); BindingTemplate createBPELBinding(QName serviceName, String portName, URL serviceUrl, Definition wsdlDefinition); FindTModel createFindTModelForProcessName(QName serviceName); FindTModel createFindProcessesForPortTypes(String portTypeKey); GetTModelDetail createFindAllPortTypesForProcess_1(String processKey); GetTModelDetail createFindAllPortTypesForProcess_2(List<String> portTypeTModelKeys); FindBinding createFindImplementationsForProcess(String processKey);  }