コード例 #1
0
  protected XFormDialog buildDialog(Interface modelItem) {
    XFormDialogBuilder builder = XFormFactory.createDialogBuilder("JBossWS Artifacts");

    XForm mainForm = builder.createForm("Basic");
    addWSDLFields(mainForm, modelItem);

    mainForm.addTextField(
        OUTPUT, "The root directory for all emitted files.", XForm.FieldType.PROJECT_FOLDER);
    mainForm.addTextField(MAPPING, "mapping file to generate", XForm.FieldType.PROJECT_FILE);
    mainForm.addCheckBox(UNWRAP, "unwrap doc-literal operations");

    mainForm.addNameSpaceTable(NAMESPACE_MAPPING, modelItem);

    mainForm.addSeparator("webservices.xml generation options");
    ejbLinkField =
        mainForm.addTextField(
            EJB_LINK,
            "The ejb-jar.xml ejb-link for Stateless Session Bean endpoints",
            XForm.FieldType.TEXT);
    ejbLinkField.addFormFieldListener(
        new XFormFieldListener() {
          public void valueChanged(XFormField sourceField, String newValue, String oldValue) {
            servletLinkField.setEnabled(newValue.length() == 0);
            appendField.setEnabled(newValue.length() > 0);
          }
        });

    servletLinkField =
        mainForm.addTextField(
            SERVLET_LINK,
            "The web.xml servlet-link that is used by Java Service Endpoints (WAR)",
            XForm.FieldType.TEXT);
    servletLinkField.addFormFieldListener(
        new XFormFieldListener() {
          public void valueChanged(XFormField sourceField, String newValue, String oldValue) {
            ejbLinkField.setEnabled(newValue.length() == 0);
            appendField.setEnabled(newValue.length() > 0);
          }
        });

    appendField = mainForm.addCheckBox(APPEND, "append to existing file");
    appendField.setEnabled(false);
    buildArgsForm(builder, false, "wstools");

    ActionList actions = buildDefaultActions(HelpUrls.WSTOOLS_HELP_URL, modelItem);
    actions.addAction(
        new JBossWSShowConfigFileAction(
            "JBossWS Wsdl2Java", "Contents of generated wsconfig.xml file", modelItem));
    return builder.buildDialog(
        actions,
        "Specify arguments for JBossWS wstools wsdl2java functionality",
        UISupport.TOOL_ICON);
  }
コード例 #2
0
ファイル: UrlWsdlLoader.java プロジェクト: redfish4ktc/soapui
    private void buildBasicDialog() {
      XFormDialogBuilder builder = XFormFactory.createDialogBuilder("Basic Authentication");
      XForm mainForm = builder.createForm("Basic");
      mainForm.addLabel("Info", "");
      mainForm.addTextField("Username", "Username for authentication", XForm.FieldType.TEXT);
      mainForm.addTextField("Password", "Password for authentication", XForm.FieldType.PASSWORD);

      basicDialog =
          builder.buildDialog(
              builder.buildOkCancelActions(),
              "Specify Basic Authentication Credentials",
              UISupport.OPTIONS_ICON);
    }
コード例 #3
0
ファイル: XmlBeans2Action.java プロジェクト: SmartBear/soapui
  protected XFormDialog buildDialog(Interface modelItem) {
    XFormDialogBuilder builder = XFormFactory.createDialogBuilder("XmlBeans Classes");

    XForm mainForm = builder.createForm("Basic");
    addWSDLFields(mainForm, modelItem);

    mainForm.addTextField(
        XSBTARGET, "Target directory for CLASS and XSB files", XForm.FieldType.PROJECT_FOLDER);
    mainForm.addTextField(
        SRCTARGET, "Target directory for generated JAVA files", XForm.FieldType.PROJECT_FOLDER);
    mainForm.addTextField(
        JARFILE,
        "The name of the output JAR that will contain the result of compilation",
        XForm.FieldType.PROJECT_FILE);

    mainForm.addCheckBox(SRCONLY, "(Do not compile JAVA files or jar the output)");
    mainForm.addCheckBox(DOWNLOADS, "(Permit network downloads for imports and includes)");
    mainForm.addCheckBox(NOUPA, "(Do not enforce the unique particle attribution rule)");
    mainForm.addCheckBox(NOPVR, "(Do not enforce the particle valid (restriction) rule)");
    mainForm.addCheckBox(NOANN, "(Ignore annotations)");
    mainForm.addCheckBox(NOVDOC, "(Do not validate contents of <documentation> elements)");
    mainForm.addCheckBox(DEBUG, "(Compile with debug symbols)");

    mainForm.addComboBox(
        JAVASOURCE,
        new String[] {"1.5", "1.4"},
        "Generate Java source compatible for the specified Java version");

    mainForm.addTextField(
        ALLOWMDEF,
        "Ignore multiple defs in given namespaces. Use  ##local  to specify the no-namespace in that list",
        XForm.FieldType.TEXT);
    mainForm.addTextField(
        CATALOG,
        "Catalog file to use for resolving external entities",
        XForm.FieldType.PROJECT_FILE);
    mainForm.addTextField(
        XSDCONFIG,
        "Path to .xsdconfig file containing type-mapping information",
        XForm.FieldType.PROJECT_FILE);

    mainForm.addCheckBox(VERBOSE, "(Print more informational messages)");

    buildArgsForm(builder, false, "scomp");

    return builder.buildDialog(
        buildDefaultActions(HelpUrls.XMLBEANS_HELP_URL, modelItem),
        "Specify arguments for XmlBeans 2.X scomp",
        UISupport.TOOL_ICON);
  }
コード例 #4
0
  private void buildDialog() {
    XFormDialogBuilder builder = XFormFactory.createDialogBuilder("Contains Assertion");
    XForm mainForm = builder.createForm("Basic");

    mainForm.addTextField(CONTENT, "Content to check for", XForm.FieldType.TEXTAREA).setWidth(40);
    mainForm.addCheckBox(IGNORE_CASE, "Ignore case in comparison");
    mainForm.addCheckBox(USE_REGEX, "Use token as Regular Expression");

    dialog =
        builder.buildDialog(
            builder.buildOkCancelHelpActions(HelpUrls.SIMPLE_CONTAINS_HELP_URL),
            "Specify options",
            UISupport.OPTIONS_ICON);
  }
コード例 #5
0
ファイル: AbstractToolsAction.java プロジェクト: TouK/soapuii
  protected XForm buildArgsForm(XFormDialogBuilder builder, boolean addJavaArgs, String toolName) {
    XForm argsForm = builder.createForm("Custom Args");
    if (addJavaArgs)
      argsForm.addTextField(JAVA_ARGS, "additional arguments to java", XForm.FieldType.TEXT);

    argsForm.addTextField(TOOL_ARGS, "additional arguments to " + toolName, XForm.FieldType.TEXT);
    return argsForm;
  }
コード例 #6
0
  protected XFormDialog buildDialog(Interface modelItem) {
    XFormDialogBuilder builder = XFormFactory.createDialogBuilder("Oracle Artifacts");

    XForm mainForm = builder.createForm("Basic");
    addWSDLFields(mainForm, modelItem);

    mainForm.addTextField(
        OUTPUT, "The root directory for all emitted files.", XForm.FieldType.PROJECT_FOLDER);
    mainForm.addTextField(
        PACKAGE, "The target package for generated classes", XForm.FieldType.JAVA_PACKAGE);

    buildArgsForm(builder, true, "wsa");

    ActionList actions = buildDefaultActions(HelpUrls.ORACLEWSA_HELP_URL, modelItem);
    return builder.buildDialog(
        actions,
        "Specify arguments for Oracle wsa.jar genProxy functionality",
        UISupport.TOOL_ICON);
  }
コード例 #7
0
  protected XFormDialog buildDialog(WsdlProject project) {
    XFormDialogBuilder builder =
        XFormFactory.createDialogBuilder("Generate JBossWS WSDL Artifacts");

    XForm mainForm = builder.createForm("Basic");

    mainForm.addTextField(ENDPOINT, "Serice Endpoint Interface", XForm.FieldType.JAVA_CLASS);
    mainForm.addTextField(SERVICE_NAME, "The name of the generated Service", XForm.FieldType.TEXT);
    mainForm.addComboBox(
        STYLE, new String[] {Style.DOCUMENT.toString(), Style.RPC.toString()}, "The style to use");
    mainForm.addComboBox(
        PARAMETER_STYLE,
        new String[] {ParameterStyle.BARE.toString(), ParameterStyle.WRAPPED.toString()},
        "The style to use");
    mainForm.addTextField(CLASSPATH, "Classpath to use", XForm.FieldType.PROJECT_FOLDER);
    mainForm.addTextField(
        OUTPUT, "The root directory for all emitted files.", XForm.FieldType.PROJECT_FOLDER);
    mainForm.addTextField(MAPPING, "mapping file to generate", XForm.FieldType.PROJECT_FILE);
    mainForm.addTextField(
        TARGET_NAMESPACE, "The target namespace for the generated WSDL", XForm.FieldType.TEXT);
    mainForm.addTextField(
        TYPES_NAMESPACE, "The namespace for the generated types", XForm.FieldType.TEXT);
    mainForm.addTextField(EJB_LINK, "The name of the source EJB to link to", XForm.FieldType.TEXT);
    mainForm.addTextField(
        SERVLET_LINK, "The name of the source Servlet to link to", XForm.FieldType.TEXT);

    buildArgsForm(builder, false, "wstools");

    ActionList actions = buildDefaultActions(HelpUrls.WSTOOLS_HELP_URL, project);
    actions.addAction(
        new ShowConfigFileAction("JBossWS Java2Wsdl", "Contents of generated wsconfig.xml file") {
          protected String getConfigFile() {
            ConfigurationDocument configDocument = createConfigFile(getDialog().getValues());
            return configDocument.toString();
          }
        });

    return builder.buildDialog(
        actions,
        "Specify arguments for JBossWS wstools java2wsdl functionality",
        UISupport.TOOL_ICON);
  }
コード例 #8
0
  private void buildDialog() {
    XFormDialogBuilder builder = XFormFactory.createDialogBuilder("Ws-a properties to assert");
    XForm mainForm = builder.createForm("Basic");
    mainForm.addCheckBox(ASSERT_ACTION, "Check if 'wsa:Action' exists");
    mainForm.addCheckBox(ASSERT_TO, "Check if 'wsa:To' exists");
    mainForm.addCheckBox(ASSERT_REPLY_TO, "Check if 'wsa:ReplyTo' exists");
    mainForm.addCheckBox(ASSERT_MESSAGE_ID, "Check if 'wsa:MessageId' exists");
    // mainForm.addCheckBox(ASSERT_RELATES_TO,
    // "Check if 'wsa:RelatesTo' exists");
    // mainForm.addCheckBox(ASSERT_REPLY_TO_REF_PARAMS,
    // "Check if 'wsa:ReplyTo' ReferenceParameters exist");
    // mainForm.addCheckBox(ASSERT_FAULT_TO_REF_PARAMS,
    // "Check if 'wsa:FaultTo' ReferenceParameters exist");

    dialog =
        builder.buildDialog(
            builder.buildOkCancelHelpActions(HelpUrls.SIMPLE_CONTAINS_HELP_URL),
            "Specify options",
            UISupport.OPTIONS_ICON);
  }
コード例 #9
0
  public void perform(SecurityTest securityTest, Object param) {
    if (dialog == null) {
      XFormDialogBuilder builder = XFormFactory.createDialogBuilder("SecurityTest Options");
      form = builder.createForm("Basic");
      form.addCheckBox(FAIL_ON_ERROR, "Fail on error")
          .addFormFieldListener(
              new XFormFieldListener() {

                public void valueChanged(XFormField sourceField, String newValue, String oldValue) {
                  form.getFormField(FAIL_SECURITYTEST_ON_ERROR)
                      .setEnabled(!Boolean.parseBoolean(newValue));
                }
              });
      form.addCheckBox(FAIL_SECURITYTEST_ON_ERROR, "Fail SecurityTest if it has failed TestSteps");

      dialog =
          builder.buildDialog(
              builder.buildOkCancelHelpActions(HelpUrls.SECURITYTESTEDITOR_HELP_URL),
              "Specify general options for this SecurityTest",
              UISupport.OPTIONS_ICON);
    }

    StringToStringMap values = new StringToStringMap();

    values.put(FAIL_ON_ERROR, String.valueOf(securityTest.getFailOnError()));
    values.put(
        FAIL_SECURITYTEST_ON_ERROR, String.valueOf(securityTest.getFailSecurityTestOnScanErrors()));
    values = dialog.show(values);

    if (dialog.getReturnValue() == XFormDialog.OK_OPTION) {
      try {
        securityTest.setFailOnError(Boolean.parseBoolean(values.get(FAIL_ON_ERROR)));
        securityTest.setFailSecurityTestOnScanErrors(
            Boolean.parseBoolean(values.get(FAIL_SECURITYTEST_ON_ERROR)));

      } catch (Exception e1) {
        UISupport.showErrorMessage(e1.getMessage());
      }
    }
  }
コード例 #10
0
  private void buildDialog() {
    XFormDialogBuilder builder = XFormFactory.createDialogBuilder("Step Average Assertion");
    XForm form = builder.createForm("Basic");

    form.addTextField(NAME_FIELD, "Name of this assertion", FieldType.TEXT);
    form.addTextField(
        MINIMUM_REQUESTS_FIELD, "Minimum number of steps before asserting", FieldType.TEXT);
    form.addTextField(MAX_AVERAGE_FIELD, "Maximum allowed average step time", FieldType.TEXT);
    form.addTextField(
        MAX_ERRORS_FIELD,
        "Maximum number of allowed errors before failing loadtest (-1 = unlimited)",
        FieldType.TEXT);
    form.addTextField(
        SAMPLE_INTERVAL_FIELD, "Step count interval between sampling", FieldType.TEXT);
    form.addComboBox(TEST_STEP_FIELD, new String[0], "TestStep to assert");

    dialog =
        builder.buildDialog(
            builder.buildOkCancelHelpActions(HelpUrls.STEP_AVERAGE_LOAD_TEST_ASSERTION_HELP_URL),
            "Specify options for this Step Average Assertion",
            UISupport.OPTIONS_ICON);
  }
コード例 #11
0
  private void buildDialog() {
    XFormDialogBuilder builder = XFormFactory.createDialogBuilder("Transfer from Property");
    XForm form = builder.createForm("Basic");

    form.addComboBox(TRANSFER_STEP, getPropertyTransferSteps(), "Property Transfer step to use")
        .addFieldListener(
            new XFormFieldListener() {
              public void valueChanged(XFormField sourceField, String newValue, String oldValue) {
                dialog.setOptions(TRANSFER_NAME, getPropertyTransfers());
              }
            });

    form.addComboBox(TRANSFER_NAME, getPropertyTransfers(), "Name of transfer")
        .setRequired(true, "Transfer is required");

    form.addComboBox(SOURCE_STEP, getSourceSteps(), "Source step")
        .addFieldListener(
            new XFormFieldListener() {
              public void valueChanged(XFormField sourceField, String newValue, String oldValue) {
                dialog.setOptions(SOURCE_PROPERTY, getSourceProperties());
              }
            });

    form.addComboBox(SOURCE_PROPERTY, getSourceProperties(), "Source property");
    form.addCheckBox(OPEN_EDITOR, "Opens Property Transfer editor after finish");
    XForm xpathForm = builder.createForm("XPath Value");

    xpathForm.addTextField(TARGET_XPATH, "The target xpath expression", FieldType.TEXTAREA);
    xpathForm
        .addTextField(CURRENT_VALUE, "The currently selected value", FieldType.TEXTAREA)
        .setEnabled(false);
    ActionList actions = builder.buildOkCancelHelpActions("");

    dialog =
        builder.buildDialog(
            actions, "Specify options for property transfer", UISupport.OPTIONS_ICON);
  }
コード例 #12
0
  protected XFormDialog buildDialog(Interface modelItem) {
    XFormDialogBuilder builder = XFormFactory.createDialogBuilder("JBossWS JAX-WS Artifacts");

    XForm mainForm = builder.createForm("Basic");
    addWSDLFields(mainForm, modelItem);

    mainForm.addTextField(
        OUTPUT, "target directory for generated files.", XForm.FieldType.PROJECT_FOLDER);
    mainForm.addTextField(PACKAGE, "target package nam", XForm.FieldType.JAVA_PACKAGE);
    mainForm.addTextField(
        SOURCE_OUTPUT,
        "target directory for generated source files",
        XForm.FieldType.PROJECT_FOLDER);
    mainForm.addTextField(
        CATALOG,
        "catalog file to resolve external entity references",
        XForm.FieldType.PROJECT_FILE);
    mainForm.addTextField(
        BINDING_FILES,
        "comma-separated list of external JAX-WS or JAXB binding files",
        XForm.FieldType.TEXT);
    mainForm.addTextField(
        WSDLLOCATION,
        "@WebService.wsdlLocation and @WebServiceClient.wsdlLocation value",
        XForm.FieldType.TEXT);

    mainForm.addCheckBox(KEEP, "(keep generated files)");
    mainForm.addCheckBox(STACKTRACE, "(show stacktrace for errors)");

    buildArgsForm(builder, false, "wsconsume");

    return builder.buildDialog(
        buildDefaultActions(HelpUrls.JBOSSWS_WSCONSUME_HELP_URL, modelItem),
        "Specify arguments for JBossWS wsconsume",
        UISupport.TOOL_ICON);
  }