Esempio n. 1
0
 /** Adjusts the web services WSDL entries corresponding to where they actually reside. */
 protected void fixupWSDLEntries()
     throws URISyntaxException, MalformedURLException, IOException, AnnotationProcessorException {
   ApplicationClientDescriptor ac = getAppClient();
   URI uri = (new File(getAppClientRoot(appClientArchive, ac))).toURI();
   File moduleFile = new File(uri);
   for (Iterator itr = ac.getServiceReferenceDescriptors().iterator(); itr.hasNext(); ) {
     ServiceReferenceDescriptor serviceRef = (ServiceReferenceDescriptor) itr.next();
     if (serviceRef.getWsdlFileUri() != null) {
       // In case WebServiceRef does not specify wsdlLocation, we get
       // wsdlLocation from @WebClient in wsimport generated source;
       // If wsimport was given a local WSDL file, then WsdlURI will
       // be an absolute path - in that case it should not be prefixed
       // with modileFileDir
       String wsdlURI = serviceRef.getWsdlFileUri();
       File wsdlFile = new File(wsdlURI);
       if (wsdlFile.isAbsolute()) {
         serviceRef.setWsdlFileUrl(wsdlFile.toURI().toURL());
       } else {
         // This is the case where WsdlFileUri is a relative path
         // (hence relative to the root of this module or wsimport
         // was executed with WSDL in HTTP URL form
         serviceRef.setWsdlFileUrl(getEntryAsUrl(moduleFile, serviceRef.getWsdlFileUri()));
       }
     }
   }
 }
Esempio n. 2
0
 /** @return the descriptor instance to associate with this XMLNode */
 @Override
 public JavaWebStartAccessDescriptor getDescriptor() {
   if (descriptor == null) {
     descriptor = new JavaWebStartAccessDescriptor();
     XMLNode parentNode = getParentNode();
     if (parentNode != null && (parentNode instanceof AppClientRuntimeNode)) {
       Object parentDescriptor = parentNode.getDescriptor();
       if (parentDescriptor != null && (parentDescriptor instanceof ApplicationClientDescriptor)) {
         ApplicationClientDescriptor acDescriptor = (ApplicationClientDescriptor) parentDescriptor;
         acDescriptor.setJavaWebStartAccessDescriptor(descriptor);
       }
     }
   }
   return descriptor;
 }
Esempio n. 3
0
  protected boolean mainClassContainsPURefcAnnotations(ApplicationClientDescriptor acDescr)
      throws MalformedURLException, ClassNotFoundException, IOException, URISyntaxException {
    AnnotationDetector annoDetector =
        new AnnotationDetector(new AppClientPersistenceDependencyAnnotationScanner());

    // e.g. FROM a.b.Foo or Foo TO a/b/Foo.class or Foo.class
    String mainClassEntryName = acDescr.getMainClassName().replace('.', '/') + ".class";

    return classContainsAnnotation(mainClassEntryName, annoDetector, appClientArchive, acDescr);
  }