Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Java
Expertise: Beginner
Nov 8, 2004

Create a Taxonomy in UDDI Using UDDI4J

This code demonstrates how to create a tModel taxonomy in UDDI for WSDL specifications using UDDI4J.

import org.uddi4j.datatype.tmodel.TModel;
import org.uddi4j.response.AuthToken;
import org.uddi4j.datatype.OverviewDoc;
import org.uddi4j.util.KeyedReference;
import org.uddi4j.util.CategoryBag;
import java.util.Vector;
import org.uddi4j.response.TModelDetail;
import org.uddi4j.client.UDDIProxy;
private String createTaxonomy() {
           try{
               TModel tModel = new TModel ();
               tModel.setTModelKey ("");
               tModel.setName ("COMPANYTAXONOMY");
               OverviewDoc overviewDoc = new OverviewDoc ();
               overviewDoc.setOverviewURL ("http://overviewurl");
               tModel.setOverviewDoc(overviewDoc);
               CategoryBag categoryBag= new CategoryBag();
               KeyedReference keyedReference = new KeyedReference();
               keyedReference.setKeyName("uddi-org:types");
               keyedReference.setKeyValue("wsdlSpec");
               keyedReference.setTModelKey(TModel.TYPES_TMODEL_KEY );
               Vector keyedReferenceVector = new Vector();
               keyedReferenceVector.add(keyedReference);
               categoryBag.setKeyedReferenceVector(keyedReferenceVector);
               tModel.setCategoryBag(categoryBag);
               Vector tModelVector = new Vector();
               tModelVector.add(tModel);
               UDDIProxy uddiProxy = createUDDIProxy();
  	      AuthToken token = uddiProxy.get_authToken(USER,PASSWORD);
              TModelDetail tModelDetail = uddiProxy.save_tModel(token.getAuthInfoString(), tModelVector);
                 }catch(Exception e){//Unable to register taxonomy
           }
}
Sujata De
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date