Package org.uddi.api_v3

Examples of org.uddi.api_v3.CategoryBag


     * @param portTypeKey
     * @return
     */
    public FindTModel createFindProcessesForPortTypes(String portTypeKey) {
      FindTModel findTModel = new FindTModel();
      CategoryBag categoryBag = new CategoryBag();
     
      KeyedReference typesReference = WSDL2UDDI.newKeyedReference(
          "uddi:uddi.org:bpel:types", "uddi-org:bpel:types", "process");
      categoryBag.getKeyedReference().add(typesReference);
     
      KeyedReference portTypeReference = WSDL2UDDI.newKeyedReference(
          "uddi:uddi.org:wsdl:porttypereference", "uddi-org:wsdl:portTypeReference", portTypeKey);
      categoryBag.getKeyedReference().add(portTypeReference);
     
      findTModel.setCategoryBag(categoryBag);
     
      return findTModel;
    }
View Full Code Here


                }
                TModel tm = new TModel();
                tm.setName(new Name());
                tm.getName().setValue(DescriptiveName);
                tm.getName().setLang(DescriptiveNameLanguage);
                tm.setCategoryBag(new CategoryBag());
                KeyedReference kr = new KeyedReference();
                kr.setTModelKey(UDDIConstants.KEY_GENERATOR_TMODEL);
                kr.setKeyName(UDDIConstants.KEY_GENERATOR);
                kr.setKeyValue(UDDIConstants.KEY_GENERATOR_VALUE);
                tm.getCategoryBag().getKeyedReference().add(kr);
View Full Code Here

        KeyedReference keyRef2 = new KeyedReference();
        keyRef2.setTModelKey(TOM_PUBLISHER_TMODEL02_KEY);
        keyRef2.setKeyValue("value-x");

        CategoryBag cb = new CategoryBag();
        cb.getKeyedReference().add(keyRef1);
        cb.getKeyedReference().add(keyRef2);
        fb.setCategoryBag(cb);

        bl = inquiry.findBusiness(fb);
        if (bl.getBusinessInfos() == null) {
          Assert.fail("Should have found one entry on FindBusiness with TModelBag, "
View Full Code Here

                return r;
        }

        private static CategoryBag getCatbag() {
               
                CategoryBag c = new CategoryBag();
                c.getKeyedReference().add(new KeyedReference(domainprefix+"key", "name", "value"));
                return c;
        }
View Full Code Here

       
        KeyedReference keyRef3 = new KeyedReference();
        keyRef3.setTModelKey(TOM_PUBLISHER_TMODEL01_KEY);
        keyRef3.setKeyValue("value-y");

        CategoryBag cb = new CategoryBag();
        cb.getKeyedReference().add(keyRef1);
        cb.getKeyedReference().add(keyRef2);
        cb.getKeyedReference().add(keyRef3);
        fb.setCategoryBag(cb);

        bl = inquiry.findBusiness(fb);
        if (bl.getBusinessInfos() == null) {
          Assert.fail("Should have found one entry on FindBusiness with TModelBag, "
View Full Code Here

                        overviewURL.setValue(wsdlURL);
                        OverviewDoc overviewDoc = new OverviewDoc();
                        overviewDoc.setOverviewURL(overviewURL);
                        tModel.getOverviewDoc().add(overviewDoc);
                        // Set the categoryBag
                        CategoryBag categoryBag = new CategoryBag();

                        if (namespace != null && !"".equals(namespace)) {
                                // A keyedReference with a tModelKey of the WSDL Entity Type category system and a keyValue of "binding".
                                KeyedReference namespaceReference = newKeyedReference(
                                        "uddi:uddi.org:xml:namespace", "uddi-org:xml:namespace", namespace);
                                categoryBag.getKeyedReference().add(namespaceReference);
                        }

                        // A keyedReference with a tModelKey of the WSDL Entity Type category system and a keyValue of "binding".
                        KeyedReference typesReference = newKeyedReference(
                                "uddi:uddi.org:wsdl:types", "uddi-org:wsdl:types", "binding");
                        categoryBag.getKeyedReference().add(typesReference);

            // A keyedReference with a tModelKey of the WSDL portType Reference category system and a keyValue
                        // of the tModelKey that models the wsdl:portType to which the wsdl:binding relates.
                        Binding binding = bindings.get(qName);
                        String portTypeKey = keyDomainURI + binding.getPortType().getQName().getLocalPart();
                        KeyedReference namespaceReference = newKeyedReference(
                                "uddi:uddi.org:wsdl:porttypereference", "uddi-org:wsdl:portTypeReference",
                                portTypeKey);
                        categoryBag.getKeyedReference().add(namespaceReference);

            //  A keyedReference with a tModelKey of the UDDI Types category system and a keyValue of
                        // "wsdlSpec" for backward compatibility.
                        KeyedReference typesReferenceBackwardsCompatible = newKeyedReference(
                                "uddi:uddi.org:categorization:types", "uddi-org:types", "wsdlSpec");
                        categoryBag.getKeyedReference().add(typesReferenceBackwardsCompatible);

                        // One or two keyedReferences as required to capture the protocol
                        for (Object object : binding.getExtensibilityElements()) {
                                SOAPBinding sb = null;
                                SOAP12Binding sb12 = null;
                                HTTPBinding hb = null;

                                try {
                                        hb = (HTTPBinding) object;
                                } catch (Exception x) {
                                }
                                try {
                                        sb = (SOAPBinding) object;
                                } catch (Exception x) {
                                }
                                try {
                                        sb12 = (SOAP12Binding) object;
                                } catch (Exception x) {
                                }
                                if (sb != null) {
                    // If the wsdl:binding contains a soap:binding extensibility element from the
                                        // 'http://schemas.xmlsoap.org/wsdl/soap/' namespace then the categoryBag MUST
                                        //include a keyedReference with a tModelKey of the Protocol Categorization
                                        // category system and a keyValue of the tModelKey of the SOAP Protocol tModel.
                                        SOAPBinding soapBinding = sb;
                                        KeyedReference soapProtocol = newKeyedReference(
                                                "uddi:uddi.org:wsdl:categorization:protocol", "uddi-org:protocol:soap", "uddi:uddi.org:protocol:soap");
                                        categoryBag.getKeyedReference().add(soapProtocol);
                    // If the value of the transport attribute of the soap:binding element
                                        // is 'http://schemas.xmlsoap.org/soap/http' then the categoryBag MUST
                                        // include a keyedReference with a tModelKey of the Transport Categorization
                                        // category system and a keyValue of the tModelKey of the HTTP Transport tModel.
                                        if ("http://schemas.xmlsoap.org/soap/http".equals(soapBinding.getTransportURI())) {
                                                KeyedReference httpTransport = newKeyedReference(
                                                        "uddi:uddi.org:wsdl:categorization:transport", "uddi-org:http", "uddi:uddi.org:transport:http");
                                                categoryBag.getKeyedReference().add(httpTransport);
                                        } else if (soapBinding.getTransportURI() != null) {
                        // TODO If the value of the transport attribute is anything else,
                                                // then the bindingTemplate MUST include an additional keyedReference with a tModelKey
                                                // of the Transport Categorization category system and a keyValue of the tModelKey of
                                                // an appropriate transport tModel.
                                                log.warn("not implemented, binding transport is " + soapBinding.getTransportURI());
                                        }

                                } else if (hb != null) {

                    // If the wsdl:binding contains an http:binding extensibility element from the
                                        // http://schemas.xmlsoap.org/wsdl/http/ namespace then the categoryBag MUST
                                        // include a keyedReference with a tModelKey of the Protocol Categorization
                                        // category system and a keyValue of the tModelKey of the HTTP Protocol tModel.
                                        KeyedReference soapProtocol = newKeyedReference(
                                                "uddi:uddi.org:wsdl:categorization:protocol", "uddi-org:protocol:http", "uddi:uddi.org:protocol:http");
                                        categoryBag.getKeyedReference().add(soapProtocol);
                                } else if (sb12 != null) {
                    // If the wsdl:binding contains a soap:binding extensibility element from the
                                        // 'http://schemas.xmlsoap.org/wsdl/soap/' namespace then the categoryBag MUST
                                        //include a keyedReference with a tModelKey of the Protocol Categorization
                                        // category system and a keyValue of the tModelKey of the SOAP Protocol tModel.

                                        KeyedReference soapProtocol = newKeyedReference(
                                                "uddi:uddi.org:wsdl:categorization:protocol", "uddi-org:protocol:soap", "uddi:uddi.org:protocol:soap");
                                        categoryBag.getKeyedReference().add(soapProtocol);
                    // If the value of the transport attribute of the soap:binding element
                                        // is 'http://schemas.xmlsoap.org/soap/http' then the categoryBag MUST
                                        // include a keyedReference with a tModelKey of the Transport Categorization
                                        // category system and a keyValue of the tModelKey of the HTTP Transport tModel.
                                        if ("http://schemas.xmlsoap.org/soap/http".equals(sb12.getTransportURI())) {
                                                KeyedReference httpTransport = newKeyedReference(
                                                        "uddi:uddi.org:wsdl:categorization:transport", "uddi-org:http", "uddi:uddi.org:transport:http");
                                                categoryBag.getKeyedReference().add(httpTransport);
                                        } else if (sb12.getTransportURI() != null) {
                        // TODO If the value of the transport attribute is anything else,
                                                // then the bindingTemplate MUST include an additional keyedReference with a tModelKey
                                                // of the Transport Categorization category system and a keyValue of the tModelKey of
                                                // an appropriate transport tModel.
View Full Code Here

                sb.setAuthInfo(authInfoJoe);
                BusinessEntity be = new BusinessEntity();
                Name n = new Name();
                n.setValue("KeyReferenceMax A Test business");
                be.getName().add(n);
                be.setCategoryBag(new CategoryBag());
                KeyedReference kr = new KeyedReference();
                kr.setKeyName(str255);
                kr.setKeyValue(str255);
                kr.setTModelKey(str255);
                be.getCategoryBag().getKeyedReference().add(kr);
View Full Code Here

                sb.setAuthInfo(authInfoJoe);
                BusinessEntity be = new BusinessEntity();
                Name n = new Name();
                n.setValue("KeyReferenceKeyTooLong A Test business");
                be.getName().add(n);
                be.setCategoryBag(new CategoryBag());
                KeyedReference kr = new KeyedReference();
                kr.setKeyName(str255);
                kr.setKeyValue(str255);
                kr.setTModelKey(str256);
                be.getCategoryBag().getKeyedReference().add(kr);
View Full Code Here

                sb.setAuthInfo(authInfoJoe);
                BusinessEntity be = new BusinessEntity();
                Name n = new Name();
                n.setValue("KeyReferenceNameTooLong A Test business");
                be.getName().add(n);
                be.setCategoryBag(new CategoryBag());
                KeyedReference kr = new KeyedReference();
                kr.setKeyName(str256);
                kr.setKeyValue(str255);
                kr.setTModelKey(str255);
                be.getCategoryBag().getKeyedReference().add(kr);
View Full Code Here

                sb.setAuthInfo(authInfoJoe);
                BusinessEntity be = new BusinessEntity();
                Name n = new Name();
                n.setValue("KeyReferenceValueTooLong A Test business");
                be.getName().add(n);
                be.setCategoryBag(new CategoryBag());
                KeyedReference kr = new KeyedReference();
                kr.setKeyName(str255);
                kr.setKeyValue(str256);
                kr.setTModelKey(str255);
                be.getCategoryBag().getKeyedReference().add(kr);
View Full Code Here

TOP

Related Classes of org.uddi.api_v3.CategoryBag

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.