/** * Find all processes that use the given portType. * * @param portTypeKey * @return tmodel info */ 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; } /**
/** * Builds a finder to find the binding tModels for a portType. * * @param portType * @param namespace * @return tModel info */ public static FindTModel createFindBindingTModelForPortType(String portType, String namespace) { FindTModel findTModel = new FindTModel(); CategoryBag categoryBag = new CategoryBag(); if (namespace != null && namespace.length() != 0) { KeyedReference namespaceReference = newKeyedReference( "uddi:uddi.org:xml:namespace", "uddi-org:xml:namespace", namespace); categoryBag.getKeyedReference().add(namespaceReference); } KeyedReference bindingReference = newKeyedReference( "uddi:uddi.org:wsdl:types", "uddi-org:wsdl:types", "binding"); categoryBag.getKeyedReference().add(bindingReference); KeyedReference portTypeReference = newKeyedReference( "uddi:uddi.org:wsdl:porttypereference", "uddi-org:wsdl:portTypeReference", portType); categoryBag.getKeyedReference().add(portTypeReference); findTModel.setCategoryBag(categoryBag); if (log.isDebugEnabled()) { log.debug(new PrintUDDI<FindTModel>().print(findTModel)); } return findTModel; }
"uddi:uddi.org:bpel:types", "uddi-org:bpel:types", "process"); categoryBag.getKeyedReference().add(typesReference); findTModel.setCategoryBag(categoryBag);
/** * Builds a finder to find the portType tModels for a portType. * * @param portTypeName * @param namespace * @return tModel info */ public static FindTModel createFindPortTypeTModelForPortType(String portTypeName, String namespace) { FindTModel findTModel = new FindTModel(); Name name = new Name(); name.setLang("en"); name.setValue(portTypeName); findTModel.setName(name); CategoryBag categoryBag = new CategoryBag(); if (namespace != null && namespace.length() != 0) { KeyedReference namespaceReference = newKeyedReference( "uddi:uddi.org:xml:namespace", "uddi-org:xml:namespace", namespace); categoryBag.getKeyedReference().add(namespaceReference); } KeyedReference bindingReference = newKeyedReference( "uddi:uddi.org:wsdl:types", "uddi-org:wsdl:types", "portType"); categoryBag.getKeyedReference().add(bindingReference); findTModel.setCategoryBag(categoryBag); if (log.isDebugEnabled()) { log.debug(new PrintUDDI<FindTModel>().print(findTModel)); } return findTModel; }
FindTModel ftm = new FindTModel(); ftm.setAuthInfo(authInfoSam); ftm.setCategoryBag(new CategoryBag()); ftm.getCategoryBag().getKeyedReference().add(new KeyedReference("uddi:uddi.org:categorization:types", "uddi-org:types:findQualifier", "findQualifier")); TModelList findTModel = inquiry.findTModel(ftm);
request.setCategoryBag(categoryBag);
public static FindTModel MapFindTModel(org.uddi.api_v2.FindTModel body) { if (body == null) { return null; } FindTModel r = new FindTModel(); r.setCategoryBag(MapCategoryBag(body.getCategoryBag())); r.setFindQualifiers(MapFindQualifiers(body.getFindQualifiers(),false)); r.setMaxRows(body.getMaxRows()); if (body.getName() != null) { r.setName(new Name(body.getName().getValue(), body.getName().getLang())); } if (ContainsWildCardSingle(r.getName())) { r.setFindQualifiers(AddApproximateMatch(r.getFindQualifiers())); } return r; }