background image

WSDL document

<< Publishing an Organization | response.getExceptions() Method >>
<< Publishing an Organization | response.getExceptions() Method >>
M
ANAGING
R
EGISTRY
D
ATA
191
ent with JAX-WS (page xvi). First, you call the
createConcept
method to cre-
ate a concept named
HelloConcept
. After setting the description of the concept,
you create an external link to the URL of the
Hello
service's WSDL document,
and then add the external link to the concept.
Concept specConcept =
blcm.createConcept(null, "HelloConcept", "");
InternationalString s =
blcm.createInternationalString(
"Concept for Hello Service");
specConcept.setDescription(s);
ExternalLink wsdlLink =
blcm.createExternalLink(
"http://localhost:8080/hello-jaxws/hello?WSDL",
"Hello WSDL document");
specConcept.addExternalLink(wsdlLink);
Next, you classify the
Concept
object as a WSDL document. To do this for a
UDDI registry, you search the registry for the well-known classification scheme
uddi-org:types
, using its key ID. (The UDDI term for a classification scheme
is tModel.) Then you create a classification using the name and value
wsdlSpec
.
Finally, you add the classification to the concept.
String uuid_types =
"uuid:c1acf26d-9672-4404-9d70-39b756e62ab4";
ClassificationScheme uddiOrgTypes =
(ClassificationScheme) bqm.getRegistryObject(uuid_types,
LifeCycleManager.CLASSIFICATION_SCHEME);
Classification wsdlSpecClassification =
blcm.createClassification(uddiOrgTypes,
"wsdlSpec", "wsdlSpec");
specConcept.addClassification(wsdlSpecClassification);
Finally, you save the concept using the
saveConcepts
method, similarly to the
way you save an organization:
Collection<Concept> concepts = new ArrayList<Concept>();
concepts.add(specConcept);
BulkResponse concResponse = blcm.saveConcepts(concepts);
After you have published the concept, you normally add the concept for the
WSDL document to a service binding. To do this, you can retrieve the key for the