|
Lines 106-114
Link Here
|
| 106 |
MetadataDescriptor rmd = _metadatas[i]; |
106 |
MetadataDescriptor rmd = _metadatas[i]; |
| 107 |
createRMDFile(rmd, wsdl, wsdldir); |
107 |
createRMDFile(rmd, wsdl, wsdldir); |
| 108 |
createWSDLFile(wsdl, wsdldir); |
108 |
createWSDLFile(wsdl, wsdldir); |
| 109 |
createRouterEntries(routerEntriesDir, WsdlUtils.getServiceName(wsdl.getDocumentElement()), capabilities); |
109 |
if(_instances == null) { |
|
|
110 |
createRouterEntries(routerEntriesDir, WsdlUtils.getServiceName(wsdl.getDocumentElement()), _capabilitiesList[i]); |
| 111 |
} |
| 110 |
updateServicesDescriptor(servicesHelper, wsdl, capabilities); |
112 |
updateServicesDescriptor(servicesHelper, wsdl, capabilities); |
| 111 |
} |
113 |
} |
|
|
114 |
|
| 115 |
if(_instances != null) { |
| 116 |
createRouterEntries(routerEntriesDir, _instances); |
| 117 |
} |
| 112 |
recordProgress(_progressMonitor, 4); |
118 |
recordProgress(_progressMonitor, 4); |
| 113 |
|
119 |
|
| 114 |
File servicesFile = new File(webContentDir, Axis2ProjectizerConstants.SERVICES_FILE); |
120 |
File servicesFile = new File(webContentDir, Axis2ProjectizerConstants.SERVICES_FILE); |
|
Lines 157-184
Link Here
|
| 157 |
return helper; |
163 |
return helper; |
| 158 |
} |
164 |
} |
| 159 |
|
165 |
|
| 160 |
protected void createRouterEntries(File routerEntriesDir, String serviceName, Map capabilitiesMap) throws Exception { |
166 |
protected void createRouterEntries(File routerEntriesDir,Object[][] instances) throws Exception { |
| 161 |
if(_instances == null) { |
167 |
routerEntriesDir.mkdirs(); |
| 162 |
super.createRouterEntries(routerEntriesDir, serviceName, capabilitiesMap); |
168 |
|
| 163 |
} else { |
169 |
for (int i = 0; i < _instances.length; i++) { |
| 164 |
for(int i=0; i < _instances.length; i++) { |
170 |
Object[] instancePair = _instances[i]; |
| 165 |
Object[] instancePair = _instances[i]; |
171 |
|
| 166 |
|
172 |
// |
| 167 |
// |
173 |
// This is really tacky, but it's the only real way to do this |
| 168 |
//This is really tacky, but it's the only real way to do this |
174 |
// since there are no pairs. The File use is to get the last element |
| 169 |
// since there are no pairs. The File use is to get the last element |
175 |
// of the path in a nice, non-hack way. |
| 170 |
// of the path in a nice, non-hack way. |
176 |
// |
| 171 |
// |
177 |
String path = (String) instancePair[0]; |
| 172 |
String path = (String) instancePair[0]; |
178 |
String resourcePathName = new File(path).getName(); |
| 173 |
String resourcePathName = new File(path).getName(); |
179 |
|
| 174 |
|
180 |
Element instanceElement = (Element) instancePair[1]; |
| 175 |
Element instanceElement = (Element) instancePair[1]; |
181 |
|
| 176 |
|
182 |
File serviceDir = new File(routerEntriesDir, resourcePathName); |
| 177 |
File serviceDir = new File(routerEntriesDir, resourcePathName); |
183 |
File routerEntryFile = new File(serviceDir, getResourceFileName()); |
| 178 |
File routerEntryFile = new File(serviceDir, getResourceFileName()); |
184 |
|
| 179 |
|
185 |
writeToFileCheck(instanceElement, routerEntryFile); |
| 180 |
writeToFileCheck(instanceElement, routerEntryFile); |
|
|
| 181 |
} |
| 182 |
} |
186 |
} |
| 183 |
} |
187 |
} |
| 184 |
|
188 |
|
|
Lines 225-237
Link Here
|
| 225 |
|
229 |
|
| 226 |
File libDestination = new File(webContentDestination, "lib"); |
230 |
File libDestination = new File(webContentDestination, "lib"); |
| 227 |
|
231 |
|
| 228 |
|
232 |
if(_additionalJars != null) { |
| 229 |
for (int i=0; i < _additionalJars.length; i++) { |
233 |
for (int i=0; i < _additionalJars.length; i++) { |
| 230 |
if(!_additionalJars[i].exists()) { |
234 |
if(!_additionalJars[i].exists()) { |
| 231 |
throw new FileNotFoundException(_additionalJars[i].getAbsolutePath()); |
235 |
throw new FileNotFoundException(_additionalJars[i].getAbsolutePath()); |
|
|
236 |
} |
| 237 |
|
| 238 |
FileUtils.copyFile(_additionalJars[i], libDestination); |
| 232 |
} |
239 |
} |
| 233 |
|
|
|
| 234 |
FileUtils.copyFile(_additionalJars[i], libDestination); |
| 235 |
} |
240 |
} |
| 236 |
|
241 |
|
| 237 |
for (int i=0; i < _filesToCopy.length; i++) { |
242 |
for (int i=0; i < _filesToCopy.length; i++) { |