properties.put("keyDomain", domain);
properties.put("businessName", domain);
properties.put("serverName", url.getHost());
properties.put("serverPort", url.getPort());
//wsdlURL = wsdlDefinition.getDocumentBaseURI();
WADL2UDDI wadl2UDDI = new WADL2UDDI(null, new URLLocalizerDefaultImpl(), properties);
BusinessService businessServices = wadl2UDDI.createBusinessService(new QName(domain, domain), app);
Set<TModel> portTypeTModels = wadl2UDDI.createWADLPortTypeTModels(pathOrURL, app);
// Set<TModel> createWSDLBindingTModels = wadl2UDDI.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++) {
System.out.println(tmodelPrinter.print(tmodels[i]));
stm.getTModel().add(tmodels[i]);
}
tmodels = wadl2UDDI.createWADLTModels(pathOrURL, app).toArray(new TModel[0]);
for (int i = 0; i < tmodels.length; i++) {
System.out.println(tmodelPrinter.print(tmodels[i]));
stm.getTModel().add(tmodels[i]);
}
//important, you'll need to save your new tModels, or else saving the business/service may fail