1 23 24 package com.sun.enterprise.webservice.codegen; 25 26 import com.sun.appserv.ClassLoaderUtil; 27 import java.net.URLClassLoader ; 28 import java.util.Vector ; 29 import java.util.Iterator ; 30 import java.util.Collection ; 31 import java.util.List ; 32 import java.io.*; 33 import java.net.URL ; 34 import java.util.logging.Logger ; 35 import java.util.logging.Level ; 36 37 import javax.enterprise.deploy.shared.ModuleType ; 38 39 import com.sun.enterprise.util.LocalStringManagerImpl; 40 41 import com.sun.ejb.codegen.EjbcContext; 42 import com.sun.ejb.codegen.GeneratorException; 43 44 import com.sun.enterprise.deployment.Application; 46 import com.sun.enterprise.deployment.backend.Deployer; 47 import com.sun.enterprise.deployment.backend.OptionalPkgDependency; 48 import com.sun.enterprise.deployment.deploy.shared.FileArchive; 49 import com.sun.enterprise.deployment.Descriptor; 50 import com.sun.enterprise.deployment.io.JaxrpcMappingDeploymentDescriptorFile; 51 import com.sun.enterprise.deployment.JaxrpcMappingDescriptor; 52 import com.sun.enterprise.deployment.JaxrpcMappingDescriptor.Mapping; 53 import com.sun.enterprise.deployment.ServiceReferenceDescriptor; 54 import com.sun.enterprise.deployment.ServiceRefPortInfo; 55 import com.sun.enterprise.deployment.util.ApplicationVisitor; 56 import com.sun.enterprise.deployment.util.DefaultDOLVisitor; 57 import com.sun.enterprise.deployment.util.ModuleContentLinker; 58 import com.sun.enterprise.deployment.util.WebServerInfo; 59 import com.sun.enterprise.deployment.WebService; 60 import com.sun.enterprise.deployment.WebServiceEndpoint; 61 import com.sun.enterprise.deployment.WebServicesDescriptor; 62 import com.sun.enterprise.loader.EJBClassLoader; 63 import com.sun.enterprise.loader.EJBClassPathUtils; 64 65 import com.sun.enterprise.deployment.backend.OptionalPkgDependency; 66 import com.sun.enterprise.deployment.backend.Deployer; 67 68 import javax.xml.namespace.QName ; 69 import javax.xml.rpc.Stub ; 70 71 import com.sun.enterprise.webservice.WsUtil; 73 import com.sun.enterprise.webservice.WsCompile; 74 75 import com.sun.xml.rpc.spi.JaxRpcObjectFactory; 77 import com.sun.xml.rpc.spi.tools.CompileTool; 78 import com.sun.xml.rpc.spi.tools.GeneratedFileInfo; 79 import com.sun.xml.rpc.spi.tools.GeneratorConstants; 80 import com.sun.xml.rpc.spi.tools.J2EEModelInfo; 81 import com.sun.xml.rpc.spi.tools.ModelFileModelInfo; 82 import com.sun.xml.rpc.spi.tools.ModelInfo; 83 import com.sun.xml.rpc.spi.tools.NamespaceMappingInfo; 84 import com.sun.xml.rpc.spi.tools.NamespaceMappingRegistryInfo; 85 import com.sun.xml.rpc.spi.tools.NoMetadataModelInfo; 86 87 93 public class JaxRpcRICodegen extends ModuleContentLinker 94 implements JaxRpcCodegenAdapter 95 { 96 97 protected EjbcContext context = null; 99 100 Vector files = new Vector (); 102 103 private JaxRpcObjectFactory rpcFactory; 104 105 private Logger logger = WsUtil.getDefaultLogger(); 106 107 private int wscompileInvocationCount = 0; 110 111 private static LocalStringManagerImpl localStrings = 113 new LocalStringManagerImpl(JaxRpcRICodegen.class); 114 115 private CompileTool wscompileForAccept = null; 116 private CompileTool wscompileForWebServices = null; 117 118 119 public JaxRpcRICodegen() { 120 rpcFactory = JaxRpcObjectFactory.newInstance(); 121 } 122 123 public void run(EjbcContext context) throws Exception { 124 rootLocation_ = new FileArchive(); 125 rootLocation_.open(context.getSrcDir().getAbsolutePath()); 126 this.context = context; 127 Application application = context.getDescriptor(); 128 application.visit((ApplicationVisitor) this); 129 } 130 131 134 public void accept(ServiceReferenceDescriptor serviceRef) { 135 boolean codegenRequired = false; 136 137 URL wsdlOverride = null; 138 boolean wsdlOverriden = false; 139 super.accept(serviceRef); 140 try { 141 for(Iterator ports = serviceRef.getPortsInfo().iterator(); ports.hasNext();) { 148 ServiceRefPortInfo portInfo = (ServiceRefPortInfo) ports.next(); 149 150 if( portInfo.isLinkedToPortComponent() ) { 151 WebServiceEndpoint linkedPortComponent = portInfo.getPortComponentLink(); 152 153 if (linkedPortComponent==null) { 154 throw new GeneratorException(localStrings.getLocalString( 155 "enterprise.webservice.componentlinkunresolved", 156 "The port-component-link {0} cannot be resolved", 157 new Object [] {portInfo.getPortComponentLinkName()})); 158 } 159 WsUtil wsUtil = new WsUtil(); 160 WebServerInfo wsi = wsUtil.getWebServerInfo(context.getDeploymentRequest()); 161 URL rootURL = wsi.getWebServerRootURL(linkedPortComponent.isSecure()); 162 URL actualAddress = linkedPortComponent.composeEndpointAddress(rootURL); 163 portInfo.addStubProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, actualAddress.toExternalForm()); 164 if (serviceRef.getBundleDescriptor().getModuleType().equals(ModuleType.CAR)) { 165 wsdlOverride = serviceRef.getWsdlOverride(); 166 if (wsdlOverride!=null) { 167 wsdlOverriden = true; 168 serviceRef.setWsdlOverride(linkedPortComponent.getWebService().getWsdlFileUrl()); 169 } 170 } 171 } 172 } 173 174 ClassLoader clr = serviceRef.getBundleDescriptor().getClassLoader(); 176 Class serviceInterface = clr.loadClass(serviceRef.getServiceInterface()); 177 if (javax.xml.ws.Service.class.isAssignableFrom(serviceInterface)) { 178 return; 179 } 180 181 if( serviceRef.hasGeneratedServiceInterface() ) { 182 183 if( serviceRef.hasWsdlFile() && serviceRef.hasMappingFile() ) { 184 codegenRequired = true; 185 } else { 186 throw new GeneratorException 187 ("Deployment error for service-ref " + serviceRef.getName() 188 + ".\nService references with generated service " + 189 "interface must include WSDL and mapping information."); 190 } 191 192 } else { 193 194 if( serviceRef.hasWsdlFile() ) { 195 if( serviceRef.hasMappingFile() ) { 196 codegenRequired = true; 197 } else { 198 throw new GeneratorException 199 ("Deployment error for service-ref " + serviceRef.getName() 200 + ".\nService references with wsdl must also have " + 201 "mapping information."); 202 } 203 } 204 } 205 206 if( codegenRequired ) { 207 ModelInfo modelInfo = createModelInfo(serviceRef); 208 String args[] = createJaxrpcCompileArgs(false); 209 210 CompileTool wscompile = 211 rpcFactory.createCompileTool(System.out, "wscompile"); 212 wscompileForAccept = wscompile; 213 WsCompile delegate = 214 new WsCompile(wscompile, serviceRef); 215 delegate.setModelInfo(modelInfo); 216 wscompile.setDelegate(delegate); 217 218 jaxrpc(args, delegate, serviceRef, files); 219 } 220 if (wsdlOverriden) { 221 serviceRef.setWsdlOverride(wsdlOverride); 222 } 223 } catch(Exception e) { 224 RuntimeException re = new RuntimeException (e.getMessage()); 225 re.initCause(e); 226 throw re; 227 } 228 } 229 230 234 public void accept(WebService webService) { 235 super.accept(webService); 236 try { 237 if("1.1".compareTo(webService.getWebServicesDescriptor().getSpecVersion())<0) { 238 WsUtil wsUtil = new WsUtil(); 239 Collection <WebServiceEndpoint> endpoints = webService.getEndpoints(); 240 for(WebServiceEndpoint ep : endpoints) { 241 if( ep.implementedByWebComponent() ) { 242 wsUtil.updateServletEndpointRuntime(ep); 243 } else { 244 wsUtil.validateEjbEndpoint(ep); 245 } 246 } 247 } else { 249 jaxrpcWebService(webService, files); 250 } 251 } catch(Exception e) { 252 RuntimeException ge =new RuntimeException (e.getMessage()); 253 ge.initCause(e); 254 throw ge; 255 } 256 } 257 258 public Iterator getListOfBinaryFiles() { 259 return files.iterator(); 260 } 261 262 public Iterator getListOfSourceFiles() { 263 return null; 265 } 266 267 270 public void done() { 271 } 279 280 285 private void done(CompileTool wscompile) { 286 290 if (wscompile != null && wscompile instanceof com.sun.xml.rpc.tools.wscompile.CompileTool) { 291 com.sun.xml.rpc.tools.wscompile.CompileTool compileTool = (com.sun.xml.rpc.tools.wscompile.CompileTool) wscompile; 292 com.sun.xml.rpc.spi.tools.ProcessorEnvironment env = compileTool.getEnvironment(); 293 if (env != null && env instanceof com.sun.xml.rpc.processor.util.ProcessorEnvironment) { 294 com.sun.xml.rpc.processor.util.ProcessorEnvironment typedEnv = (com.sun.xml.rpc.processor.util.ProcessorEnvironment) env; 295 java.net.URLClassLoader urlCL = typedEnv.getClassLoader(); 296 ClassLoaderUtil.releaseLoader(urlCL); 297 } 298 } 299 } 300 301 private JaxrpcMappingDescriptor getJaxrpcMappingInfo(URL mappingFileUrl, 302 Descriptor desc) 303 throws Exception { 304 JaxrpcMappingDescriptor mappingDesc = null; 305 306 InputStream is = null; 307 try { 308 is = mappingFileUrl.openStream(); 309 JaxrpcMappingDeploymentDescriptorFile jaxrpcDD = 310 new JaxrpcMappingDeploymentDescriptorFile(); 311 312 if (desc instanceof ServiceReferenceDescriptor) { 314 ServiceReferenceDescriptor srd = (ServiceReferenceDescriptor) desc; 315 jaxrpcDD.setDeploymentDescriptorPath(srd.getMappingFileUri()); 316 jaxrpcDD.setErrorReportingString(srd.getBundleDescriptor().getModuleDescriptor().getArchiveUri()); 317 } 318 if (desc instanceof WebService) { 319 WebService ws = (WebService) desc; 320 jaxrpcDD.setDeploymentDescriptorPath(ws.getMappingFileUri()); 321 jaxrpcDD.setErrorReportingString(ws.getBundleDescriptor().getModuleDescriptor().getArchiveUri()); 322 } 323 jaxrpcDD.setXMLValidationLevel(Deployer.getValidationLevel()); 324 mappingDesc = (JaxrpcMappingDescriptor) jaxrpcDD.read(desc, is); 325 } finally { 326 if( is != null ) { 327 is.close(); 328 } 329 } 330 331 return mappingDesc; 332 } 333 334 private boolean isJaxrpcRIModelFile(URL mappingFileUrl) { 335 boolean isModel = false; 336 InputStream is = null; 337 try { 338 is = mappingFileUrl.openStream(); 339 isModel = rpcFactory.createXMLModelFileFilter().isModelFile(is); 340 } catch(Throwable t) { 341 } finally { 342 if( is != null ) { 343 try { 344 is.close(); 345 } catch(Exception e) {} 346 } 347 } 348 return isModel; 349 } 350 351 private ModelInfo createModelInfo(WebService webService) 352 throws Exception { 353 354 ModelInfo modelInfo = null; 355 URL mappingFileUrl = webService.getMappingFile().toURL(); 356 modelInfo = createModelFileModelInfo(mappingFileUrl); 357 if( isJaxrpcRIModelFile(mappingFileUrl) ) { 358 debug("000. JaxrpcRIModelFile."); 359 modelInfo = createModelFileModelInfo(mappingFileUrl); 360 } else { 361 JaxrpcMappingDescriptor mappingDesc = 362 getJaxrpcMappingInfo(mappingFileUrl, webService); 363 if( mappingDesc.isSimpleMapping() ) { 364 debug("111. SimpleMapping."); 365 modelInfo = createNoMetadataModelInfo(webService, mappingDesc); 366 } else { 367 debug("222. FullMapping ."); 368 modelInfo = createFullMappingModelInfo(webService); 369 } 370 } 371 372 return modelInfo; 373 } 374 375 private ModelInfo createModelInfo(ServiceReferenceDescriptor serviceRef) 376 throws Exception { 377 378 ModelInfo modelInfo = null; 379 URL mappingFileUrl = serviceRef.getMappingFile().toURL(); 380 if( isJaxrpcRIModelFile(mappingFileUrl) ) { 381 modelInfo = createModelFileModelInfo(mappingFileUrl); 382 } else { 383 JaxrpcMappingDescriptor mappingDesc = 384 getJaxrpcMappingInfo(mappingFileUrl, serviceRef); 385 if( mappingDesc.isSimpleMapping() && 386 serviceRef.hasGeneratedServiceInterface() ) { 387 modelInfo = createNoMetadataModelInfo(serviceRef, mappingDesc); 390 } else { 391 modelInfo = createFullMappingModelInfo(serviceRef); 392 } 393 } 394 395 return modelInfo; 396 } 397 398 private ModelFileModelInfo createModelFileModelInfo(URL modelFileUrl) 399 throws Exception { 400 401 ModelFileModelInfo modelInfo = rpcFactory.createModelFileModelInfo(); 402 modelInfo.setLocation(modelFileUrl.toExternalForm()); 403 404 return modelInfo; 405 } 406 407 private J2EEModelInfo createFullMappingModelInfo(WebService webService) 408 throws Exception { 409 410 URL mappingFileUrl = webService.getMappingFile().toURL(); 411 URL wsdlFileUrl = webService.getWsdlFileUrl(); 412 413 return createFullMappingModelInfo(mappingFileUrl, wsdlFileUrl); 414 } 415 416 private J2EEModelInfo createFullMappingModelInfo 417 (ServiceReferenceDescriptor serviceRef) throws Exception { 418 419 URL mappingFileUrl = serviceRef.getMappingFile().toURL(); 420 URL wsdlFileUrl = serviceRef.hasWsdlOverride() ? 421 serviceRef.getWsdlOverride() : serviceRef.getWsdlFileUrl(); 422 return createFullMappingModelInfo(mappingFileUrl, wsdlFileUrl); 423 } 424 425 private J2EEModelInfo createFullMappingModelInfo 426 (URL mappingFile, URL wsdlFile) throws Exception { 427 428 J2EEModelInfo modelInfo = rpcFactory.createJ2EEModelInfo(mappingFile); 429 modelInfo.setLocation(wsdlFile.toExternalForm()); 430 modelInfo.setJavaPackageName("package_ignored"); 432 return modelInfo; 433 434 } 435 436 private NoMetadataModelInfo createNoMetadataModelInfo 437 (WebService webService, JaxrpcMappingDescriptor mappingDesc) 438 throws Exception { 439 440 NoMetadataModelInfo modelInfo = rpcFactory.createNoMetadataModelInfo(); 441 URL wsdlFileUrl = webService.getWsdlFileUrl(); 442 443 Collection endpoints = webService.getEndpoints(); 444 if( endpoints.size() != 1 ) { 445 throw new GeneratorException 446 ("Deployment code generation error for webservice " + 447 webService.getName() + ". " + 448 " jaxrpc-mapping-file is required if web service has " + 449 "multiple endpoints"); 450 } 451 452 WebServiceEndpoint endpoint = (WebServiceEndpoint) 453 endpoints.iterator().next(); 454 455 modelInfo.setLocation(wsdlFileUrl.toExternalForm()); 456 modelInfo.setInterfaceName(endpoint.getServiceEndpointInterface()); 457 modelInfo.setPortName(endpoint.getWsdlPort()); 458 459 addNamespaceMappingRegistry(modelInfo, mappingDesc); 460 461 return modelInfo; 462 } 463 464 private void addNamespaceMappingRegistry 465 (NoMetadataModelInfo modelInfo, JaxrpcMappingDescriptor mappingDesc) { 466 467 NamespaceMappingRegistryInfo namespaceRegistry = 468 rpcFactory.createNamespaceMappingRegistryInfo(); 469 470 modelInfo.setNamespaceMappingRegistry(namespaceRegistry); 471 472 Collection mappings = mappingDesc.getMappings(); 473 for(Iterator iter = mappings.iterator(); iter.hasNext();) { 474 Mapping next = (Mapping) iter.next(); 475 NamespaceMappingInfo namespaceInfo = 476 rpcFactory.createNamespaceMappingInfo(next.getNamespaceUri(), 477 next.getPackage()); 478 namespaceRegistry.addMapping(namespaceInfo); 479 } 480 } 481 482 private NoMetadataModelInfo createNoMetadataModelInfo 483 (ServiceReferenceDescriptor serviceRef, 484 JaxrpcMappingDescriptor mappingDesc) throws Exception { 485 486 NoMetadataModelInfo modelInfo = rpcFactory.createNoMetadataModelInfo(); 487 URL wsdlFile = serviceRef.hasWsdlOverride() ? 488 serviceRef.getWsdlOverride() : serviceRef.getWsdlFileUrl(); 489 modelInfo.setLocation(wsdlFile.toExternalForm()); 490 491 WsUtil wsUtil = new WsUtil(); 495 String serviceInterfaceName = serviceRef.getServiceInterface(); 496 497 ClassLoader cl = context.getDescriptor().getClassLoader(); 498 if (cl instanceof EJBClassLoader) { 499 List moduleList = EJBClassPathUtils.getApplicationClassPath((Application) context.getDescriptor(), context.getSrcDir().getAbsolutePath()); 500 for (Iterator itr=moduleList.iterator();itr.hasNext();) { 501 ((EJBClassLoader) cl).appendURL((new File((String ) itr.next()))); 502 } 503 } 504 505 Class serviceInterface = cl.loadClass(serviceInterfaceName); 506 Collection seis = wsUtil.getSEIsFromGeneratedService(serviceInterface); 507 508 if( seis.size() == 0 ) { 509 throw new GeneratorException("Invalid Generated Service Interface " 510 + serviceInterfaceName + " . "); 511 } else if( seis.size() > 1 ) { 512 throw new GeneratorException("Deployment error : If no " + 513 "jaxrpc-mapping file is provided, " + 514 "Generated Service Interface must have" 515 +" only 1 Service Endpoint Interface"); 516 } 517 518 String serviceEndpointInterface = (String ) seis.iterator().next(); 519 modelInfo.setInterfaceName(serviceEndpointInterface); 520 521 addNamespaceMappingRegistry(modelInfo, mappingDesc); 522 523 return modelInfo; 524 } 525 526 private boolean keepJaxrpcGeneratedFile(String fileType, Descriptor desc) { 527 boolean keep = true; 528 if( (fileType.equals(GeneratorConstants.FILE_TYPE_WSDL) || 529 fileType.equals(GeneratorConstants.FILE_TYPE_REMOTE_INTERFACE)) ) { 530 keep = false; 531 } else if( fileType.equals(GeneratorConstants.FILE_TYPE_SERVICE ) ) { 532 keep = (desc instanceof ServiceReferenceDescriptor) && 537 ((ServiceReferenceDescriptor)desc).hasGenericServiceInterface(); 538 } 539 540 return keep; 541 } 542 543 File dummyConfigFile=null; 545 546 private String [] createJaxrpcCompileArgs(boolean generateTies) 547 throws IOException 548 { 549 int numJaxrpcArgs = 0; 550 if (logger.isLoggable(Level.FINE) ) { 551 numJaxrpcArgs = 16; 552 } else { 553 numJaxrpcArgs = 11; 554 } 555 556 wscompileInvocationCount++; 562 String infix = null; 563 564 if( wscompileInvocationCount > 1 ) { 565 numJaxrpcArgs++; 566 infix = wscompileInvocationCount + ""; 567 } 568 569 String [] jaxrpcArgs = new String [numJaxrpcArgs]; 570 int jaxrpcCnt = 0; 571 572 if( dummyConfigFile == null ) { 573 dummyConfigFile = File.createTempFile("dummy_wscompile_config", 574 "config"); 575 dummyConfigFile.deleteOnExit(); 576 } 577 578 String classPath=null; 579 String [] urls = context.getClasspathUrls(); 580 581 Application app = (Application) context.getDescriptor(); 583 List moduleList = EJBClassPathUtils.getApplicationClassPath(app, context.getSrcDir().getAbsolutePath()); 584 585 moduleList.addAll(java.util.Arrays.asList(urls)); 586 for (int i=0;i<moduleList.size();i++) { 587 if (classPath==null) { 588 classPath = (String ) moduleList.get(i); 589 } else { 590 classPath = classPath + File.pathSeparatorChar + (String ) moduleList.get(i); 591 } 592 } 593 594 String optionalDependencyClassPath = 597 OptionalPkgDependency.getExtDirFilesAsClasspath(); 598 if(optionalDependencyClassPath.length() > 0) { 599 classPath = optionalDependencyClassPath + 600 File.pathSeparatorChar + classPath; 601 } 602 603 jaxrpcArgs[jaxrpcCnt++] = generateTies ? "-gen:server" : "-gen:client"; 604 605 jaxrpcArgs[jaxrpcCnt++] = "-f:donotoverride"; 608 609 if( infix != null ) { 610 jaxrpcArgs[jaxrpcCnt++] = "-f:infix:" + infix; 611 } 612 613 jaxrpcArgs[jaxrpcCnt++] = "-classpath"; 614 jaxrpcArgs[jaxrpcCnt++] = classPath; 615 616 if (logger.isLoggable(Level.FINE)) { 617 long timeStamp = System.currentTimeMillis(); 618 jaxrpcArgs[jaxrpcCnt++] = "-Xdebugmodel:" + 619 context.getStubsDir() + File.separator + "debugModel.txt." + 620 timeStamp; 621 jaxrpcArgs[jaxrpcCnt++] = "-Xprintstacktrace"; 622 jaxrpcArgs[jaxrpcCnt++] = "-model"; 623 jaxrpcArgs[jaxrpcCnt++] = 624 context.getStubsDir() + File.separator + "debugModel.model" + 625 timeStamp; 626 jaxrpcArgs[jaxrpcCnt++] = "-verbose"; 627 } 628 629 jaxrpcArgs[jaxrpcCnt++] = "-s"; 630 jaxrpcArgs[jaxrpcCnt++] = context.getStubsDir().toString(); 631 jaxrpcArgs[jaxrpcCnt++] = "-d"; 632 jaxrpcArgs[jaxrpcCnt++] = context.getStubsDir().toString(); 633 jaxrpcArgs[jaxrpcCnt++] = "-keep"; 634 jaxrpcArgs[jaxrpcCnt++] = "-g"; 635 636 jaxrpcArgs[jaxrpcCnt++] = dummyConfigFile.getPath(); 639 640 if ( logger.isLoggable(Level.FINE)) { 641 for ( int i = 0; i < jaxrpcArgs.length; i++ ) { 642 logger.fine(jaxrpcArgs[i]); 643 } 644 } 645 646 return jaxrpcArgs; 647 } 648 649 private void jaxrpc(String [] args, WsCompile wsCompile, Descriptor desc, 650 Vector files) 651 throws Exception { 652 653 try { 654 if (logger.isLoggable(Level.FINE)) { 655 debug("---> ARGS = "); 656 for (int i = 0; i < args.length; i++) { 657 System.err.print(args[i] + "; "); 658 } 659 } 660 boolean compiled = wsCompile.getCompileTool().run(args); 661 done(wsCompile.getCompileTool()); 662 if( compiled ) { 663 Iterator generatedFiles = 664 wsCompile.getGeneratedFiles().iterator(); 665 666 while(generatedFiles.hasNext()) { 667 GeneratedFileInfo next = (GeneratedFileInfo) 668 generatedFiles.next(); 669 String fileType = next.getType(); 670 File file = next.getFile(); 671 String origPath = file.getPath(); 672 if( origPath.endsWith(".java") ) { 673 int javaIndex = origPath.lastIndexOf(".java"); 674 String newPath = origPath.substring(0, javaIndex) + 675 ".class"; 676 if( keepJaxrpcGeneratedFile(fileType, desc) ) { 677 files.add(newPath); 678 } 679 } 680 } 681 } else { 682 throw new GeneratorException("jaxrpc compilation exception"); 683 } 684 } catch (Throwable t) { 685 GeneratorException ge = 686 new GeneratorException(t.getMessage()); 687 ge.initCause(t); 688 throw ge; 689 } 690 } 691 692 private void jaxrpcWebService(WebService webService, Vector files) 693 throws Exception { 694 695 ModelInfo modelInfo = createModelInfo(webService); 696 String args[] = createJaxrpcCompileArgs(true); 697 698 CompileTool wscompile = 699 rpcFactory.createCompileTool(System.out, "wscompile"); 700 wscompileForWebServices = wscompile; 701 WsCompile delegate = new WsCompile(wscompile, webService); 702 delegate.setModelInfo(modelInfo); 703 wscompile.setDelegate(delegate); 704 705 jaxrpc(args, delegate, webService, files); 706 } 707 708 private void debug(String msg) { 709 if (logger.isLoggable(Level.FINE) ) { 710 System.out.println("[JaxRpcRICodegen] --> " + msg); 711 } 712 } 713 714 } 715 | Popular Tags |