Package org.apache.ws.scout.model.uddi.v2

Examples of org.apache.ws.scout.model.uddi.v2.BusinessServices


        sb.setAuthInfo(authInfoJoe);
        BusinessEntity be = new BusinessEntity();
        Name n = new Name();
        n.setValue("A Test business");
        be.getName().add(n);
        be.setBusinessServices(new BusinessServices());
        BusinessService bs = new BusinessService();

        n = new Name();
        n.setValue(str255);
        bs.getName().add(n);
View Full Code Here


        sb.setAuthInfo(authInfoJoe);
        BusinessEntity be = new BusinessEntity();
        Name n = new Name();
        n.setValue("A Test business");
        be.getName().add(n);
        be.setBusinessServices(new BusinessServices());
        BusinessService bs = new BusinessService();

        n = new Name();
        n.setValue(str255);
        bs.getName().add(n);
View Full Code Here

        sb.setAuthInfo(authInfoJoe);
        BusinessEntity be = new BusinessEntity();
        Name n = new Name();
        n.setValue("A Test business");
        be.getName().add(n);
        be.setBusinessServices(new BusinessServices());
        BusinessService bs = new BusinessService();

        n = new Name();
        n.setValue(str255);
        bs.getName().add(n);
View Full Code Here

        private BusinessEntity SaveVSVCallbackService() throws Exception {
                SaveBusiness sb = new SaveBusiness();
                sb.setAuthInfo(authInfoJoe);
                BusinessEntity be = new BusinessEntity();
                be.getName().add(new Name("VSV business", null));
                be.setBusinessServices(new BusinessServices());
                BusinessService bs = new BusinessService();
                bs.getName().add(new Name("VSV callout", null));
                bs.setBindingTemplates(new BindingTemplates());
                BindingTemplate bt = new BindingTemplate();
                bt.setAccessPoint(new AccessPoint(url, "endPoint"));
View Full Code Here

     */
    private void Setup() {

        BusinessEntity be = new BusinessEntity();
        keygen = clerk.register(UDDIClerk.createKeyGenator(domain_prefix + "keygenerator", "my domain", lang)).getTModel().get(0);
        be.setBusinessServices(new BusinessServices());
        be.setBusinessKey(domain_prefix + "zerocoolbiz");
        be.getName().add(new Name("ZeroCool Business", lang));
        BusinessService bs = new BusinessService();
        bs.getName().add(new Name("ZeroCool Service", lang));
        bs.setBindingTemplates(new BindingTemplates());
View Full Code Here

                        BusinessEntity be = new BusinessEntity();
                        be.setBusinessKey(businessServices.getBusinessKey());
                        be.getName().add(new Name());
                        be.getName().get(0).setValue(domain);
                        be.getName().get(0).setLang("en");
                        be.setBusinessServices(new BusinessServices());
                        be.getBusinessServices().getBusinessService().add(businessServices);
                        SaveBusiness sb = new SaveBusiness();
                        sb.setAuthInfo(token);
                        sb.getBusinessEntity().add(be);
                        BusinessDetail saveBusiness = publish.saveBusiness(sb);
View Full Code Here

        SaveBusiness sb = new SaveBusiness();
        sb.setAuthInfo(authToken.getAuthInfo());
        BusinessEntity be = new BusinessEntity();
        be.setBusinessKey("uddi:testdomain:biz1");
        be.getName().add(new Name("test", "en"));
        be.setBusinessServices(new BusinessServices());
        BusinessService bs = new BusinessService();
        bs.setServiceKey("uddi:testdomain2:svc");
        bs.setBusinessKey("uddi:testdomain:biz1");
        bs.getName().add(new Name("svc", "en"));
        bs.setBindingTemplates(new BindingTemplates());
View Full Code Here

        c.setUseType("administrator");
        c.getPersonName().add(new PersonName("Mary Doe", "en"));
        c.getPersonName().add(new PersonName("Juan Doe", "es"));
        c.getDescription().add(new Description("This is the administrator of the service offerings.", "en"));
        be.getContacts().getContact().add(c);
        be.setBusinessServices(new BusinessServices());
        BusinessService bs = new BusinessService();
        bs.setBusinessKey("uddi:uddi.marypublisher.com:marybusinessone");
        bs.setServiceKey("uddi:uddi.marypublisher.com:marybusinessoneservice");
        bs.getName().add(new Name("name!", "en"));
        bs.setBindingTemplates(new BindingTemplates());
View Full Code Here

                properties.put("businessName", domain);
                properties.put("serverName", domain);
                properties.put("serverPort", port);
                wsdlURL = wsdlDefinition.getDocumentBaseURI();
                WSDL2UDDI wsdl2UDDI = new WSDL2UDDI(null, new URLLocalizerDefaultImpl(), properties);
                BusinessServices businessServices = wsdl2UDDI.createBusinessServices(wsdlDefinition);
                @SuppressWarnings("unchecked")
                Map<QName, PortType> portTypes = (Map<QName, PortType>) wsdlDefinition.getAllPortTypes();
                Set<TModel> portTypeTModels = wsdl2UDDI.createWSDLPortTypeTModels(wsdlURL, portTypes);
                Map allBindings = wsdlDefinition.getAllBindings();
                Set<TModel> createWSDLBindingTModels = wsdl2UDDI.createWSDLBindingTModels(wsdlURL, allBindings);
        //When parsing a WSDL, there's really two things going on
                //1) convert a bunch of stuff (the portTypes) to tModels
                //2) convert the service definition to a BusinessService

                //Since the service depends on the tModel, we have to save the tModels first
                stm = new SaveTModel();
                stm.setAuthInfo(token);

                TModel[] tmodels = portTypeTModels.toArray(new TModel[0]);
                for (int i = 0; i < tmodels.length; i++) {
                        stm.getTModel().add(tmodels[i]);
                }

                tmodels = createWSDLBindingTModels.toArray(new TModel[0]);
                for (int i = 0; i < tmodels.length; i++) {
                        stm.getTModel().add(tmodels[i]);
                }

                //important, you'll need to save your new tModels first, or else saving the business/service may fail
                System.out.println(new PrintUDDI<SaveTModel>().print(stm));
                System.out.println("Saving " + stm.getTModel().size() + " tModels");
                publish.saveTModel(stm);
                System.out.println("Saved!");

                if (businessKey == null || businessKey.length() == 0) {
                        SaveBusiness sb = new SaveBusiness();
                        sb.setAuthInfo(token);
                        BusinessEntity be = new BusinessEntity();
                        be.setBusinessKey(businessServices.getBusinessService().get(0).getBusinessKey());
                        be.getName().add(new Name());
                        be.getName().get(0).setValue(domain);
                        be.getName().get(0).setLang("en");
                        sb.getBusinessEntity().add(be);
                        BusinessDetail saveBusiness = publish.saveBusiness(sb);
                        businessKey = saveBusiness.getBusinessEntity().get(0).getBusinessKey();
                        System.out.println("new business created key= " + businessKey);
                }

                //finaly, we're ready to save all of the services defined in the WSDL
                //again, we're creating a new business, if you have one already, look it up using the Inquiry getBusinessDetails
                SaveService ss = new SaveService();
                ss.setAuthInfo(token);
                for (int i = 0; i < businessServices.getBusinessService().size(); i++) {
                        businessServices.getBusinessService().get(i).setBusinessKey(businessKey);
                        ss.getBusinessService().add(businessServices.getBusinessService().get(i));

                }

                System.out.println("Here's our new service(s): " + new PrintUDDI<SaveService>().print(ss));
View Full Code Here

                c.setUseType("administrator");
                c.getPersonName().add(new PersonName("Mary Doe", "en"));
                c.getPersonName().add(new PersonName("Juan Doe", "es"));
                c.getDescription().add(new Description("This is the administrator of the service offerings.", "en"));
                be.getContacts().getContact().add(c);
                be.setBusinessServices(new BusinessServices());
                BusinessService bs = new BusinessService();
                bs.setBusinessKey("uddi:uddi.marypublisher.com:marybusinessone");
                bs.setServiceKey("uddi:uddi.marypublisher.com:marybusinessoneservice");
                bs.getName().add(new Name("name!", "en"));
                bs.setBindingTemplates(new BindingTemplates());
View Full Code Here

TOP

Related Classes of org.apache.ws.scout.model.uddi.v2.BusinessServices

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.