Examples of WSDLReference


Examples of org.eclipse.wst.wsi.internal.core.analyzer.config.WSDLReference

        DocumentFactory documentFactory = DocumentFactory.newInstance();
        // Initialize the BasicProfileAnalyzer using an analyzerconfig object
        AnalyzerConfig analyzerconfig = documentFactory.newAnalyzerConfig();
        if(wsdlspecified)
        {
          WSDLReference wsdlref = new WSDLReferenceImpl();
          wsdlref.setWSDLLocation(wsdlfile);
       
          WSDLElement wsdlelem = new WSDLElementImpl();
          wsdlelem.setName(elementname);
          wsdlelem.setNamespace(namespace);
          wsdlelem.setParentElementName(parentname);
          wsdlelem.setType(type);
       
          wsdlref.setWSDLElement(wsdlelem);
       
          analyzerconfig.setWSDLReference(wsdlref);
        }

        AssertionResultsOption aro = new AssertionResultsOptionImpl();
View Full Code Here

Examples of org.eclipse.wst.wsi.internal.core.analyzer.config.WSDLReference

    String elementName,
    String elementType) throws WSIAnalyzerException
  {
    try
    {
      WSDLReference wsdlReference = new WSDLReferenceImpl();

      WSDLElement wsdlElement = (WSDLElement) new WSDLElementImpl();
      wsdlElement.setType(elementType);
      if (parentName != null)
      {
        wsdlElement.setParentElementName(parentName);
      }
      wsdlElement.setNamespace(namespace);
      wsdlElement.setName(elementName);
      wsdlReference.setWSDLElement(wsdlElement);

      wsdlReference.setWSDLLocation(wsdlURI);
      DocumentFactory documentFactory = DocumentFactory.newInstance();
      // Initialize the BasicProfileAnalyzer using an analyzerconfig object
      AnalyzerConfig analyzerconfig = documentFactory.newAnalyzerConfig();

      AssertionResultsOption aro = new AssertionResultsOptionImpl();
View Full Code Here

Examples of org.eclipse.wst.wsi.internal.core.analyzer.config.WSDLReference

  /**
   * Parse command line arguments.
   */
  public void parseArgs(String[] args, boolean validate) throws WSIException
  {
    WSDLReference wsdlReference = null;
    UDDIReference uddiReference = null;

    // Get new config reader
    AnalyzerConfigReader analyzerConfigReader = new AnalyzerConfigReaderImpl();
    analyzerConfigReader.init(this.messageList);

    // Analyzer config object which will be merged after all of the input parms are processed
    AnalyzerConfig analyzerConfigFromArgs = null;

    // Assertion results option
    AssertionResultsOption assertionResultsOption = null;

    // If no input arguments, then throw exception
    if (args.length == 0)
    {
      // ADD:
      throw new IllegalArgumentException(
        getMessage("usage01", Analyzer.USAGE_MESSAGE));
    }

    // Parse the command line arguments to locate the config file option (if it was specified)
    for (int argCount = 0; argCount < args.length; argCount++)
    {
      // -config
      if ((args[argCount].equalsIgnoreCase("-config"))
        || (args[argCount].equals("-c")))
      {
        argCount++;
        analyzerConfigFromArgs =
          analyzerConfigReader.readAnalyzerConfig(
            getOptionValue(args, argCount));
      }
    }

    // If config file was not specified, then create analyzer config object
    if (analyzerConfigFromArgs == null)
    {
      analyzerConfigFromArgs = new AnalyzerConfigImpl();
      analyzerConfigFromArgs.init(this.messageList);
    }

    // Get assertion results option
    if ((assertionResultsOption =
      analyzerConfigFromArgs.getAssertionResultsOption())
      == null)
    {
      assertionResultsOption = new AssertionResultsOptionImpl();
      analyzerConfigFromArgs.setAssertionResultsOption(assertionResultsOption);
    }

    // Parse all of the command line arguments
    for (int argCount = 0; argCount < args.length; argCount++)
    {
      // -config
      if ((args[argCount].equalsIgnoreCase("-config"))
        || (args[argCount].equals("-c")))
      {
        // Skip this option since it was already processed
        argCount++;
      }

      // -verbose
      else if (
        (args[argCount].equalsIgnoreCase("-verbose"))
          || (args[argCount].equals("-v")))
      {
        argCount++;
        analyzerConfigFromArgs.setVerboseOption(
          Boolean.valueOf(getOptionValue(args, argCount)).booleanValue());
      }

      // -assertionResults
      else if (
        (args[argCount].equalsIgnoreCase("-assertionResults"))
          || (args[argCount].equals("-a")))
      {
        argCount++;
        assertionResultsOption.setAssertionResultType(
          AssertionResultType.newInstance(getOptionValue(args, argCount)));
      }

      // -messageEntry
      else if (
        (args[argCount].equalsIgnoreCase("-messageEntry"))
          || (args[argCount].equals("-M")))
      {
        argCount++;
        assertionResultsOption.setShowMessageEntry(
          Boolean.valueOf(getOptionValue(args, argCount)).booleanValue());
      }

      // -assertionDescription
      else if (
        (args[argCount].equalsIgnoreCase("-assertionDescription"))
          || (args[argCount].equals("-A")))
      {
        argCount++;
        assertionResultsOption.setShowAssertionDescription(
          Boolean.valueOf(args[argCount]).booleanValue());
      }

      // -failureMessage
      else if (
        (args[argCount].equalsIgnoreCase("-failureMessage"))
          || (args[argCount].equals("-F")))
      {
        argCount++;
        assertionResultsOption.setShowFailureMessage(
          Boolean.valueOf(getOptionValue(args, argCount)).booleanValue());
      }

      // -failureDetail
      else if (
        (args[argCount].equalsIgnoreCase("-failureDetail"))
          || (args[argCount].equals("-D")))
      {
        argCount++;
        assertionResultsOption.setShowFailureDetail(
          Boolean.valueOf(getOptionValue(args, argCount)).booleanValue());
      }

      // -logFile
      else if (
        (args[argCount].equalsIgnoreCase("-logFile"))
          || (args[argCount].equals("-l")))
      {
        argCount++;
        analyzerConfigFromArgs.setLogLocation(getOptionValue(args, argCount));
      }

      // -testAssertionFile
      else if (
        (args[argCount].equalsIgnoreCase("-testAssertionFile"))
          || (args[argCount].equals("-t")))
      {
        argCount++;
        analyzerConfigFromArgs.setTestAssertionsDocumentLocation(
          getOptionValue(args, argCount));
      }

      // -reportFile
      else if (
        (args[argCount].equalsIgnoreCase("-reportFile"))
          || (args[argCount].equals("-r")))
      {
        argCount++;
        analyzerConfigFromArgs.setReportLocation(
          getOptionValue(args, argCount));
      }

      // -replace
      else if (
        (args[argCount].equalsIgnoreCase("-replace"))
          || (args[argCount].equals("-R")))
      {
        argCount++;
        analyzerConfigFromArgs.setReplaceReport(
          Boolean.valueOf(getOptionValue(args, argCount)).booleanValue());
      }

      // -correlationType
      else if (
        (args[argCount].equalsIgnoreCase("-correlationType"))
          || (args[argCount].equals("-C")))
      {
        argCount++;
        analyzerConfigFromArgs.setCorrelationType(
          getOptionValue(args, argCount));
      }

      // -wsdlElement
      else if (
        (args[argCount].equalsIgnoreCase("-wsdlElement"))
          || (args[argCount].equals("-W")))
      {
        String optionName = args[argCount];
        argCount++;

        WSDLElement wsdlElement = new WSDLElementImpl();
        wsdlElement.setName(getOptionValue(args, argCount, optionName));
        argCount++;
        wsdlElement.setType(getOptionValue(args, argCount, optionName));
        argCount++;
        wsdlElement.setNamespace(getOptionValue(args, argCount, optionName));
        if (!args[argCount].startsWith("-"))
        {
          argCount++;
          wsdlElement.setParentElementName(
            getOptionValue(args, argCount, optionName));
        }

        if (wsdlReference != null)
        {
          wsdlReference.setWSDLElement(wsdlElement);
        }
        else if (uddiReference != null)
        {
          uddiReference.setWSDLElement(wsdlElement);
        }
        else
        {
          throw new IllegalArgumentException(
            getMessage(
              "config10",
              "The -wsdlElement option must appear after the -wsdlURI or -uddiKey options."));
        }

        analyzerConfigFromArgs.setWSDLReference(wsdlReference);
      }

      // -serviceLocation
      else if (
        (args[argCount].equalsIgnoreCase("-serviceLocation"))
          || (args[argCount].equals("-S")))
      {
        argCount++;

        if (wsdlReference != null)
        {
          wsdlReference.setServiceLocation(getOptionValue(args, argCount));
        }
        else if (uddiReference != null)
        {
          uddiReference.setServiceLocation(getOptionValue(args, argCount));
        }
        else
        {
          throw new IllegalArgumentException(
            getMessage(
              "config11",
              "The -serviceLocation option must appear after the -wsdlURI or -uddiKey options."));
        }
      }

      // -wsdlURI
      else if (
        (args[argCount].equalsIgnoreCase("-wsdlURI"))
          || (args[argCount].equals("-W")))
      {
        argCount++;
        if (wsdlReference == null)
          wsdlReference = new WSDLReferenceImpl();
        wsdlReference.setWSDLLocation(getOptionValue(args, argCount));
        analyzerConfigFromArgs.setWSDLReference(wsdlReference);
      }

      // -uddiKeyType
      else if (
View Full Code Here

Examples of org.eclipse.wst.wsi.internal.core.analyzer.config.WSDLReference

    AnalyzerConfig analyzerConfig,
    Element element)
    throws WSIException
  {
    // Create UDDI reference
    WSDLReference wsdlReference = new WSDLReferenceImpl();

    // Set WSDL reference
    analyzerConfig.setWSDLReference(wsdlReference);

    // Get first child element
    Element nextElement = XMLUtils.getFirstChild(element);

    // Process each child element
    while (nextElement != null)
    {
      // <wsdlURI>
      if (isElement(nextElement, WSIConstants.ELEM_WSDL_URI))
      {
        // Set WSDL location
        wsdlReference.setWSDLLocation(XMLUtils.getText(nextElement));
      }

      // <serviceLocation>
      else if (isElement(nextElement, WSIConstants.ELEM_SERVICE_LOCATION))
      {
        // Set service location
        wsdlReference.setServiceLocation(XMLUtils.getText(nextElement));
      }

      // <wsdlElement>
      else if (isElement(nextElement, WSIConstants.ELEM_WSDL_ELEMENT))
      {
        // Set WSDL element
        wsdlReference.setWSDLElement(parseWsdlElement(nextElement));
      }

      else
      {
        // Throw exception
        throw new IllegalArgumentException(
          getMessage(
            "config06",
            nextElement.getLocalName(),
            "Invalid analyzer config element:"));
      }

      // Get next element
      nextElement = XMLUtils.getNextSibling(nextElement);
    }

    // If WSDL element or WSL URI not specified, then throw exception
    if ((wsdlReference.getWSDLElement() == null)
      || (wsdlReference.getWSDLLocation() == null))
    {
      throw new IllegalArgumentException(
        getMessage(
          "config07",
          "Both the <wsdlElement> and <wsdlURI> elements must be specified."));
    }

    // If type is port or operation, then parent element name must be specified
    if (((wsdlReference
      .getWSDLElement()
      .getType()
      .equalsIgnoreCase(WSDLValidator.TYPE_DESCRIPTION_PORT))
      || (wsdlReference
        .getWSDLElement()
        .getType()
        .equalsIgnoreCase(WSDLValidator.TYPE_DESCRIPTION_OPERATION)))
      && (wsdlReference.getWSDLElement().getParentElementName() == null))
    {
      throw new IllegalArgumentException(
        getMessage(
          "config09",
          "The parentElementName attribute must be specified with a WSDL type of "
View Full Code Here

Examples of org.jboss.soa.dsp.ws.WSDLReference

 
   public WSDLReference createWSDLReference(BPELEngineImpl engine, QName processId, QName serviceName, String portName)
    {
      File targetWSDLFile = findWSDLFile(engine, processId, serviceName, portName);
      Definition wsdlDefinition = getWSDLDefinition(engine, processId, serviceName);
      return new WSDLReference(wsdlDefinition, targetWSDLFile.toURI());
    }
View Full Code Here

Examples of org.jboss.soa.dsp.ws.WSDLReference

      log.warn("Endpoint does already exist: "
          + myRoleEndpoint.serviceName + "/"+myRoleEndpoint.portName);
    }
    else
    {
      WSDLReference wsdlReference = new WSDLHelper().createWSDLReference(engine, processId,
          myRoleEndpoint.serviceName, myRoleEndpoint.portName);

      try
      {
        final ClassLoader classLoader = JAXWSBindingContext.class.getClassLoader(); //Thread.currentThread().getContextClassLoader();
View Full Code Here

Examples of org.jboss.soa.dsp.ws.WSDLReference

    }
  }
 
  private synchronized void initialize() {
 
      WSDLReference wsdlReference = new WSDLHelper().createWSDLReference(engine,
          metaData.getProcessId(), metaData.getServiceName(), metaData.getPortName());
      wsdlDefinition = wsdlReference.getDefinition();
      wsdlUrl = wsdlReference.getWsdlURL();
   
      this.messageAdapter = new SOAPMessageAdapter(this.wsdlDefinition, serviceName, port.getLocalPart());   
    isInitialized=true;
  }
View Full Code Here

Examples of org.wsI.testing.x2004.x07.analyzerConfig.WsdlReference

    stylesheet.setType( "text/xsl" );
    stylesheet.setAlternate( false );

    config.setTestAssertionsFile( "../../common/profiles/SSBP10_BP11_TAD.xml" );

    WsdlReference wsdlRef = config.addNewWsdlReference();

    StringToStringMap values = new StringToStringMap();
    values.put( WSDL, iface.getDefinition() );
    values.put( CACHED_WSDL, Boolean.toString( iface.isCached() ) );

    wsdlRef.setWsdlURI( getWsdlUrl( values, iface ) );
    WsdlElementReference wsdlElement = wsdlRef.addNewWsdlElement();
    wsdlElement.setType( WsdlElementType.BINDING );
    wsdlElement.setStringValue( iface.getBindingName().getLocalPart() );
    wsdlElement.setNamespace( iface.getBindingName().getNamespaceURI() );
    return configDoc;
  }
View Full Code Here

Examples of org.wsI.testing.x2004.x07.analyzerConfig.WsdlReference

        stylesheet.setType("text/xsl");
        stylesheet.setAlternate(false);

        config.setTestAssertionsFile("../../common/profiles/SSBP10_BP11_TAD.xml");

        WsdlReference wsdlRef = config.addNewWsdlReference();

        StringToStringMap values = new StringToStringMap();
        values.put(WSDL, iface.getDefinition());
        values.put(CACHED_WSDL, Boolean.toString(iface.isCached()));

        wsdlRef.setWsdlURI(getWsdlUrl(values, iface));
        WsdlElementReference wsdlElement = wsdlRef.addNewWsdlElement();
        wsdlElement.setType(WsdlElementType.BINDING);
        wsdlElement.setStringValue(iface.getBindingName().getLocalPart());
        wsdlElement.setNamespace(iface.getBindingName().getNamespaceURI());
        return configDoc;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.