JBoss Tools SVN: r23395 - in trunk/bpel/docs/reference/en-US: images and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: bbrodt
Date: 2010-07-13 20:52:09 -0400 (Tue, 13 Jul 2010)
New Revision: 23395
Added:
trunk/bpel/docs/reference/en-US/images/deploy_createdeploy_8.png
trunk/bpel/docs/reference/en-US/images/deploy_createdeploy_9.png
trunk/bpel/docs/reference/en-US/images/detail_assign1.png
trunk/bpel/docs/reference/en-US/images/detail_assign2.png
trunk/bpel/docs/reference/en-US/images/detail_assign3.png
trunk/bpel/docs/reference/en-US/images/detail_createprocess_2a.png
trunk/bpel/docs/reference/en-US/images/details_createproject_1.png
trunk/bpel/docs/reference/en-US/images/reference/bpel_ref_3a.png
Modified:
trunk/bpel/docs/reference/en-US/images/deploy_createdeploy_1.png
trunk/bpel/docs/reference/en-US/images/deploy_createdeploy_2.png
trunk/bpel/docs/reference/en-US/images/deploy_createdeploy_3.png
trunk/bpel/docs/reference/en-US/images/deploy_createdeploy_4.png
trunk/bpel/docs/reference/en-US/images/deploy_createdeploy_5.png
trunk/bpel/docs/reference/en-US/images/deploy_createdeploy_6.png
trunk/bpel/docs/reference/en-US/images/deploy_createdeploy_7.png
trunk/bpel/docs/reference/en-US/images/detail_createprocess_1.png
trunk/bpel/docs/reference/en-US/images/detail_createprocess_2.png
trunk/bpel/docs/reference/en-US/images/detail_createprocess_3.png
trunk/bpel/docs/reference/en-US/images/detail_createproject_1.png
trunk/bpel/docs/reference/en-US/images/detail_createproject_2.png
trunk/bpel/docs/reference/en-US/images/detail_editprocess_1.png
trunk/bpel/docs/reference/en-US/images/detail_editprocess_2.png
trunk/bpel/docs/reference/en-US/images/reference/bpel_ref_3.png
trunk/bpel/docs/reference/en-US/images/reference/bpel_ref_4.png
trunk/bpel/docs/reference/en-US/master.xml
trunk/bpel/docs/reference/en-US/modules/install.xml
trunk/bpel/docs/reference/en-US/modules/overview.xml
trunk/bpel/docs/reference/en-US/modules/reference.xml
trunk/bpel/docs/reference/en-US/modules/summary.xml
trunk/bpel/docs/reference/en-US/modules/tasks.xml
Log:
Update BPEL User Guide
https://jira.jboss.org/browse/TOOLSDOC-90
Modified: trunk/bpel/docs/reference/en-US/images/deploy_createdeploy_1.png
===================================================================
(Binary files differ)
Modified: trunk/bpel/docs/reference/en-US/images/deploy_createdeploy_2.png
===================================================================
(Binary files differ)
Modified: trunk/bpel/docs/reference/en-US/images/deploy_createdeploy_3.png
===================================================================
(Binary files differ)
Modified: trunk/bpel/docs/reference/en-US/images/deploy_createdeploy_4.png
===================================================================
(Binary files differ)
Modified: trunk/bpel/docs/reference/en-US/images/deploy_createdeploy_5.png
===================================================================
(Binary files differ)
Modified: trunk/bpel/docs/reference/en-US/images/deploy_createdeploy_6.png
===================================================================
(Binary files differ)
Modified: trunk/bpel/docs/reference/en-US/images/deploy_createdeploy_7.png
===================================================================
(Binary files differ)
Added: trunk/bpel/docs/reference/en-US/images/deploy_createdeploy_8.png
===================================================================
(Binary files differ)
Property changes on: trunk/bpel/docs/reference/en-US/images/deploy_createdeploy_8.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/bpel/docs/reference/en-US/images/deploy_createdeploy_9.png
===================================================================
(Binary files differ)
Property changes on: trunk/bpel/docs/reference/en-US/images/deploy_createdeploy_9.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/bpel/docs/reference/en-US/images/detail_assign1.png
===================================================================
(Binary files differ)
Property changes on: trunk/bpel/docs/reference/en-US/images/detail_assign1.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/bpel/docs/reference/en-US/images/detail_assign2.png
===================================================================
(Binary files differ)
Property changes on: trunk/bpel/docs/reference/en-US/images/detail_assign2.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/bpel/docs/reference/en-US/images/detail_assign3.png
===================================================================
(Binary files differ)
Property changes on: trunk/bpel/docs/reference/en-US/images/detail_assign3.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/bpel/docs/reference/en-US/images/detail_createprocess_1.png
===================================================================
(Binary files differ)
Modified: trunk/bpel/docs/reference/en-US/images/detail_createprocess_2.png
===================================================================
(Binary files differ)
Added: trunk/bpel/docs/reference/en-US/images/detail_createprocess_2a.png
===================================================================
(Binary files differ)
Property changes on: trunk/bpel/docs/reference/en-US/images/detail_createprocess_2a.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/bpel/docs/reference/en-US/images/detail_createprocess_3.png
===================================================================
(Binary files differ)
Modified: trunk/bpel/docs/reference/en-US/images/detail_createproject_1.png
===================================================================
(Binary files differ)
Modified: trunk/bpel/docs/reference/en-US/images/detail_createproject_2.png
===================================================================
(Binary files differ)
Modified: trunk/bpel/docs/reference/en-US/images/detail_editprocess_1.png
===================================================================
(Binary files differ)
Modified: trunk/bpel/docs/reference/en-US/images/detail_editprocess_2.png
===================================================================
(Binary files differ)
Added: trunk/bpel/docs/reference/en-US/images/details_createproject_1.png
===================================================================
(Binary files differ)
Property changes on: trunk/bpel/docs/reference/en-US/images/details_createproject_1.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/bpel/docs/reference/en-US/images/reference/bpel_ref_3.png
===================================================================
(Binary files differ)
Added: trunk/bpel/docs/reference/en-US/images/reference/bpel_ref_3a.png
===================================================================
(Binary files differ)
Property changes on: trunk/bpel/docs/reference/en-US/images/reference/bpel_ref_3a.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/bpel/docs/reference/en-US/images/reference/bpel_ref_4.png
===================================================================
(Binary files differ)
Modified: trunk/bpel/docs/reference/en-US/master.xml
===================================================================
--- trunk/bpel/docs/reference/en-US/master.xml 2010-07-14 00:02:21 UTC (rev 23394)
+++ trunk/bpel/docs/reference/en-US/master.xml 2010-07-14 00:52:09 UTC (rev 23395)
@@ -1,57 +1,56 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3CR3//EN"
-"http://www.docbook.org/xml/4.3/docbookx.dtd"
-
-[<!ENTITY overview SYSTEM "modules/overview.xml">
-<!ENTITY install SYSTEM "modules/install.xml">
-<!ENTITY detail SYSTEM "modules/detail.xml">
-<!ENTITY deploy SYSTEM "modules/deploy.xml">
-<!ENTITY reference SYSTEM "modules/reference.xml">
-<!ENTITY summary SYSTEM "modules/summary.xml">
-<!ENTITY tasks SYSTEM "modules/tasks.xml">
-]>
-
-<book>
-
- <bookinfo>
- <title>JBoss BPEL User Guide</title>
-
- <corpauthor>
- <inlinemediaobject>
- <imageobject role="fo">
- <imagedata format="PNG" fileref="images/jbosstools_logo.png" />
- </imageobject>
- <imageobject role="html">
- <imagedata/>
- </imageobject>
- </inlinemediaobject>
- </corpauthor>
- <author><firstname>Denny</firstname><surname>Xu</surname><email>dxu(a)redhat.com</email></author>
- <author><firstname>Grid</firstname><surname>Qian</surname><email>fqian(a)redhat.com</email></author>
- <copyright>
- <year>2009</year>
- <year>2010</year>
- <holder>JBoss by Red Hat</holder>
- </copyright>
- <releaseinfo>
- Version: 1.0.0.trunk
- </releaseinfo>
-<abstract>
- <title/>
- <para>
- <ulink url="http://download.jboss.org/jbosstools/nightly-docs/en/bpel_ref_guide/pdf/B...">PDF version</ulink>
- </para>
-</abstract>
-
-
- </bookinfo>
-
- <toc/>
- &overview;
- &install;
- &tasks;
- <!-- &detail;
- &deploy;-->
- &reference;
- &summary;
-</book>
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3CR3//EN"
+"http://www.docbook.org/xml/4.3/docbookx.dtd"
+
+[<!ENTITY overview SYSTEM "modules/overview.xml">
+<!ENTITY install SYSTEM "modules/install.xml">
+<!ENTITY detail SYSTEM "modules/detail.xml">
+<!ENTITY deploy SYSTEM "modules/deploy.xml">
+<!ENTITY reference SYSTEM "modules/reference.xml">
+<!ENTITY summary SYSTEM "modules/summary.xml">
+<!ENTITY tasks SYSTEM "modules/tasks.xml">
+]>
+<book>
+ <bookinfo>
+ <title>JBoss BPEL User Guide</title>
+ <corpauthor>
+ <inlinemediaobject>
+ <imageobject role="fo">
+ <imagedata fileref="images/jbosstools_logo.png" format="PNG"/>
+ </imageobject>
+ <imageobject role="html">
+ <imagedata/>
+ </imageobject>
+ </inlinemediaobject>
+ </corpauthor>
+ <author>
+ <firstname>Denny</firstname>
+ <surname>Xu</surname>
+ <email>dxu(a)redhat.com</email>
+ </author>
+ <author>
+ <firstname>Grid</firstname>
+ <surname>Qian</surname>
+ <email>fqian(a)redhat.com</email>
+ </author>
+ <author>
+ <firstname>Bob</firstname>
+ <surname>Brodt</surname>
+ <email>bbrodt(a)redhat.com</email>
+ </author>
+ <copyright>
+ <year>2009</year>
+ <year>2010</year>
+ <holder>JBoss by Red Hat</holder>
+ </copyright>
+ <releaseinfo> Version: 1.0.0.trunk </releaseinfo>
+ <abstract>
+ <title/>
+ <para>
+ <ulink url="http://download.jboss.org/jbosstools/nightly-docs/en/bpel_ref_guide/pdf/B...">PDF version</ulink>
+ </para>
+ </abstract>
+ </bookinfo>
+ <toc/>
+&overview;&install;&tasks;<!-- &detail;
+ &deploy;-->&reference;&summary;</book>
Modified: trunk/bpel/docs/reference/en-US/modules/install.xml
===================================================================
--- trunk/bpel/docs/reference/en-US/modules/install.xml 2010-07-14 00:02:21 UTC (rev 23394)
+++ trunk/bpel/docs/reference/en-US/modules/install.xml 2010-07-14 00:52:09 UTC (rev 23395)
@@ -1,62 +1,59 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<chapter id="install">
- <title>Installation JBoss BPEL Tools</title>
- <section id="installeclipse">
- <title>Installation JBoss BPEL editor</title>
- <para>At first, you need Eclipse 3.5. You can get it from <ulink url="http://www.eclipse.org/downloads/download.php?file=/technology/epp/downlo...">Eclipse Web Site</ulink>.
- </para>
- <para>The JBoss BPEL editor is included into JBoss Tools.
- You have some methods to install JBoss Tools.
- See <ulink url="http://www.jboss.org/tools/download/installation.html">Installing JBoss Tools</ulink> for more information.</para>
- <para>If you want to install only the JBoss BPEL editor, you can install it from <ulink url="http://jboss.org/tools/download/dev.html">JBoss Tools</ulink> page separately.
- Please, note, that only JBoss Tools 3.1 or higher version includes JBoss BPEL editor.
- </para>
- </section>
- <section>
- <title>Prerequisites</title>
- <para>For installation and configuring BPEL engine into a JBossAS environment
- you will need the following: </para>
- <itemizedlist>
- <listitem><para> JBossAS (version 5.1.0.GA or higher),
- available from <ulink url="http://www.jboss.org/jbossas">
- http://www.jboss.org/jbossas</ulink>.</para></listitem>
- <listitem><para>RiftSaw (version 2.0 or higher), available from <ulink url="http://www.jboss.org/riftsaw">http://www.jboss.org/riftsaw</ulink>.</para></listitem>
- <listitem><para>Ant, available from <ulink url="http://ant.apache.org">here</ulink>.</para></listitem>
- </itemizedlist>
-
- </section>
- <section id="installRuntime">
- <title>Installation JBoss BPEL Runtime</title>
- <itemizedlist>
- <listitem>
- <para>Unpack the JBossAS installation archive into the required location.
- </para>
- </listitem>
- <listitem>
- <para>Unpack the RiftSaw distribution into the location
- alongside the JBossAS installation:</para>
- <itemizedlist>
- <listitem>
- <para>Edit the <property>install/deployment.properties</property> file to update
- the JBossAS location settings.
- </para>
- </listitem>
- <listitem>
- <para>From the <property>install</property> folder,
- run: <property>ant deploy -Ddatabase=hsql</property>
- to deploy RiftSaw to JBossAS.
- </para>
- </listitem>
- </itemizedlist>
- </listitem>
- <listitem>
- <para>Then in the
- <property>${RiftSaw}/install</property> folder run the command:
- <property>ant deploy -Ddatabase=hsql -Dws.stack=native -Dws.version=3.2.2.GA</property>
- It will help you to download the web service stack, and then upgrade it for JBoss AS.
- </para>
- </listitem>
- </itemizedlist>
-
- </section>
+<?xml version='1.0' encoding='ISO-8859-1'?><chapter id="install">
+ <title>Installating the JBoss BPEL Tools</title>
+ <section id="installeclipse">
+ <title>BPEL Editor</title>
+ <para>The JBoss BPEL Editor and deployment framework are available in the community-supported distribution of JBoss Tools and are now also bundled into the commerically available JBoss Developer Studio (JBDS). As of this writing, the tools can be installed from the JBoss update site using either the Eclipse 3.5 Galileo or Eclipse 3.6 Helios releases. The Eclipse distributions can be downloaded from the <ulink url="http://eclipse.org/downloads/">Eclipse Web Site</ulink>.
+ </para>
+ <para>The JBoss BPEL Editor may also be installed as a stand-alone plug-in. See <ulink url="http://www.jboss.org/tools/download/installation.html">Installing JBoss Tools</ulink> for more information.</para>
+ </section>
+ <section>
+ <title>Prerequisites</title>
+ <para>For installation and configuring BPEL engine into a JBossAS environment
+ you will need the following: </para>
+ <itemizedlist>
+ <listitem>
+ <para> JBossAS (version 5.1.0.GA or higher),
+ available from <ulink url="http://www.jboss.org/jbossas"> http://www.jboss.org/jbossas</ulink>.</para>
+ </listitem>
+ <listitem>
+ <para>RiftSaw (version 2.0 or higher), available from <ulink url="http://www.jboss.org/riftsaw">http://www.jboss.org/riftsaw</ulink>.</para>
+ </listitem>
+ <listitem>
+ <para>Ant, available from <ulink url="http://ant.apache.org">here</ulink>.</para>
+ </listitem>
+ </itemizedlist>
+ </section>
+ <section id="installRuntime">
+ <title>BPEL (Riftsaw) Runtime</title>
+ <itemizedlist>
+ <listitem>
+ <para>Unpack the JBossAS installation archive into the required location.
+ </para>
+ </listitem>
+ <listitem>
+ <para>Unpack the RiftSaw distribution into the location
+ alongside the JBossAS installation:</para>
+ <itemizedlist>
+ <listitem>
+ <para>Edit the <property>install/deployment.properties</property> file to update
+ the JBossAS location settings.
+ </para>
+ </listitem>
+ <listitem>
+ <para>From the <property>install</property> folder,
+ run: <property>ant deploy -Ddatabase=hsql</property>
+ to deploy RiftSaw to JBossAS.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </listitem>
+ <listitem>
+ <para>Then in the
+ <property>${RiftSaw}/install</property> folder run the command:
+ <property>ant deploy -Ddatabase=hsql -Dws.stack=native -Dws.version=3.2.2.GA</property>
+ It will help you to download the web service stack, and then upgrade it for JBoss AS.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </section>
</chapter>
\ No newline at end of file
Modified: trunk/bpel/docs/reference/en-US/modules/overview.xml
===================================================================
--- trunk/bpel/docs/reference/en-US/modules/overview.xml 2010-07-14 00:02:21 UTC (rev 23394)
+++ trunk/bpel/docs/reference/en-US/modules/overview.xml 2010-07-14 00:52:09 UTC (rev 23395)
@@ -1,67 +1,29 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<chapter id="overview">
- <title>JBoss BPEL project Overview</title>
-
- <para>JBoss BPEL project is a WS-BPEL 2.0 project that gives a way to create, edit, validate and deploy BPEL files to JBoss BPEL runtime. It is based on Eclipse
- <ulink url="http://www.eclipse.org/bpel/">BPEL
- project </ulink>. </para>
-
- <para>It improves the Eclipse BPEL project in the following way: </para>
- <itemizedlist>
- <listitem><para> Implements close integration with JBoss BPEL runtime. Adds a new project type for the deployment to JBoss BPEL runtime.</para></listitem>
- <listitem><para> Supports two ways of deployment: one way is to deploy a bpel project directly to JBoss BPEL runtime. The other way is to deploy bpel files in JBoss ESB project to JBoss BPEL runtime. </para></listitem>
- <listitem><para> Improves the BPEL validator and increases Eclipse BPEL editor's quality. </para></listitem>
- </itemizedlist>
-
- <para>
- <ulink url="http://docs.oasis-open.org/wsbpel/2.0/OS/wsbpel-v2.0-OS.html">WS-BPEL 2.0</ulink>
- stands for Web Service Business Process Execution Language. Like EAI, BPEL is an XML-based language,
- but BPEL is more specific and targeted. A programmer uses BPEL to join sometimes
- disparate functions into an integrated process, resulting in a seamless use of the Internet to
- conduct business transactions ranging from simple money exchanges to complex calculations and
- asset reallocation.
- </para>
-
-<section>
- <title>Key Features of JBoss BPEL project</title>
- <para>Let's start with looking through the table of the main features of JBoss BPEL editor project: </para>
-
- <table>
-
- <title>Key Functionality for JBoss BPEL editor project</title>
- <tgroup cols="2">
- <colspec colnum="1" align="left" colwidth="2*"/>
- <colspec colnum="2" colwidth="4*"/>
- <thead>
- <row>
- <entry>Feature</entry>
- <entry>Benefit</entry>
-
- </row>
- </thead>
- <tbody>
- <row>
- <entry><para>WS-BPEL 2.0 support</para></entry>
- <entry><para>JBoss BPEL project supports the newest WS-BPEL 2.0 specifications. </para></entry>
- </row>
- <row>
- <entry><para>Close integration with JBoss BPEL runtime</para></entry>
- <entry><para>There are two ways to deploy BPEL files to JBoss BPEL runtime.
- The user can deploy a BPEL project as a whole and can deploy BPEL files in
- JBoss ESB project to JBoss BPEL runtime. </para></entry>
- </row>
- <row>
- <entry><para>BPEL file editor</para></entry>
- <entry><para>The user can use the editor separately to edit a BPEL file. </para></entry>
- </row>
- <row>
- <entry><para>BPEL file validator</para></entry>
- <entry><para>The validator can give the error messages about BPEL files to the user. </para></entry>
- </row>
- </tbody>
- </tgroup>
- </table>
-
-</section>
-
+<?xml version='1.0' encoding='ISO-8859-1'?><chapter id="overview">
+ <title>JBoss BPEL Tooling Overview</title>
+ <para>JBoss Tools now includes a BPEL (Business Process Execution Language) editor that is WS-BPEL 2.0 compliant.</para>
+ <para><footnote label="*">
+ <para>
+ <ulink url="http://docs.oasis-open.org/wsbpel/2.0/OS/wsbpel-v2.0-OS.html">WS-BPEL 2.0</ulink>
+ stands for Web Service Business Process Execution Language. Like EAI, BPEL is an XML-based language,
+ but BPEL is more specific and targeted. Typically, BPEL is used to "orchestrate" or join disparate web services into an integrated process, resulting in a seamless use of the Internet to
+ conduct business transactions ranging from simple money exchanges to complex calculations and
+ asset reallocation.</para>
+ </footnote>The editor is based on the Eclipse
+ <ulink url="http://www.eclipse.org/bpel/">BPEL project </ulink> with some additional enhancements and numerous bug fixes. In addition, a deployment framework allows BPEL processes to be deployed to, and executed by the Riftsaw BPEL execution engine which
+ is based on the Apache ODE engine (version 1.3.4 as of this writing). Please refer to the <ulink url="http://jboss.org/riftsaw">Riftsaw website</ulink> for more information.</para>
+ <para>Here are just some of the new features of the JBoss Tools BPEL editor: </para>
+ <itemizedlist>
+ <listitem>
+ <para>Close integration with the Riftsaw BPEL runtime: a new Eclipse project type has been defined to allow simple, one-click deployment.</para>
+ </listitem>
+ <listitem>
+ <para>Increased reliability and language validation over the Eclipse BPEL project.</para>
+ </listitem>
+ <listitem>
+ <para>Enhanced "New Process Wizard" that generates a complete, ready-to-run process on a local server without additional WSDL configuration.</para>
+ </listitem>
+ <listitem>
+ <para>Improved BPEL Console for simple monitoring and control of BPEL processes.</para>
+ </listitem>
+ </itemizedlist>
</chapter>
\ No newline at end of file
Modified: trunk/bpel/docs/reference/en-US/modules/reference.xml
===================================================================
--- trunk/bpel/docs/reference/en-US/modules/reference.xml 2010-07-14 00:02:21 UTC (rev 23394)
+++ trunk/bpel/docs/reference/en-US/modules/reference.xml 2010-07-14 00:52:09 UTC (rev 23395)
@@ -1,386 +1,379 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<chapter id="reference">
- <?dbhtml filename="reference.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Tools</keyword>
- <keyword>BPEL</keyword>
- <keyword>JBT</keyword>
- </keywordset>
- </chapterinfo>
- <title>Reference</title>
- <para>This chapter includes detailed reference information about all BPEL tools wizards and editors.</para>
+<?xml version='1.0' encoding='UTF-8'?><chapter id="reference">
+<?dbhtml filename="reference.html"?> <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Tools</keyword>
+ <keyword>BPEL</keyword>
+ <keyword>JBT</keyword>
+ </keywordset>
+ </chapterinfo>
+ <title>Reference</title>
+ <para>This chapter includes detailed reference information about all BPEL tools wizards and editors.</para>
+ <section>
+ <title>Wizards</title>
<section>
- <title>Wizards</title>
- <section>
- <title>New BPEL project Wizard</title>
- <para>This wizard helps to create new BPEL project.It is available with clicking
- <property>File->New->Other->BPEL project</property> in the menu bar.</para>
- <figure>
- <title>New BPEL Project Wizard</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/reference/bpel_ref_1.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>It consists of only one page:</para>
- <itemizedlist>
- <listitem><para>On the page you can adjust the name of the project and the directory where it will be created.</para>
- <para>If "<property>Use default</property>" option is checked the output directory will be the workspace,
+ <title>New BPEL project Wizard</title>
+ <para>This wizard helps to create new BPEL project.It is available with clicking
+ <property>File->New->Other->BPEL project</property> in the menu bar.</para>
+ <figure>
+ <title>New BPEL Project Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/reference/bpel_ref_1.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>It consists of only one page:</para>
+ <itemizedlist>
+ <listitem>
+ <para>On the page you can adjust the name of the project and the directory where it will be created.</para>
+ <para>If "<property>Use default</property>" option is checked the output directory will be the workspace,
othervise the user should specify it by himself using <property>Browse</property> button.</para>
- <figure>
- <title>New BPEL Project Wizard</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/reference/bpel_ref_2.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- </listitem>
- </itemizedlist>
- </section>
- <section>
- <title>Apache ODE Deployment Descriptor Wizard</title>
- <para>Using this wizard user can create ODE deployment descriptor (deploy.xml) and place it in the temporary directory.It is available with clicking
- <property>File->New->Other->Apache ODE Deployment Descriptor Wizard</property> in the menu bar.</para>
- <figure>
- <title>New BPEL Project Wizard</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/reference/bpel_ref_2a.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>On the page you can adjust the name of the deployment descriptor and
- the directory where it will be created.Note,that you should use <property>
- /PROJECT_NAME/bpelContent</property> directory as an output one.</para>
-
- </section>
- <section>
- <title>New BPEL Process file Wizard</title>
- <para>Using <property>New BPEL Process file Wizard</property>
+ <figure>
+ <title>New BPEL Project Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/reference/bpel_ref_2.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </listitem>
+ </itemizedlist>
+ </section>
+ <section>
+ <title>Apache ODE Deployment Descriptor Wizard</title>
+ <para>Using this wizard user can create ODE deployment descriptor (deploy.xml) and place it in the temporary directory.It is available with clicking
+ <property>File->New->Other->Apache ODE Deployment Descriptor Wizard</property> in the menu bar.</para>
+ <figure>
+ <title>New BPEL Project Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/reference/bpel_ref_2a.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>On the page you can adjust the name of the deployment descriptor and
+ the directory where it will be created.Note,that you should use <property> /PROJECT_NAME/bpelContent</property> directory as an output one.</para>
+ </section>
+ <section>
+ <title>New BPEL Process file Wizard</title>
+ <para>Using <property>New BPEL Process file Wizard</property>
user can create BPEL process file and WSDL file if it is necessary.
The wizard includes several pages:</para>
- <itemizedlist>
- <listitem><para>The first page has the following options to set:</para>
- <table>
- <title>New BPEL Process file Wizard. First Page Options.</title>
- <tgroup cols="3">
- <colspec colnum="1" align="left" colwidth="1*"/>
- <colspec colnum="2" align="left" colwidth="3*"/>
- <colspec colnum="3" align="left" colwidth="1*"/>
-
- <thead>
- <row>
- <entry>Option</entry>
- <entry>Description</entry>
- <entry>Default</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>Name</entry>
- <entry>Enter the process name.</entry>
- <entry>no default value</entry>
- </row>
-
-
- <row>
- <entry>Namespace</entry>
- <entry>Enter the namespace url here</entry>
- <entry>no default value</entry>
- </row>
-
- <row>
- <entry>Template</entry>
- <entry>Select one of the provided templates:
- <itemizedlist>
- <listitem><para><emphasis>Asynchronous BPEL Process</emphasis> -
+ <itemizedlist>
+ <listitem>
+ <para>The first page has the following options to set:</para>
+ <table>
+ <title>New BPEL Process file Wizard. First Page Options.</title>
+ <tgroup cols="3">
+ <colspec colnum="1" colwidth="1*" align="left"/>
+ <colspec colnum="2" colwidth="3*" align="left"/>
+ <colspec colnum="3" colwidth="1*" align="left"/>
+ <thead>
+ <row>
+ <entry>Option</entry>
+ <entry>Description</entry>
+ <entry>Default</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>Name</entry>
+ <entry>Enter the process name.</entry>
+ <entry>no default value</entry>
+ </row>
+ <row>
+ <entry>Namespace</entry>
+ <entry>Enter the namespace url here</entry>
+ <entry>no default value</entry>
+ </row>
+ <row>
+ <entry>Template</entry>
+ <entry>Select one of the provided templates: <itemizedlist>
+ <listitem>
+ <para><emphasis>Asynchronous BPEL Process</emphasis> -
generates the basis of orchestration logic: receive and reply activities
are included into the process;client WSDL is generated,
service is defined in the <property>parentlink</property> of the process.
The caller is notified asynchronously when the process completes.
- </para></listitem>
- <listitem><para><emphasis>Empty BPEL Process</emphasis> - list of services participating in this BPEL process together
- with the one of messages used within the process is empty.There are no any orchestration logic.</para></listitem>
- <listitem><para><emphasis>Synchronous BPEL Process</emphasis> -
+ </para>
+ </listitem>
+ <listitem>
+ <para><emphasis>Empty BPEL Process</emphasis> - list of services participating in this BPEL process together
+ with the one of messages used within the process is empty.There are no any orchestration logic.</para>
+ </listitem>
+ <listitem>
+ <para><emphasis>Synchronous BPEL Process</emphasis> -
similar to Asynchronous BPEL Process template except the fact that here
- the caller is notified synchronously when the process completes.</para></listitem>
- </itemizedlist></entry>
- <entry>Asynchronous BPEL Process</entry>
- </row>
- <row>
- <entry>Abstract Process</entry>
- <entry>Specifies the created process as an abstract one -partially
- specified processes that are not intended to be executed.</entry>
- <entry>unchecked</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- <figure>
- <title>New BPEL Process file Wizard</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/reference/bpel_ref_3.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- </listitem>
- <listitem><para>On the second page the user should select the BPEL project
+ the caller is notified synchronously when the process completes.</para>
+ </listitem>
+ </itemizedlist></entry>
+ <entry>Asynchronous BPEL Process</entry>
+ </row>
+ <row>
+ <entry>Abstract Process</entry>
+ <entry>Specifies the created process as an abstract one -partially specified processes that are not intended to be executed.</entry>
+ <entry>unchecked</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <figure>
+ <title>New BPEL Process file Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/reference/bpel_ref_3.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </listitem>
+ <listitem>
+ <para>The second page allows you to define the service endpoint and binding protocol:</para>
+ <figure>
+ <title>New BPEL Process file Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/reference/bpel_ref_3a.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </listitem>
+ <listitem>
+ <para>The third page is used to select the BPEL project
and folder where the process file will be created:</para>
- <figure>
- <title>New BPEL Process file Wizard</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/reference/bpel_ref_4.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- </listitem>
- </itemizedlist>
- <note>
- <para>Process files that are used in the BPEL project must be under the <property>bpelContent</property> folder. Only in this case
- these files can be deployed to JBoss server.
- </para>
- </note>
- </section>
+ <figure>
+ <title>New BPEL Process file Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/reference/bpel_ref_4.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </listitem>
+ </itemizedlist>
+ <note>
+ <para>Process files that are used in the BPEL project must be located in the <property>bpelContent</property> folder.</para>
+ </note>
</section>
+ </section>
+ <section>
+ <title>Editors</title>
<section>
- <title>Editors</title>
- <section>
- <title>Business Process Editor</title>
- <para>Business Process Editor is intended to facilitate the process of changing and
+ <title>Business Process Editor</title>
+ <para>Business Process Editor is intended to facilitate the process of changing and
adding new logic to BPEL process file.You can open <emphasis>.bpel</emphasis>
in this editor by right click the file in the project explorer and selecting
- <property>Open With...->Business Process Editor</property>
+ <property>Open With...->Business Process Editor</property>
</para>
+ <figure>
+ <title>Business Process Editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/reference/bpel_ref_5.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>The editor consists of two tabs:<property>Design</property> tab and <property>Source</property> tab.</para>
+ <section>
+ <title>Design tab</title>
+ <para>Design tab is the main part of Business Process Editor.It consists of 3 parts:</para>
+ <itemizedlist>
+ <listitem>
+ <para>Visual Pane:</para>
<figure>
- <title>Business Process Editor</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/reference/bpel_ref_5.png"/>
- </imageobject>
- </mediaobject>
+ <title>Visual Pane of Business Process Editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/reference/bpel_ref_6.png"/>
+ </imageobject>
+ </mediaobject>
</figure>
- <para>The editor consists of two tabs:<property>Design</property> tab and <property>Source</property> tab.</para>
- <section>
- <title>Design tab</title>
- <para>Design tab is the main part of Business Process Editor.It consists of 3 parts:</para>
- <itemizedlist>
- <listitem><para>Visual Pane:</para>
- <figure>
- <title>Visual Pane of Business Process Editor</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/reference/bpel_ref_6.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>The Visual Pane graphically displays the order in which the activities are executed.</para>
- </listitem>
- <listitem><para>Palette:</para>
- <figure>
- <title>Palette of Business Process Editor</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/reference/bpel_ref_7.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>The <property>Palette</property> represents different elements of the BPEL activities
+ <para>The Visual Pane graphically displays the order in which the activities are executed.</para>
+ </listitem>
+ <listitem>
+ <para>Palette:</para>
+ <figure>
+ <title>Palette of Business Process Editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/reference/bpel_ref_7.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>The <property>Palette</property> represents different elements of the BPEL activities
organized into functional categories.
Using it the user can easily add new elements to the sequence activity.
To do this,he should just click the required element and then drug
and drop it to the place on the Visual Pane where it should be added.</para>
- </listitem>
- <listitem><para>Behavior Components View:</para>
- <figure>
- <title>Behavior Components View of Business Process Editor</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/reference/bpel_ref_8.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Execution behavior components are grouped into the <property>
- Behavior Components View</property>.
+ </listitem>
+ <listitem>
+ <para>Behavior Components View:</para>
+ <figure>
+ <title>Behavior Components View of Business Process Editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/reference/bpel_ref_8.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Execution behavior components are grouped into the <property> Behavior Components View</property>.
The view is also fully syncronized with Properties view where you can customize all
the properties of the component.</para>
- <figure>
- <title>Process Structure View of Business Process Editor</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/reference/bpel_ref_9.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>To add an element to some component group click plus(<inlinemediaobject>
- <imageobject>
- <imagedata fileref="images/reference/bpel_ref_10.png"/>
- </imageobject>
- </inlinemediaobject>) icon,
+ <figure>
+ <title>Process Structure View of Business Process Editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/reference/bpel_ref_9.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>To add an element to some component group click plus(<inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/reference/bpel_ref_10.png"/>
+ </imageobject>
+ </inlinemediaobject>) icon,
for its deleting you should click the element and
- use its <property>Delete</property> option in the popup menu.</para>
- </listitem>
-
- </itemizedlist>
-
-
- </section>
- <section>
- <title>Source tab</title>
- <para>Source tab can be used for editing BPEL process file directly.
+ use its <property>Delete</property> option in the popup menu.</para>
+ </listitem>
+ </itemizedlist>
+ </section>
+ <section>
+ <title>Source tab</title>
+ <para>Source tab can be used for editing BPEL process file directly.
The validation of file structure is also available.
</para>
- <figure>
- <title>Validation error in Source tab</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/reference/bpel_ref_11.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>If the user wants to disable/unable validation he can do it by following
- <property>Window->Preferences->Validation</property>.</para>
- <figure>
- <title>Validation configuration</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/reference/bpel_ref_12.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
- </section>
- <section>
- <title>ODE Deployment Descriptor Editor</title>
- <para>To deploy your process in Ode you need to create a
+ <figure>
+ <title>Validation error in Source tab</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/reference/bpel_ref_11.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>If the user wants to disable/unable validation he can do it by following
+ <property>Window->Preferences->Validation</property>.</para>
+ <figure>
+ <title>Validation configuration</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/reference/bpel_ref_12.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ </section>
+ <section>
+ <title>ODE Deployment Descriptor Editor</title>
+ <para>To deploy your process in Ode you need to create a
simple deployment descriptor with basic information and
<property>ODE Deployment Descriptor Editor</property> facilitates the process of descriptor configuration.
You can see how the descriptor file,opened in the editor looks like on the picture below:
</para>
- <figure>
- <title>ODE Deployment Descriptor Editor</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/reference/bpel_ref_13.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>The table below describes the configuration options of the
+ <figure>
+ <title>ODE Deployment Descriptor Editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/reference/bpel_ref_13.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>The table below describes the configuration options of the
ODE Deployment Descriptor Editor:</para>
- <table>
- <title>ODE Deployment Descriptor Editor.Options.</title>
- <tgroup cols="3">
- <colspec colnum="1" align="left" colwidth="1*"/>
- <colspec colnum="2" align="left" colwidth="3*"/>
- <colspec colnum="3" align="left" colwidth="1*"/>
-
- <thead>
- <row>
- <entry>Section</entry>
- <entry>Options</entry>
- <entry>Description</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry morerows='1' valign='middle'><para>
- General</para></entry>
-
- <entry>This process is</entry>
- <entry>Select one of the provided options:
- <itemizedlist>
- <listitem>
- <para><emphasis>activated</emphasis>
+ <table>
+ <title>ODE Deployment Descriptor Editor.Options.</title>
+ <tgroup cols="3">
+ <colspec colnum="1" colwidth="1*" align="left"/>
+ <colspec colnum="2" colwidth="3*" align="left"/>
+ <colspec colnum="3" colwidth="1*" align="left"/>
+ <thead>
+ <row>
+ <entry>Section</entry>
+ <entry>Options</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry morerows="1" valign="middle">
+ <para>
+ General</para>
+ </entry>
+ <entry>This process is</entry>
+ <entry>Select one of the provided options: <itemizedlist>
+ <listitem>
+ <para><emphasis>activated</emphasis>
</para>
- </listitem>
- <listitem>
- <para><emphasis>deactivated</emphasis></para>
- </listitem>
- <listitem>
- <para><emphasis>retired</emphasis>
+ </listitem>
+ <listitem>
+ <para><emphasis>deactivated</emphasis></para>
+ </listitem>
+ <listitem>
+ <para><emphasis>retired</emphasis>
</para>
- </listitem>
- </itemizedlist></entry>
-
- </row>
- <row><entry>Run this process in memory</entry>
- <entry>for performance purposes,
- you can define the process as being
- executed only in-memory.</entry>
- </row>
-
- <row>
- <entry>Inbound Interfaces(Services)</entry>
- <entry>Associated Port</entry>
- <entry>Click Associated Port and the dropdown list with all available port names will appear.
- Select the one you need ,other fields will be filled automatically.
- This action configure the services
- provided by the process and
- bind each service to an endpoint
- </entry>
-
- </row>
-
- <row>
- <entry>Outbound Interfaces(Invokes)</entry>
- <entry>Associated Port</entry>
- <entry>Click Associated Port and the dropdown list with all available port names will appear.
- Select the one you need, other fields will be filled automatically.
- This action configure the services
- invoked by the process</entry>
- </row>
- <row>
- <entry>Process-level Monitoring Events</entry>
- <entry> <itemizedlist>
- <listitem><para>
+ </listitem>
+ </itemizedlist></entry>
+ </row>
+ <row>
+ <entry>Run this process in memory</entry>
+ <entry>for performance purposes, you can define the process as being executed only in-memory.</entry>
+ </row>
+ <row>
+ <entry>Inbound Interfaces(Services)</entry>
+ <entry>Associated Port</entry>
+ <entry>Click Associated Port and the dropdown list with all available port names will appear. Select the one you need ,other fields will be filled automatically. This action configure the services provided by the process and bind each service to an endpoint </entry>
+ </row>
+ <row>
+ <entry>Outbound Interfaces(Invokes)</entry>
+ <entry>Associated Port</entry>
+ <entry>Click Associated Port and the dropdown list with all available port names will appear. Select the one you need, other fields will be filled automatically. This action configure the services invoked by the process</entry>
+ </row>
+ <row>
+ <entry>Process-level Monitoring Events</entry>
+ <entry>
+ <itemizedlist>
+ <listitem>
+ <para>
<emphasis>None</emphasis>
- </para></listitem>
- <listitem>
- <para>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
<emphasis>All</emphasis>
</para>
- </listitem>
- <listitem>
- <para>
+ </listitem>
+ <listitem>
+ <para>
<emphasis>Selected</emphasis>:
</para>
- <itemizedlist>
- <listitem><para>Instance life cycle</para></listitem>
- <listitem><para>Activity life cycle</para></listitem>
- <listitem><para>Data handling</para></listitem>
- <listitem><para>Scope handling</para></listitem>
- <listitem><para>Correlation</para></listitem>
-
- </itemizedlist>
-
- </listitem>
- </itemizedlist>
- </entry>
- <entry>Using ODE's deployment descriptor, it's also
- possible to make events generation to
- filtrate which ones get created.
- All option just duplicates the default behaviour,
- when nothing is specified in the deployment.</entry>
- </row>
- <row>
- <entry>Scope-level Monitoring Events</entry>
- <entry>Scope</entry>
- <entry>This section makes it possible to
- define filtering for each scope of your process.
- </entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- </section>
-
+ <itemizedlist>
+ <listitem>
+ <para>Instance life cycle</para>
+ </listitem>
+ <listitem>
+ <para>Activity life cycle</para>
+ </listitem>
+ <listitem>
+ <para>Data handling</para>
+ </listitem>
+ <listitem>
+ <para>Scope handling</para>
+ </listitem>
+ <listitem>
+ <para>Correlation</para>
+ </listitem>
+ </itemizedlist>
+ </listitem>
+ </itemizedlist>
+ </entry>
+ <entry>Using ODE's deployment descriptor, it's also possible to make events generation to filtrate which ones get created. All option just duplicates the default behaviour, when nothing is specified in the deployment.</entry>
+ </row>
+ <row>
+ <entry>Scope-level Monitoring Events</entry>
+ <entry>Scope</entry>
+ <entry>This section makes it possible to define filtering for each scope of your process. </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
</section>
-
-
-</chapter>
-
+ </section>
+</chapter>
\ No newline at end of file
Modified: trunk/bpel/docs/reference/en-US/modules/summary.xml
===================================================================
--- trunk/bpel/docs/reference/en-US/modules/summary.xml 2010-07-14 00:02:21 UTC (rev 23394)
+++ trunk/bpel/docs/reference/en-US/modules/summary.xml 2010-07-14 00:52:09 UTC (rev 23395)
@@ -1,21 +1,14 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<chapter>
- <?dbhtml filename="summary.html"?>
- <title>Summary</title>
- <para>In conclusion, with this document you know all the capabilities of BPEL Tools
- and could easily start with them.
- The chapters above walked you through the steps on how to create and configure BPEL process and
- deployment descriptor files.
- If you have questions or suggestions concerned both the documentation and tools behavior,
- you are welcome to JBoss Tools Users forum.
- Please, use Jira to report bugs and requests on documentation.</para>
-
- <section>
- <title>Other relevant resources on the topic</title>
- <para>All JBoss Developer Studio/JBoss Tools release documentation you can find at
+<?xml version='1.0' encoding='ISO-8859-1'?><chapter>
+<?dbhtml filename="summary.html"?> <title>Summary</title>
+ <para>This document is just a very brief introduction to the JBoss BPEL tooling but it touches on many aspects of the associated tools and runtimes. A complete reference to the BPEL language and the Eclipse BPEL editor is available from various online resources, and is simply beyond the scope of this document.</para>
+ <para>If you have questions or suggestions concerning either the documentation or JBoss BPEL Tools,
+ please visit the JBoss Tools website.
+ Bug reports, feature requests and documentation enhancements should be submitted via the Jira bug tracking facility at this website.</para>
+ <section>
+ <title>Other relevant resources on the topic</title>
+ <para>All JBoss Developer Studio/JBoss Tools release documentation you can find at
<ulink url="http://docs.jboss.org/tools">http://docs.jboss.org/tools</ulink> in the corresponding release directory.
- </para>
- <para>The latest documentation builds are available at <ulink url="http://download.jboss.org/jbosstools/nightly-docs">http://download.jboss.org/jbosstools/nightly-docs</ulink>. </para>
-
- </section>
-</chapter>
+ </para>
+ <para>The latest documentation builds are available at <ulink url="http://download.jboss.org/jbosstools/nightly-docs">http://download.jboss.org/jbosstools/nightly-docs</ulink>. </para>
+ </section>
+</chapter>
\ No newline at end of file
Modified: trunk/bpel/docs/reference/en-US/modules/tasks.xml
===================================================================
--- trunk/bpel/docs/reference/en-US/modules/tasks.xml 2010-07-14 00:02:21 UTC (rev 23394)
+++ trunk/bpel/docs/reference/en-US/modules/tasks.xml 2010-07-14 00:52:09 UTC (rev 23395)
@@ -1,444 +1,477 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<chapter id="tasks">
- <title>Tasks</title>
- <section id="detail">
- <title>Creating and editing a BPEL project</title>
- <para>In the chapter we describe the necessary steps to create a new BPEL project and edit the BPEL files.
- You can get the source of the example from <property>
- riftsaw/samples/quickstart/hello_world</property>.
- Here and further in the guide we will create
- a simple echo example, used to respond to a sent message with a
- modified version of the request message being returned in a response.
- First of all, you should create a BPEL project.
+<?xml version='1.0' encoding='ISO-8859-1'?><chapter id="tasks">
+ <title>Tasks</title>
+ <section id="detail">
+ <title>Creating a BPEL Process</title>
+ <para>This chapter explains how to create a new BPEL project and BPEL process file.
+ You may either follow along with this document as we walk you through the procedure or, if you are the impatient type, you can simply import the "Hello World" project from the Riftsaw "quick start" examples. The sample project can be found in the
+ samples/quickstart/hello_world directory of the Riftsaw installation.
</para>
- <section id="createproject">
- <title>Creating a BPEL project</title>
- <para>Create the project by selecting
- <emphasis><property>New > Project... > BPEL 2.0 > BPEL Project</property></emphasis> from the menu bar.
- Then click the <property>Next</property> button.
+ <para>In this example we will build a simple BPEL process that accepts a message containing a single string input element, concatenates it with the string "Hello", and returns the result in the reply message which also consists of only a single string output element.</para>
+ <section id="createproject">
+ <title>Creating the BPEL Project</title>
+ <para>Create the project by selecting
+ <emphasis>
+ <property>File > New > Project... </property>
+ </emphasis> from the menu bar which will display the Eclipse New Project Wizard.
+ Scroll down to the BPEL 2.0 category, select <emphasis role="italic">BPEL Project </emphasis>and click the <property>Next</property> button.
</para>
- <figure>
- <title>New BPEL Project</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/detail_createproject_1.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>On this page of the <property>New BPEL Project Wizard</property> enter a project name in the <property>Project Name</property>
+ <figure>
+ <title>New BPEL Project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/detail_createproject_1.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>On this page of the <property>New BPEL Project Wizard</property> enter a project name in the <property>Project Name</property>
field,e.g enter <property>HelloWorld</property>.</para>
-
- <figure>
- <title>New BPEL Project Wizard</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/detail_createproject_2.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Click the <property>Finish</property> button.
+ <figure>
+ <title>New BPEL Project Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/detail_createproject_2.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Click the <property>Finish</property> button.
So you have created the BPEL project named <property>HelloWorld</property>.
- Its structure is like this: </para>
- <figure>
- <title>The BPEL Project structure</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/detail_createproject_3.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
- <section id="createprocess">
- <title>Creating a BPEL process</title>
- <para>Now you should create a BPEL process. You can create it by selecting
- <emphasis><property>New > Others... > BPEL 2.0 > New BPEL Process File</property></emphasis>.
+ Its structure looks like this: </para>
+ <figure>
+ <title>The BPEL Project structure</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/detail_createproject_3.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ <section id="createprocess">
+ <title>Creating the BPEL Process</title>
+ <para>The next step is to create a BPEL process. Select your newly created BPEL project and from the context (right-click) menu, select
+ <emphasis>
+ <property>New > Other... </property>
+ </emphasis> and then <emphasis role="italic">BPEL 2.0 > New BPEL Process File</emphasis> as shown below:</para>
+ <figure>
+ <title>New BPEL Process File</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/detail_createprocess_1.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Click the <property>Next</property> button. On the first page of the New BPEL Process Wizard, enter the following information:</para>
+ <table>
+ <title>Fields and values</title>
+ <tgroup cols="2">
+ <colspec colnum="1" colwidth="2*" align="left"/>
+ <colspec colnum="2" colwidth="4*"/>
+ <thead>
+ <row>
+ <entry>Field</entry>
+ <entry>Value</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>BPEL Process Name</para>
+ </entry>
+ <entry>
+ <para>enter a process name. For this example, <property>HelloWorld</property>.</para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>Namespace</para>
+ </entry>
+ <entry>
+ <para>enter or select a namespace for the BPEL process.</para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>Template</para>
+ </entry>
+ <entry>
+ <para>Select the desired template for the BPEL process.
+ The wizard can generate three different types processes from templates: Synchronous, Asynchronouse and Empty. For this example, select <property>Synchronous BPEL Process</property>.</para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <figure>
+ <title>New BPEL Process File Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/detail_createprocess_2.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>The next page allows you to define the process' endpoint; enter the following information:
</para>
- <figure>
- <title>New BPEL Process File</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/detail_createprocess_1.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Click the <property>Next</property> button. Enter the following information:</para>
- <table>
-
- <title>Fields and values</title>
- <tgroup cols="2">
- <colspec colnum="1" align="left" colwidth="2*"/>
- <colspec colnum="2" colwidth="4*"/>
- <thead>
- <row>
- <entry>Field</entry>
- <entry>Value</entry>
-
- </row>
- </thead>
- <tbody>
- <row>
- <entry><para>BPEL Process Name</para></entry>
- <entry><para>enter a process name. For example, <property>HelloWorld</property>.</para></entry>
- </row>
- <row>
- <entry><para>Namespace</para></entry>
- <entry><para>enter or select a namespace for the BPEL process.</para></entry>
- </row>
- <row>
- <entry><para>Template</para></entry>
- <entry><para>Select the necessary template for the BPEL process.
- When you select the template, you will see the information
- about the template below on the page.In our case you should
- select <property>Synchronous BPEL Process</property>.</para></entry>
- </row>
-
- </tbody>
- </tgroup>
- </table>
-
- <figure>
- <title>New BPEL Process File Wizard</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/detail_createprocess_2.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Click the <property>Next</property> button. On the second page make sure that the folder <property>HelloWorld/bpelContent</property> is selected.
- Click <property>Finish</property>.
- </para>
- <note>
- <para>All of your files that are used in your BPEL project must be under the <property>bpelContent</property> folder. Only in this case
- these files can be deployed to JBoss server.
+ <table>
+ <title>Fields and values</title>
+ <tgroup cols="2">
+ <colspec colnum="1" colwidth="2*" align="left"/>
+ <colspec colnum="2" colwidth="4*"/>
+ <thead>
+ <row>
+ <entry>Field</entry>
+ <entry>Value</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>Service Name</para>
+ </entry>
+ <entry>
+ <para>enter the name of the service which will be published by the JBoss Web Server. The default is the same as the process name, but this can be any name you choose. For this example, enter <property>HelloWorld</property>.</para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>Port Name</para>
+ </entry>
+ <entry>
+ <para>enter or the Service Port name. Again, this can be any name desired, but the default is the name of the service suffixed with "Port". </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>Service Address</para>
+ </entry>
+ <entry>
+ <para>enter the service URL. By default the wizard assumes that the process will be deployed to a local WS server and fills in the address "localhost:8080" (8080 is the default web service port).</para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>Binding Protocol</para>
+ </entry>
+ <entry>
+ <para>select the service binding protocl; either "HTTP" or "SOAP" By default the wizard assumes that the process will be deployed to a local WS server and fills in the address "localhost:8080" (8080 is the default web service port).</para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <figure>
+ <title>New BPEL Process File Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/detail_createprocess_2a.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>The last page selects the target project and directory for the new process. Click Finish to select the default location (i.e. your currently selected BPEL Project).</para>
+ <note>
+ <para>All BPEL artifacts (*.bpel, *.wsdl, *.xsd, etc.) must be contained in the <emphasis role="bold">
+ <property>bpelContent</property>
+ </emphasis> folder. This is required for proper deployment to the JBoss server.
</para>
- </note>
-
- <para>Up to now, you have got a simple BPEL process as on the screen below.</para>
- <figure>
- <title>A simple BPEL Process File</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/detail_createprocess_3.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>The next step, you can do is to edit the BPEL process file and then deploy it to JBoss server. </para>
- </section>
- <section id="editprocess">
- <title>Editing a BPEL process file</title>
- <para>If the <emphasis><property>Properties view</property></emphasis> and <emphasis><property>Palette view</property></emphasis> are not opened, you can open the views by right-clicking the BPEL editor and selecting
- <property>Show in Properties</property>, <property>Show Palette in Palette view</property>. Then you should have the view like this:
+ </note>
+ <para>You should now have the BPEL Editor open with the HelloWorld process as shown below.</para>
+ <figure>
+ <title>A simple BPEL Process File</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/detail_createprocess_3.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Notice that this process does not do much of anything; it simply contains a receive and a reply activity. The "FIX_ME" activity in the middle acts as a placeholder for you to insert all of your business logic. This is an "empty", do-nothing activity and can be deleted.</para>
+ </section>
+ <section id="editprocess">
+ <title>Editing a BPEL Process File</title>
+ <para>In this next step we will add some functionality to the HelloWorld process.</para>
+ <para>If the <emphasis>
+ <property>Properties view</property>
+ </emphasis> and <emphasis>
+ <property>Palette view</property>
+ </emphasis> are not already visible in your perspective, you can open the views by right-clicking the BPEL editor canvas and selecting <emphasis role="italic">Show in Properties</emphasis> and <emphasis role="italic">Show Palette in Palette view</emphasis>.</para>
+ <para>First, select the "FIX_ME" empty activity and press DEL to delete it - we won't be needing this. Now locate and click on the Assign activity in the Palette (this is located in the Actions drawer). The cursor changes to a "drop cursor" which will place the selected activity on the canvas when you click the left mouse button. Move the cursor between the receiveInput and replyOutput activities as shown below; note that an insert bar appears as you move the cursor up and down the sequence of activities, indicating the drop point for the new activity.</para>
+ <figure>
+ <title>The BPEL editor view</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/detail_editprocess_1.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Now left-click to drop the new Assign activity in place. Your workspace should look something like the figure below:</para>
+ <figure>
+ <title/>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/detail_editprocess_2.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Select the <emphasis>
+ <property>Properties view</property>
+ </emphasis>, and within that, the Details tab as shown above.</para>
+ <para>The table below describes the tabs of the Properties view:
</para>
- <figure>
- <title>The BPEL editor view</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/detail_editprocess_1.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>In the <emphasis><property>Palette view</property></emphasis>, you can drag a BPEL element to the BPEL editor and drop it in the place you want.</para>
- <para>In the <emphasis><property>Properties view</property></emphasis>, you can get the information about every element of the BPEL process.
- In the BPEL editor select any element you want,and then
- the element's properties will be shown in the Properties view.The table below describes the tabs of the Properties view:
- </para>
- <table>
-
- <title>Tabs of the Property view</title>
- <tgroup cols="2">
- <colspec colnum="1" align="left" colwidth="2*"/>
- <colspec colnum="2" colwidth="4*"/>
- <thead>
- <row>
- <entry>Tab</entry>
- <entry>Description</entry>
-
- </row>
- </thead>
- <tbody>
- <row>
- <entry><para>Description</para></entry>
- <entry><para>Shows the descriptive information about the element,e.g. <property>Name</property> of the element.</para></entry>
- </row>
- <row>
- <entry><para>Details</para></entry>
- <entry><para>Shows the detailed and important information about the element.
+ <table>
+ <title>Tabs of the Property view</title>
+ <tgroup cols="2">
+ <colspec colnum="1" colwidth="2*" align="left"/>
+ <colspec colnum="2" colwidth="4*"/>
+ <thead>
+ <row>
+ <entry>Tab</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>Description</para>
+ </entry>
+ <entry>
+ <para>Shows the descriptive information about the element,e.g. <property>Name</property> of the element.</para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>Details</para>
+ </entry>
+ <entry>
+ <para>Shows the detailed and important information about the element.
It is the most important section of an element.
- Most of the properties of an element are set in this section.</para></entry>
- </row>
- <row>
- <entry><para>Join Behavior</para></entry>
- <entry><para>Shows the <property>Join Failure</property> property of the element.</para></entry>
- </row>
- <row>
- <entry><para>Documentation</para></entry>
- <entry><para>Shows the <property>documentation</property> sub-element of an element.</para></entry>
- </row>
- <row>
- <entry><para>Other</para></entry>
- <entry><para>Every BPEL element has its own sections: Correlation section, Message Exchange section, and so on. We will
- introduce them while using them.</para></entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- <para>In order to see how a simple BPEL process works in action, you should do some steps as below: </para>
- <itemizedlist>
- <listitem>
- <para>Modify two variables of the process:</para>
- <itemizedlist>
- <listitem><para>Click on the details tab of the input variable,
- select <property>Browse...</property>.
- Then choose <property>string</property> primitive from the list.</para>
- <figure>
- <title>Edit variable in <property>process</property> file</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/bpel_task_1.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- </listitem>
- <listitem>
- <para>Select <property>xsd</property> as a namespace in the popup menu.</para>
- </listitem>
- </itemizedlist>
-
- </listitem>
- <listitem>
- <para>Add an <property>Assign</property> element between the <property>receiveInput</property> element and <property>replyOutput</property> element.</para>
- </listitem>
- <listitem>
- <para>Click the <property>Assign</property> element in the BPEL editor in order to get the properties information of it in the Properties view.
- </para>
- </listitem>
- <listitem>
- <para>Set its name in the <property>Description</property> tab as <property>assignHelloMesg</property>.</para>
- <para>In the <property>Details</property> section of Properties view,
- you should click the <property>New</property> button to add a <property>copy</property> sub-element to the element.
- Assign "Variable to Variable"(input:string to output). At this time, an "<property>initializer</property>" popup dialog appears. Click on the <property>Yes</property> button in the dialog.
- </para>
- <figure>
- <title>Add <property>Assign</property> to the process</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/bpel_task_3.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Then you should click <property>New</property> once more and select Expression to Variable
- (assign <code>concat($input,' World'))</code> to <property>result:string</property>. </para>
- <figure>
- <title>Add <property>Expression assign</property> to the process</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/bpel_task_2.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- </listitem>
- </itemizedlist>
- </section>
-
- <section id="wsdl">
- <title>Adding Service to WSDL file</title>
- <para></para>
- <itemizedlist>
-
- <listitem>
- <para>Open the file "<property>HelloWorldArtifacts.wsdl</property>" in the "<property>HelloWorld</property>" project by double-clicking the file. Right-click the WSDL editor and select
- <property>Add Service</property>. A new service should appear in the editor. Name it <property>HelloWorldProcessService</property>. It has the Port
- named <property>NewPort</property>. Select it, right-click on it and rename it to <property>HelloWorldProcessPort</property> in the Properties
- view.
- </para>
- <figure>
- <title>Add <property>Service</property> to the WSDL file</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/detail_editprocess_3.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- </listitem>
- <listitem>
- <para>Right-click somewhere in the whitespace of the WSDL editor and select
- <property>Add Binding</property>. A new Binding component will appear in the editor. Name it <property>HelloWorldSOAPBinding</property>. Select it, in the
- General tab of the Properties view and select <property>HelloWorld</property> as a port type in the <property>PortType</property>. Then click on the
- <property>Generate Binding Content...</property> button to open the <property>Binding Wizard</property>. In the wizard, select <property>SOAP </property>
- as the <property>Protocol</property>. Finally, click the <property>Finish</property> button to close the wizard.
- </para>
- <figure>
- <title>Add a <property>Binding</property> to the WSDL file</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/detail_editprocess_4.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- </listitem>
- <listitem>
- <para>Click the <property>HelloWorldProcessPort</property> property in the General section of the Properties view, select <property>HelloWorldSOAPBinding</property> in
- the <property>Binding</property> combobox. In the <property>Address</property> field input <ulink url="http://localhost:8080/bpel/processes/HelloWorld?wsdl">http://localhost:8080/bpel/processes/HelloWorld?wsdl</ulink>.
- </para>
- <figure>
- <title>Add the <property>HelloWorldSOAPBinding</property> to the <property>HelloWorldProcessPort</property></title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/detail_editprocess_5.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- </listitem>
- <listitem><para>You should also change some service part configurations.
- To do this,click part element in the WSDL editor,
- then put the following data in the Properties view.
- </para>
- <figure>
- <title>Configuration of service part</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/detail_editprocess_5.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- </listitem>
- </itemizedlist>
-
- <para>Now you have finished creating a simple BPEL process.As a next step, you can deploy the BPEL project to JBoss BPEL Runtime.</para>
-
- </section>
-
+ Most of the properties of an element are set in this section.</para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>Join Behavior</para>
+ </entry>
+ <entry>
+ <para>Shows the <property>Join Failure</property> property of the element.</para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>Documentation</para>
+ </entry>
+ <entry>
+ <para>Shows the <property>documentation</property> sub-element of an element.</para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>Other</para>
+ </entry>
+ <entry>
+ <para>Every BPEL element has its own sections: Correlation section, Message Exchange section, and so on. We will
+ introduce them while using them.</para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <para>The next step is to add the XPath expressions that will build our reply message. From the Details tab of the Property view for the Assign activity, click New. This will add an empty row to the Assignment activity:</para>
+ <figure>
+ <title/>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/detail_assign1.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>In the "From:" group, select Expression and use "Same as Process" for the Expression Language (the default). Then, type the following XPath expression in the edit box:</para>
+ <para><code>concat("Hello",$input.payload/tns:input)</code></para>
+ <para>As you type the expression, notice that the Expression Editor pops up a tooltip containing a list of known functions, variables and message parts that match the characters you just typed.</para>
+ <para><note>
+ <para>Currently the BPEL editor only supports XPath 1.0. Support for XPath 2.0 is planned as an enhancement for future versions.</para>
+ </note></para>
+ <para>Next, in the "To:" group, expand the "output" message, then the "payload" part and finally the "result" element in the message. This element is the target for the results of the concat() XPath function you entered in the "From:" group.</para>
+ <para>The Property view should now look like this:</para>
+ <figure>
+ <title/>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/detail_assign2.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>After you change focus by clicking anywhere outside of the "To:" item you have just selected, the BPEL editor will ask if you would like to initialize the output variable. </para>
+ <figure>
+ <title/>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/detail_assign3.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>This is generally a good idea because it initializes the structure of the output message and without it, the ODE BPEL engine will report a mysterious "bpel:selectionFailure" exception.</para>
+ <note>
+ <para>The changes made in the Properties view are not reflected in the BPEL Editor's main canvas until you change focus to the canvas. Because the Properties view is just a view, it does not understand keyboard shortcuts like CTRL-S to save the BPEL Editor. </para>
+ </note>
</section>
- <section id="deploy">
- <title>Deploy a JBoss BPEL project to JBoss BPEL Runtime</title>
- <section id="createdeploy">
- <title>Creating a bpel-deploy.xml file</title>
- <para>If you want to deploy a BPEL project to JBoss BPEL Runtime, you should create a bpel-deploy.xml file.
- JBoss tools can help you to create it:
- </para>
- <itemizedlist>
- <listitem>
- <para>Create the bpel-deploy.xml by selecting
- <emphasis><property>New > Other... > BPEL 2.0 > Apache ODE Deployment Descriptor</property></emphasis>. Click the <property>Next</property> button.
- </para>
- <figure>
- <title>New BPEL Deploy file</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/deploy_createdeploy_1.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- </listitem>
- <listitem>
- <para>On the next wizard page you should enter the following information:</para>
- <para><emphasis><property>BPEL Project</property></emphasis>: Click the <property>Browse...</property> button to select the BPEL project in your workspace which you want to deploy to the runtime.
+ </section>
+ <section id="deploy">
+ <title>Deploying a BPEL Project</title>
+ <section id="createdeploy">
+ <title>Creating the Deployment File</title>
+ <para>The deployment framework requires a description file which defines the BPEL services and interface definitions that are to be installed in the BPEL runtime server. This description file is called bpel-deploy.xml and is created using the Eclipse New File wizard.
+</para>
+ <itemizedlist>
+ <listitem>
+ <para>Select the BPEL project in which you wish to create the descriptor, then select
+ <emphasis>
+ <property>New > Other... > BPEL 2.0 > Apache ODE Deployment Descriptor</property>
+ </emphasis>. </para>
+ <para><figure>
+ <title>New BPEL Deploy file</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/deploy_createdeploy_1.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>. </para>
+ </listitem>
+ <listitem>
+ <para>On the next wizard page, enter the following information:</para>
+ <para><emphasis>
+ <property>BPEL Project</property>
+ </emphasis>: Click the <property>Browse...</property> button to select the BPEL project in your workspace which you want to deploy to the runtime.
Please note, that you should select the <property>bpelContent</property> folder in your new BPEL project as a value of <property>BPEL Project</property> field because the bpel-deploy.xml should be created in this place.
</para>
- <para><emphasis><property>File name</property></emphasis>: The default value is bpel-deploy.xml. Please, don't change it.</para>
- <para>Click on <property>Finish</property> button to close the wizard and a new bpel-deploy.xml file will be created.</para>
- <figure>
- <title>New BPEL Deploy file Wizard</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/deploy_createdeploy_2.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- </listitem>
- <listitem>
- <para>Double-click the bpel-deploy.xml file to open it in ODE Descriptor Deployment Editor.
+ <para><emphasis>
+ <property>File name</property>
+ </emphasis>: This field is read-only and can not be changed.</para>
+ <para>Click on <property>Finish</property> button to close the wizard and a new bpel-deploy.xml file will be created.</para>
+ <figure>
+ <title>New BPEL Deploy file Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/deploy_createdeploy_2.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </listitem>
+ <listitem>
+ <para>Double-click the bpel-deploy.xml file to open it in ODE Descriptor Deployment Editor.
In the <property>Inbound Interfaces</property> section, click the
- <property>Associated Port</property> column and select <property>HelloWorldProcessPort</property>
+ <property>Associated Port</property> column and select <property>HelloWorldPort</property>
in the dropdown box.The <property>Related Service</property> and <property>Binding Used</property>
- columns should be automatically filled in. Save the <emphasis><property>bpel-deploy.xml</property></emphasis>.
+ columns should be automatically filled in. Save the <emphasis>
+ <property>bpel-deploy.xml</property>
+ </emphasis>.
</para>
- <figure>
- <title>bpel-deploy.xml file editor</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/deploy_createdeploy_3.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- </listitem>
- </itemizedlist>
- </section>
- <section id="createruntime">
- <title>Creating JBoss BPEL Server</title>
- <para>Suppose you have installed the <property>JBoss BPEL Runtime-RiftSaw</property> as it was described <link linkend="installRuntime">before</link>, now you can create a server for JBoss BPEL runtime.</para>
- <itemizedlist>
- <listitem>
- <para>Open the <property>Servers</property> view by selecting
- <emphasis><property>Windows > Show View > Other... > Server > Servers</property></emphasis>.
- </para>
- </listitem>
- <listitem>
- <para>Right-click the Servers view and select
- <emphasis><property>New > Server</property></emphasis> to open the New Server Wizard:
+ <figure>
+ <title>bpel-deploy.xml file editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/deploy_createdeploy_3.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </listitem>
+ </itemizedlist>
+ </section>
+ <section id="createruntime">
+ <title>Creating the Server Instance</title>
+ <para>Assuming you have installed the <property>JBoss BPEL Runtime (RiftSaw)</property> as described <link linkend="installRuntime">previously</link>, the next step is to create a Server Definition for it.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Open the <property>Servers</property> view by selecting
+ <emphasis>
+ <property>Windows > Show View > Other... > Server > Servers</property>
+ </emphasis>.
</para>
- <figure>
- <title>New Server Wizard</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/deploy_createdeploy_4.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- </listitem>
- <listitem>
- <para>Select <property>JBoss AS 5.1 </property>as a server type. </para>
- <note>
- <para>Please note, that only JBoss As 5.1 or higher version supports BPEL.</para>
- </note>
- </listitem>
- <listitem>
-
- <para>Click the <property>Next</property> button. On the next page, you should input your <emphasis><property>JBoss As</property></emphasis> location. Then click the <property>Next</property> button and
- you will get the page like this:
+ </listitem>
+ <listitem>
+ <para>Right-click the Servers view and select
+ <emphasis>
+ <property>New > Server</property>
+ </emphasis> to open the New Server Wizard:
</para>
- <figure>
- <title>Add resource to the server</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/deploy_createdeploy_5.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- </listitem>
- <listitem>
- <para>Select <property>HelloWorld</property>, then click the <property>Add </property> button to add the project to the server.
+ <figure>
+ <title>New Server Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/deploy_createdeploy_4.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </listitem>
+ <listitem>
+ <para>Select <property>JBoss AS 5.1 </property>as a server type. </para>
+ <note>
+ <para>Please note, that only JBoss As 5.1 or higher version supports BPEL.</para>
+ </note>
+ </listitem>
+ <listitem>
+ <para>Click the <property>Next</property> button. On the next page, enter the file system directory where <emphasis>
+ <property>JBoss As</property>
+ </emphasis>was installed, then click the <property>Next</property> button. This will display the Server Deployment dialog as shown below:
+ </para>
+ <figure>
+ <title>Add resource to the server</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/deploy_createdeploy_5.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </listitem>
+ <listitem>
+ <para>Select <property>HelloWorld</property>, then click the <property>Add </property> button to add the project to the server.
Then click on the <property>Finish</property> button.
</para>
- <para>Start the server by right-clicking on the server and selecting the <property>Start</property> item. </para>
-
- <figure>
- <title>The started server</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/deploy_createdeploy_6.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>If some aspects of server creation is not clear, please, read <ulink url="http://download.jboss.org/jbosstools/nightly-docs/en/as/html_single/index...">JBoss Server Manager Reference Guide</ulink> for more details.</para>
- </listitem>
- <listitem>
- <para>You can enter the link <ulink url="http://localhost:8080/bpel/processes.html">http://localhost:8080/bpel/processes.html</ulink> to the browser to get the deployed processes.</para>
- <figure>
- <title>The BPEL console</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/deploy_createdeploy_7.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- </listitem>
- </itemizedlist>
- <para>If there's anything we didn't cover or you can't figure out, please feel free to visit our <ulink
- url="http://www.jboss.com/index.html?module=bb&op=viewforum&f=201"
- >JBoss Tools Users Forum</ulink> to ask questions.
- There we are also waiting for your suggestions and comments.</para>
- </section>
+ <note>
+ <para>The Server Deployment (Add and Remove) dialog can also be displayed by right-clicking on the desired entry in the Servers view.
+ </para>
+ </note>
+ <para>Start the server by right-clicking on the JBoss server entry and selecting the <property>Start</property> item. </para>
+ <figure>
+ <title>Servers view after starting JBoss AS</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/deploy_createdeploy_6.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Please refer to the <ulink url="http://download.jboss.org/jbosstools/nightly-docs/en/as/html_single/index...">JBoss Server Manager Reference Guide</ulink> for more information about server management.</para>
+ </listitem>
+ </itemizedlist>
</section>
-</chapter>
+ <section>
+ <title>Monitoring BPEL Processes</title>
+ <para>A BPEL process management and monitoring console is installed as part of the Riftsaw runtime. This console can be viewed using any standard internet browser by navigating to the JBoss AS server URL. By default, the BPEL console listens on port 8080 but this is configurable.</para>
+ <para>In our example we have installed the server on the local machine, so the BPEL console should be at <ulink url="http://localhost:8080/bpel-console">http://localhost:8080/bpel-console</ulink> . This will display the console's login screen. The default installation creates a single administrative user login
+identified by "admin" and "password" (again, these are configurable - see the Riftsaw documentation for more information):</para>
+ <figure>
+ <title>The BPEL console login page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/deploy_createdeploy_7.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>After successful login, the console displays a list of active processes, and other detailed information:</para>
+ <figure>
+ <title>The BPEL processes page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/deploy_createdeploy_8.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Select the <emphasis role="bold">Runtime</emphasis> link at the bottom to display the deployed process versions. Note that it is possible to deploy multiple versions of the same process, but only one version can be the active one. To activate or deactivate (retire) a particular version, select it in the Deployment list, then click the <emphasis role="bold">Activate</emphasis> or <emphasis role="bold">Retire</emphasis> buttons at the bottom of the console.</para>
+ <figure>
+ <title>The BPEL deployments page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/deploy_createdeploy_9.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ </section>
+</chapter>
\ No newline at end of file
15 years, 9 months
JBoss Tools SVN: r23394 - trunk.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2010-07-13 20:02:21 -0400 (Tue, 13 Jul 2010)
New Revision: 23394
Modified:
trunk/parent-pom.xml
trunk/pom.xml
Log:
coverage report generation added at the end of build, to have it in on file and let hudson record it
Modified: trunk/parent-pom.xml
===================================================================
--- trunk/parent-pom.xml 2010-07-13 23:19:51 UTC (rev 23393)
+++ trunk/parent-pom.xml 2010-07-14 00:02:21 UTC (rev 23394)
@@ -558,6 +558,7 @@
<infileset dir="${project.build.directory}/emma" includes="*.es,*.em" />
<txt outfile="${project.build.directory}/emma/coverage.txt" />
<xml outfile="${project.build.directory}/emma/coverage.xml" />
+ <html outfile="${project.build.directory}/emma/coverage.html" />
</report>
</emma>
<loadfile property="emma.txt"
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-07-13 23:19:51 UTC (rev 23393)
+++ trunk/pom.xml 2010-07-14 00:02:21 UTC (rev 23394)
@@ -44,9 +44,22 @@
<module>jbpm</module>
<!-- NOTE: To build drools, must first bootstrap with ant script: cd drools;
ant -q -->
- <module>drools</module>
+ <!--module>drools</module-->
<module>site</module>
</modules>
+<profiles>
+<profile>
+ <id>emma-coverage</id>
+ <activation>
+ <property>
+ <name>coverage</name>
+ </property>
+ </activation>
+ <modules>
+ <module>build/reports/emma-coverage</module>
+ </modules>
+</profile>
+</profiles>
</project>
15 years, 9 months
JBoss Tools SVN: r23393 - trunk/jmx/tests/org.jboss.tools.jmx.ui.test/src/org/jboss/tools/jmx/ui.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2010-07-13 19:19:51 -0400 (Tue, 13 Jul 2010)
New Revision: 23393
Removed:
trunk/jmx/tests/org.jboss.tools.jmx.ui.test/src/org/jboss/tools/jmx/ui/JMXUIAllTests.java
Log:
jmx.ui test packages were renamed to exclude them from test reports
Deleted: trunk/jmx/tests/org.jboss.tools.jmx.ui.test/src/org/jboss/tools/jmx/ui/JMXUIAllTests.java
===================================================================
--- trunk/jmx/tests/org.jboss.tools.jmx.ui.test/src/org/jboss/tools/jmx/ui/JMXUIAllTests.java 2010-07-13 23:18:37 UTC (rev 23392)
+++ trunk/jmx/tests/org.jboss.tools.jmx.ui.test/src/org/jboss/tools/jmx/ui/JMXUIAllTests.java 2010-07-13 23:19:51 UTC (rev 23393)
@@ -1,14 +0,0 @@
-package org.jboss.tools.jmx.ui;
-import org.jboss.tools.jmx.ui.internal.MBeanUtilsTestCase;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-
-public class JMXUIAllTests {
- public static Test suite() {
- TestSuite suite = new TestSuite();
- suite.addTestSuite(MBeanUtilsTestCase.class);
- return suite;
- }
-}
15 years, 9 months
JBoss Tools SVN: r23392 - in trunk/jmx/tests: org.jboss.tools.jmx.ui.test/src/org/jboss/tools/jmx/ui and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2010-07-13 19:18:37 -0400 (Tue, 13 Jul 2010)
New Revision: 23392
Added:
trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/test/ErrorRootTest.java
trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/test/ImpactTest.java
trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/test/JMXExceptionTest.java
trunk/jmx/tests/org.jboss.tools.jmx.ui.test/src/org/jboss/tools/jmx/ui/internal/test/
trunk/jmx/tests/org.jboss.tools.jmx.ui.test/src/org/jboss/tools/jmx/ui/internal/test/MBeanUtilsTestCase.java
trunk/jmx/tests/org.jboss.tools.jmx.ui.test/src/org/jboss/tools/jmx/ui/test/
trunk/jmx/tests/org.jboss.tools.jmx.ui.test/src/org/jboss/tools/jmx/ui/test/JMXUIAllTests.java
Removed:
trunk/jmx/tests/org.jboss.tools.jmx.ui.test/src/org/jboss/tools/jmx/ui/internal/MBeanUtilsTestCase.java
Modified:
trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/test/JMXCoreAllTests.java
Log:
increase JMX code coverage a little to test coverage report
Added: trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/test/ErrorRootTest.java
===================================================================
--- trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/test/ErrorRootTest.java (rev 0)
+++ trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/test/ErrorRootTest.java 2010-07-13 23:18:37 UTC (rev 23392)
@@ -0,0 +1,14 @@
+package org.jboss.tools.jmx.core.test;
+
+import junit.framework.TestCase;
+
+import org.jboss.tools.jmx.core.tree.ErrorRoot;
+
+public class ErrorRootTest extends TestCase {
+
+ public void testErrorRootConstructor() {
+ // there should be no exceptions
+ new ErrorRoot();
+ }
+
+}
Property changes on: trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/test/ErrorRootTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/test/ImpactTest.java
===================================================================
--- trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/test/ImpactTest.java (rev 0)
+++ trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/test/ImpactTest.java 2010-07-13 23:18:37 UTC (rev 23392)
@@ -0,0 +1,25 @@
+package org.jboss.tools.jmx.core.test;
+
+import static org.junit.Assert.*;
+
+import javax.management.MBeanOperationInfo;
+
+import junit.framework.TestCase;
+
+import org.jboss.tools.jmx.core.Impact;
+import org.junit.Test;
+
+public class ImpactTest extends TestCase{
+
+ public void testImpactParseInt() {
+ Impact impact = Impact.parseInt(MBeanOperationInfo.ACTION);
+ assertEquals(Impact.ACTION,impact);
+ impact = Impact.parseInt(MBeanOperationInfo.ACTION_INFO);
+ assertEquals(Impact.ACTION_INFO,impact);
+ impact = Impact.parseInt(MBeanOperationInfo.INFO);
+ assertEquals(Impact.INFO,impact);
+ impact = Impact.parseInt(MBeanOperationInfo.UNKNOWN);
+ assertEquals(Impact.UNKNOWN,impact);
+ }
+
+}
Property changes on: trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/test/ImpactTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/test/JMXCoreAllTests.java
===================================================================
--- trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/test/JMXCoreAllTests.java 2010-07-13 22:35:34 UTC (rev 23391)
+++ trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/test/JMXCoreAllTests.java 2010-07-13 23:18:37 UTC (rev 23392)
@@ -12,5 +12,8 @@
super("JMX Core All Tests");
addTest(new TestSuite(DefaultProviderTest.class));
addTest(new TestSuite(NodeBuilderTestCase.class));
+ addTestSuite(JMXExceptionTest.class);
+ addTestSuite(ImpactTest.class);
+ addTestSuite(ErrorRootTest.class);
}
}
Added: trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/test/JMXExceptionTest.java
===================================================================
--- trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/test/JMXExceptionTest.java (rev 0)
+++ trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/test/JMXExceptionTest.java 2010-07-13 23:18:37 UTC (rev 23392)
@@ -0,0 +1,24 @@
+package org.jboss.tools.jmx.core.test;
+
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+import junit.framework.TestCase;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.jboss.tools.jmx.core.JMXActivator;
+import org.jboss.tools.jmx.core.JMXException;
+import org.junit.Test;
+
+public class JMXExceptionTest extends TestCase{
+
+ public void testJMXExceptionGetStatus() {
+ JMXException ex = new JMXException(new Status(IStatus.ERROR,JMXActivator.PLUGIN_ID,"Test message"));
+ assertTrue(ex.getStatus().getSeverity() == IStatus.ERROR);
+ ex = new JMXException(new Status(IStatus.INFO,JMXActivator.PLUGIN_ID,"Test message"));
+ assertTrue(ex.getStatus().getSeverity() == IStatus.INFO);
+ ex = new JMXException(new Status(IStatus.OK,JMXActivator.PLUGIN_ID,"Test message"));
+ assertTrue(ex.getStatus().getSeverity() == IStatus.OK);
+ }
+
+}
Property changes on: trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/test/JMXExceptionTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: trunk/jmx/tests/org.jboss.tools.jmx.ui.test/src/org/jboss/tools/jmx/ui/internal/MBeanUtilsTestCase.java
===================================================================
--- trunk/jmx/tests/org.jboss.tools.jmx.ui.test/src/org/jboss/tools/jmx/ui/internal/MBeanUtilsTestCase.java 2010-07-13 22:35:34 UTC (rev 23391)
+++ trunk/jmx/tests/org.jboss.tools.jmx.ui.test/src/org/jboss/tools/jmx/ui/internal/MBeanUtilsTestCase.java 2010-07-13 23:18:37 UTC (rev 23392)
@@ -1,101 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Jeff Mesnil
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *******************************************************************************/
-
-package org.jboss.tools.jmx.ui.internal;
-
-import org.jboss.tools.jmx.ui.internal.MBeanUtils;
-
-import junit.framework.TestCase;
-
-public class MBeanUtilsTestCase extends TestCase {
-
- public void testNullValue() throws Exception {
- assertNull(MBeanUtils.getValue(null, "whatever")); //$NON-NLS-1$
- assertNull(MBeanUtils.getValue("whatever", null)); //$NON-NLS-1$
- assertNull(MBeanUtils.getValue(null, null));
- }
-
- public void testNonPrimitiveType() throws Exception {
- String value = "any value"; //$NON-NLS-1$
- assertEquals(value, MBeanUtils.getValue(value, "java.util.Vector")); //$NON-NLS-1$
- }
-
- public void testBooleanValue() throws Exception {
- assertEquals(Boolean.TRUE, MBeanUtils.getValue("true", "boolean")); //$NON-NLS-1$ //$NON-NLS-2$
- assertEquals(Boolean.FALSE, MBeanUtils.getValue("false", "boolean")); //$NON-NLS-1$ //$NON-NLS-2$
- assertEquals(Boolean.FALSE, MBeanUtils.getValue("whatever", "boolean")); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- public void testByteValue() throws Exception {
- assertEquals((byte) 0, MBeanUtils.getValue("0", "byte")); //$NON-NLS-1$ //$NON-NLS-2$
- assertEquals((byte) 1, MBeanUtils.getValue("1", "byte")); //$NON-NLS-1$ //$NON-NLS-2$
- try {
- MBeanUtils.getValue("whatever", "byte"); //$NON-NLS-1$ //$NON-NLS-2$
- fail();
- } catch (NumberFormatException e) {
-
- }
- }
-
- public void testCharValue() throws Exception {
- assertEquals('a', MBeanUtils.getValue("a", "char")); //$NON-NLS-1$ //$NON-NLS-2$
- assertEquals('o', MBeanUtils.getValue("only take the first char", //$NON-NLS-1$
- "char")); //$NON-NLS-1$
- }
-
- public void testShortValue() throws Exception {
- assertEquals((short) 1, MBeanUtils.getValue("1", "short")); //$NON-NLS-1$ //$NON-NLS-2$
- try {
- MBeanUtils.getValue("not a short", "short"); //$NON-NLS-1$ //$NON-NLS-2$
- fail();
- } catch (NumberFormatException e) {
-
- }
- }
-
- public void testIntValue() throws Exception {
- assertEquals(1, MBeanUtils.getValue("1", "int")); //$NON-NLS-1$ //$NON-NLS-2$
- try {
- MBeanUtils.getValue("not a int", "int"); //$NON-NLS-1$ //$NON-NLS-2$
- fail();
- } catch (NumberFormatException e) {
-
- }
- }
-
- public void testLongValue() throws Exception {
- assertEquals((long) 1, MBeanUtils.getValue("1", "long")); //$NON-NLS-1$ //$NON-NLS-2$
- try {
- MBeanUtils.getValue("not a long", "long"); //$NON-NLS-1$ //$NON-NLS-2$
- fail();
- } catch (NumberFormatException e) {
-
- }
- }
-
- public void testFloatValue() throws Exception {
- assertEquals(1.0f, MBeanUtils.getValue("1", "float")); //$NON-NLS-1$ //$NON-NLS-2$
- try {
- MBeanUtils.getValue("not a float", "float"); //$NON-NLS-1$ //$NON-NLS-2$
- fail();
- } catch (NumberFormatException e) {
-
- }
- }
-
- public void testDoubleValue() throws Exception {
- assertEquals(1.0, MBeanUtils.getValue("1", "double")); //$NON-NLS-1$ //$NON-NLS-2$
- try {
- MBeanUtils.getValue("not a double", "double"); //$NON-NLS-1$ //$NON-NLS-2$
- fail();
- } catch (NumberFormatException e) {
-
- }
- }
-
-}
Copied: trunk/jmx/tests/org.jboss.tools.jmx.ui.test/src/org/jboss/tools/jmx/ui/internal/test/MBeanUtilsTestCase.java (from rev 23391, trunk/jmx/tests/org.jboss.tools.jmx.ui.test/src/org/jboss/tools/jmx/ui/internal/MBeanUtilsTestCase.java)
===================================================================
--- trunk/jmx/tests/org.jboss.tools.jmx.ui.test/src/org/jboss/tools/jmx/ui/internal/test/MBeanUtilsTestCase.java (rev 0)
+++ trunk/jmx/tests/org.jboss.tools.jmx.ui.test/src/org/jboss/tools/jmx/ui/internal/test/MBeanUtilsTestCase.java 2010-07-13 23:18:37 UTC (rev 23392)
@@ -0,0 +1,101 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Jeff Mesnil
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
+
+package org.jboss.tools.jmx.ui.internal.test;
+
+import org.jboss.tools.jmx.ui.internal.MBeanUtils;
+
+import junit.framework.TestCase;
+
+public class MBeanUtilsTestCase extends TestCase {
+
+ public void testNullValue() throws Exception {
+ assertNull(MBeanUtils.getValue(null, "whatever")); //$NON-NLS-1$
+ assertNull(MBeanUtils.getValue("whatever", null)); //$NON-NLS-1$
+ assertNull(MBeanUtils.getValue(null, null));
+ }
+
+ public void testNonPrimitiveType() throws Exception {
+ String value = "any value"; //$NON-NLS-1$
+ assertEquals(value, MBeanUtils.getValue(value, "java.util.Vector")); //$NON-NLS-1$
+ }
+
+ public void testBooleanValue() throws Exception {
+ assertEquals(Boolean.TRUE, MBeanUtils.getValue("true", "boolean")); //$NON-NLS-1$ //$NON-NLS-2$
+ assertEquals(Boolean.FALSE, MBeanUtils.getValue("false", "boolean")); //$NON-NLS-1$ //$NON-NLS-2$
+ assertEquals(Boolean.FALSE, MBeanUtils.getValue("whatever", "boolean")); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ public void testByteValue() throws Exception {
+ assertEquals((byte) 0, MBeanUtils.getValue("0", "byte")); //$NON-NLS-1$ //$NON-NLS-2$
+ assertEquals((byte) 1, MBeanUtils.getValue("1", "byte")); //$NON-NLS-1$ //$NON-NLS-2$
+ try {
+ MBeanUtils.getValue("whatever", "byte"); //$NON-NLS-1$ //$NON-NLS-2$
+ fail();
+ } catch (NumberFormatException e) {
+
+ }
+ }
+
+ public void testCharValue() throws Exception {
+ assertEquals('a', MBeanUtils.getValue("a", "char")); //$NON-NLS-1$ //$NON-NLS-2$
+ assertEquals('o', MBeanUtils.getValue("only take the first char", //$NON-NLS-1$
+ "char")); //$NON-NLS-1$
+ }
+
+ public void testShortValue() throws Exception {
+ assertEquals((short) 1, MBeanUtils.getValue("1", "short")); //$NON-NLS-1$ //$NON-NLS-2$
+ try {
+ MBeanUtils.getValue("not a short", "short"); //$NON-NLS-1$ //$NON-NLS-2$
+ fail();
+ } catch (NumberFormatException e) {
+
+ }
+ }
+
+ public void testIntValue() throws Exception {
+ assertEquals(1, MBeanUtils.getValue("1", "int")); //$NON-NLS-1$ //$NON-NLS-2$
+ try {
+ MBeanUtils.getValue("not a int", "int"); //$NON-NLS-1$ //$NON-NLS-2$
+ fail();
+ } catch (NumberFormatException e) {
+
+ }
+ }
+
+ public void testLongValue() throws Exception {
+ assertEquals((long) 1, MBeanUtils.getValue("1", "long")); //$NON-NLS-1$ //$NON-NLS-2$
+ try {
+ MBeanUtils.getValue("not a long", "long"); //$NON-NLS-1$ //$NON-NLS-2$
+ fail();
+ } catch (NumberFormatException e) {
+
+ }
+ }
+
+ public void testFloatValue() throws Exception {
+ assertEquals(1.0f, MBeanUtils.getValue("1", "float")); //$NON-NLS-1$ //$NON-NLS-2$
+ try {
+ MBeanUtils.getValue("not a float", "float"); //$NON-NLS-1$ //$NON-NLS-2$
+ fail();
+ } catch (NumberFormatException e) {
+
+ }
+ }
+
+ public void testDoubleValue() throws Exception {
+ assertEquals(1.0, MBeanUtils.getValue("1", "double")); //$NON-NLS-1$ //$NON-NLS-2$
+ try {
+ MBeanUtils.getValue("not a double", "double"); //$NON-NLS-1$ //$NON-NLS-2$
+ fail();
+ } catch (NumberFormatException e) {
+
+ }
+ }
+
+}
Copied: trunk/jmx/tests/org.jboss.tools.jmx.ui.test/src/org/jboss/tools/jmx/ui/test/JMXUIAllTests.java (from rev 23391, trunk/jmx/tests/org.jboss.tools.jmx.ui.test/src/org/jboss/tools/jmx/ui/JMXUIAllTests.java)
===================================================================
--- trunk/jmx/tests/org.jboss.tools.jmx.ui.test/src/org/jboss/tools/jmx/ui/test/JMXUIAllTests.java (rev 0)
+++ trunk/jmx/tests/org.jboss.tools.jmx.ui.test/src/org/jboss/tools/jmx/ui/test/JMXUIAllTests.java 2010-07-13 23:18:37 UTC (rev 23392)
@@ -0,0 +1,14 @@
+package org.jboss.tools.jmx.ui.test;
+import org.jboss.tools.jmx.ui.internal.test.MBeanUtilsTestCase;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+
+public class JMXUIAllTests {
+ public static Test suite() {
+ TestSuite suite = new TestSuite();
+ suite.addTestSuite(MBeanUtilsTestCase.class);
+ return suite;
+ }
+}
Property changes on: trunk/jmx/tests/org.jboss.tools.jmx.ui.test/src/org/jboss/tools/jmx/ui/test/JMXUIAllTests.java
___________________________________________________________________
Name: svn:mergeinfo
+
15 years, 9 months
JBoss Tools SVN: r23391 - trunk/freemarker/tests/org.jboss.ide.eclipse.freemarker.test.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2010-07-13 18:35:34 -0400 (Tue, 13 Jul 2010)
New Revision: 23391
Modified:
trunk/freemarker/tests/org.jboss.ide.eclipse.freemarker.test/pom.xml
Log:
emma coverage filter changed for freemarker.test plug-in
Modified: trunk/freemarker/tests/org.jboss.ide.eclipse.freemarker.test/pom.xml
===================================================================
--- trunk/freemarker/tests/org.jboss.ide.eclipse.freemarker.test/pom.xml 2010-07-13 22:32:28 UTC (rev 23390)
+++ trunk/freemarker/tests/org.jboss.ide.eclipse.freemarker.test/pom.xml 2010-07-13 22:35:34 UTC (rev 23391)
@@ -12,7 +12,7 @@
<version>1.2.0-SNAPSHOT</version>
<packaging>eclipse-test-plugin</packaging>
<properties>
- <emma.filter>org.jboss.ide.eclipse.freemarker.editor*</emma.filter>
+ <emma.filter>org.jboss.ide.eclipse.freemarker*</emma.filter>
<emma.instrument.bundles>org.jboss.ide.eclipse.freemarker</emma.instrument.bundles>
</properties>
</project>
15 years, 9 months
JBoss Tools SVN: r23390 - trunk/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools/tests.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2010-07-13 18:32:28 -0400 (Tue, 13 Jul 2010)
New Revision: 23390
Modified:
trunk/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools/tests/AbstractPluginsLoadTest.java
Log:
new method added to plug-in load test bas class
Modified: trunk/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools/tests/AbstractPluginsLoadTest.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools/tests/AbstractPluginsLoadTest.java 2010-07-13 22:31:21 UTC (rev 23389)
+++ trunk/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools/tests/AbstractPluginsLoadTest.java 2010-07-13 22:32:28 UTC (rev 23390)
@@ -91,4 +91,18 @@
public void assertPluginResolved(Bundle bundle) {
assertPluginsResolved(new Bundle[] {bundle});
}
+
+ public void assertPluginsResolved(String[] ids) {
+ for (String id : ids) {
+ Bundle bundle = Platform.getBundle(id);
+ assertNotNull(MessageFormat.format("Could not get bundle {0} instance",id), bundle);
+ assertTrue(MessageFormat.format("Plugin '{0}' is not resolved",bundle.getSymbolicName()), //$NON-NLS-1$ //$NON-NLS-2$
+ isPluginResolved(bundle.getSymbolicName()));
+ System.out.println(MessageFormat.format("{0} was resolved and activated",bundle.getSymbolicName()));
+ }
+ }
+
+ public void assertPluginResolved(String id) {
+ assertPluginsResolved(new String[] {id});
+ }
}
15 years, 9 months
JBoss Tools SVN: r23389 - trunk/ws/plugins/org.jboss.tools.ws.ui.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2010-07-13 18:31:21 -0400 (Tue, 13 Jul 2010)
New Revision: 23389
Modified:
trunk/ws/plugins/org.jboss.tools.ws.ui/build.properties
Log:
fix for compilation problem in ws.ui when building with target
Modified: trunk/ws/plugins/org.jboss.tools.ws.ui/build.properties
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/build.properties 2010-07-13 20:52:54 UTC (rev 23388)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/build.properties 2010-07-13 22:31:21 UTC (rev 23389)
@@ -10,3 +10,4 @@
about.properties,\
icons/,\
jboss_about.png
+additional.bundles = javax.xml.bind
15 years, 9 months
JBoss Tools SVN: r23388 - in trunk/ws/plugins/org.jboss.tools.ws.ui: META-INF and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: bfitzpat
Date: 2010-07-13 16:52:54 -0400 (Tue, 13 Jul 2010)
New Revision: 23388
Added:
trunk/ws/plugins/org.jboss.tools.ws.ui/JAXRSWSTestView2.java
trunk/ws/plugins/org.jboss.tools.ws.ui/icons/obj16/binary.gif
trunk/ws/plugins/org.jboss.tools.ws.ui/icons/obj16/properties.gif
trunk/ws/plugins/org.jboss.tools.ws.ui/icons/obj16/run.gif
trunk/ws/plugins/org.jboss.tools.ws.ui/icons/obj16/save_edit.gif
trunk/ws/plugins/org.jboss.tools.ws.ui/icons/obj16/web.gif
trunk/ws/plugins/org.jboss.tools.ws.ui/icons/obj16/wsdl.gif
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/views/FormLayoutFactory.java
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/views/JAXRSWSTestView2.java
Modified:
trunk/ws/plugins/org.jboss.tools.ws.ui/META-INF/MANIFEST.MF
trunk/ws/plugins/org.jboss.tools.ws.ui/plugin.xml
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JBossWSUI.properties
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JBossWSUIMessages.java
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/utils/JAXWSTester2.java
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/utils/WSTestUtils.java
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/views/DelimitedStringList.java
Log:
[JBIDE-6579] Updated WS Tester to have cleaner, simpler look and feel using the Eclipse Forms Toolkit
Added: trunk/ws/plugins/org.jboss.tools.ws.ui/JAXRSWSTestView2.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/JAXRSWSTestView2.java (rev 0)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/JAXRSWSTestView2.java 2010-07-13 20:52:54 UTC (rev 23388)
@@ -0,0 +1,1249 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.ws.ui.views;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map.Entry;
+
+import javax.xml.soap.SOAPBody;
+import javax.xml.soap.SOAPEnvelope;
+
+import org.eclipse.core.resources.IStorage;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.IJobChangeEvent;
+import org.eclipse.core.runtime.jobs.IJobChangeListener;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.dialogs.ErrorDialog;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.ImageRegistry;
+import org.eclipse.jface.window.Window;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.SashForm;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.CoolBar;
+import org.eclipse.swt.widgets.CoolItem;
+import org.eclipse.swt.widgets.List;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.MenuItem;
+import org.eclipse.swt.widgets.TabFolder;
+import org.eclipse.swt.widgets.TabItem;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.widgets.ToolBar;
+import org.eclipse.swt.widgets.ToolItem;
+import org.eclipse.ui.IStorageEditorInput;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.forms.events.ExpansionAdapter;
+import org.eclipse.ui.forms.events.ExpansionEvent;
+import org.eclipse.ui.forms.widgets.ExpandableComposite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.ScrolledForm;
+import org.eclipse.ui.part.ViewPart;
+import org.eclipse.wst.internet.monitor.core.internal.provisional.IMonitor;
+import org.eclipse.wst.internet.monitor.core.internal.provisional.MonitorCore;
+import org.jboss.tools.ws.ui.JBossWSUIPlugin;
+import org.jboss.tools.ws.ui.messages.JBossWSUIMessages;
+import org.jboss.tools.ws.ui.utils.JAXRSTester;
+import org.jboss.tools.ws.ui.utils.JAXWSTester2;
+import org.jboss.tools.ws.ui.utils.ResultsXMLStorage;
+import org.jboss.tools.ws.ui.utils.ResultsXMLStorageInput;
+import org.jboss.tools.ws.ui.utils.WSTestUtils;
+
+/**
+ * View for testing web services (JAX-WS & JAX-RS)
+ * @author bfitzpat
+ *
+ */
+@SuppressWarnings("restriction")
+public class JAXRSWSTestView2 extends ViewPart {
+
+ private static final String DEFAULT_TEXT_EDITOR_ID = "org.eclipse.ui.DefaultTextEditor"; //$NON-NLS-1$
+ private static final String XML_EDITOR_ID = "org.eclipse.wst.xml.ui.internal.tabletree.XMLMultiPageEditorPart"; //$NON-NLS-1$
+ private static final String TCPIP_VIEW_ID = "org.eclipse.wst.internet.monitor.view";//$NON-NLS-1$
+ private static final String DELETE = "DELETE";//$NON-NLS-1$
+ private static final String PUT = "PUT";//$NON-NLS-1$
+ private static final String POST = "POST";//$NON-NLS-1$
+ private static final String GET = "GET";//$NON-NLS-1$
+ private static final String JAX_WS = "JAX-WS"; //$NON-NLS-1$
+ private static final String JAX_RS = "JAX-RS"; //$NON-NLS-1$
+ private static final String EMPTY_STRING = ""; //$NON-NLS-1$
+ private static final String RESULT_HEADER_DELIMITER = "%";//$NON-NLS-1$
+
+ /**
+ * The ID of the view as specified by the extension.
+ */
+ public static final String ID = "org.jboss.tools.ws.ui.tester.views.TestWSView";//$NON-NLS-1$
+
+ /* UI controls */
+ private Button testButton = null;
+ private Button wsdlButton = null;
+ private Text actionText;
+ private Text resultsText;
+ private Combo urlCombo;
+ private DelimitedStringList dlsList;
+ private Combo methodCombo;
+ private Combo wsTypeCombo;
+ private Text bodyText;
+ private TabFolder tabGroup;
+ private TabItem bodyTab;
+ private TabItem headerTab;
+ private List resultHeadersList;
+ private TabItem resultHeadersTab;
+ private TabItem resultTab;
+ private TabFolder resultTabGroup;
+
+ private TabItem parmsTab;
+
+ private DelimitedStringList parmsList;
+ private Button openTCPIPMonitorButton;
+ private Button addTCPIPMonitorButton;
+
+ private SOAPEnvelope envelope;
+ private SOAPBody soapbody;
+ private MenuItem openInXMLEditorAction;
+ private MenuItem openResponseTagInXMLEditor;
+ private Menu resultsTextMenu;
+ private MenuItem copyMenuAction;
+ private Menu resultsHeaderMenu;
+ private MenuItem copyResultHeaderMenuAction;
+
+ private boolean showSampleButton = false;
+ private String[] serviceNSMessage = null;
+
+ private FormToolkit toolkit;
+ private ScrolledForm form;
+ private ImageRegistry mImageRegistry;
+
+ private static final String IMG_DESC_WSDL = "icons/obj16/wsdl.gif"; //$NON-NLS-1$
+ private static final String IMG_DESC_START = "icons/obj16/run.gif"; //$NON-NLS-1$
+ private static final String IMG_DESC_STOP = "icons/obj16/progress_stop.gif"; //$NON-NLS-1$
+
+ /**
+ * The constructor.
+ */
+ public JAXRSWSTestView2() {
+ }
+
+ private void getImages() {
+ mImageRegistry = new ImageRegistry();
+ mImageRegistry.put(IMG_DESC_WSDL, ImageDescriptor
+ .createFromURL(JBossWSUIPlugin.getDefault().getBundle()
+ .getEntry(IMG_DESC_WSDL)));
+ mImageRegistry.put(IMG_DESC_START, ImageDescriptor
+ .createFromURL(JBossWSUIPlugin.getDefault().getBundle()
+ .getEntry(IMG_DESC_START)));
+ mImageRegistry.put(IMG_DESC_STOP, ImageDescriptor
+ .createFromURL(JBossWSUIPlugin.getDefault().getBundle()
+ .getEntry(IMG_DESC_STOP)));
+ }
+
+ /**
+ * This is a callback that will allow us
+ * to create the viewer and initialize it.
+ */
+ public void createPartControl(Composite parent) {
+
+ getImages();
+
+ toolkit = new FormToolkit(parent.getDisplay());
+ form = toolkit.createScrolledForm(parent);
+
+ GridLayout layout = new GridLayout(2, false);
+ form.getBody().setLayout(layout);
+
+ urlCombo = new Combo(form.getBody(), SWT.BORDER | SWT.DROP_DOWN);
+ GridData gdURL = new GridData(SWT.FILL, SWT.NONE, true, false);
+ urlCombo.setLayoutData(gdURL);
+ toolkit.adapt(urlCombo);
+
+ Composite comp1 = toolkit.createComposite(form.getBody());
+ comp1.setLayout(new FillLayout());
+
+ CoolBar coolBar = new CoolBar(comp1,SWT.BORDER);
+ toolkit.adapt(coolBar);
+
+ CoolItem wsTypeCoolItem = new CoolItem(coolBar, SWT.PUSH);
+ wsTypeCombo = new Combo(coolBar, SWT.READ_ONLY | SWT.BORDER);
+ String[] items = {JAX_WS, JAX_RS};
+ wsTypeCombo.setItems(items);
+ wsTypeCombo.pack();
+ Point size = wsTypeCombo.computeSize (SWT.DEFAULT, SWT.DEFAULT);
+ wsTypeCoolItem.setPreferredSize (wsTypeCoolItem.computeSize (size.x, size.y));
+ wsTypeCoolItem.setControl(wsTypeCombo);
+ wsTypeCombo.addSelectionListener(new SelectionListener() {
+ public void widgetDefaultSelected(SelectionEvent e) {
+ widgetSelected(e);
+ }
+ public void widgetSelected(SelectionEvent e) {
+ setControlsForWSType(wsTypeCombo.getText());
+ setControlsForMethodType(methodCombo.getText());
+ setControlsForSelectedURL();
+ }
+ });
+ toolkit.adapt(wsTypeCombo);
+
+ CoolItem wsMethodCoolItem = new CoolItem(coolBar, SWT.PUSH);
+ methodCombo = new Combo(coolBar, SWT.BORDER | SWT.READ_ONLY);
+ String[] methods = {GET, POST, PUT, DELETE};
+ methodCombo.setItems(methods);
+ methodCombo.pack();
+ size = methodCombo.computeSize (SWT.DEFAULT, SWT.DEFAULT);
+ wsMethodCoolItem.setPreferredSize (wsMethodCoolItem.computeSize (size.x, size.y));
+ wsMethodCoolItem.setControl(methodCombo);
+ methodCombo.addSelectionListener(new SelectionListener() {
+ public void widgetDefaultSelected(SelectionEvent e) {
+ widgetSelected(e);
+ }
+ public void widgetSelected(SelectionEvent e) {
+ setControlsForMethodType(methodCombo.getText());
+ }
+ });
+ toolkit.adapt(methodCombo);
+
+ CoolItem topCoolItem = new CoolItem(coolBar, SWT.NONE);
+
+ ToolBar topToolBar = new ToolBar(coolBar,SWT.HORIZONTAL);
+ ToolItem openWSDLToolItem = new ToolItem(topToolBar, SWT.PUSH);
+ openWSDLToolItem.setImage(mImageRegistry.get(IMG_DESC_WSDL));
+ openWSDLToolItem.setToolTipText("Get from WSDL");
+
+ ToolItem startToolItem = new ToolItem(topToolBar, SWT.PUSH);
+ startToolItem.setImage(mImageRegistry.get(IMG_DESC_START));
+ startToolItem.setToolTipText("Go");
+
+ ToolItem stopToolItem = new ToolItem(topToolBar, SWT.PUSH);
+ stopToolItem.setImage(mImageRegistry.get(IMG_DESC_STOP));
+ stopToolItem.setToolTipText("Stop");
+ toolkit.adapt(coolBar);
+
+ topToolBar.pack();
+ size = topToolBar.getSize();
+ topCoolItem.setControl(topToolBar);
+ topCoolItem.setSize(topCoolItem.computeSize(size.x, size.y));
+
+ SashForm topBottomForm = new SashForm(form.getBody(), SWT.NONE);
+ topBottomForm.setOrientation(SWT.VERTICAL);
+ toolkit.adapt(topBottomForm);
+ topBottomForm.setLayout(new GridLayout());
+ GridData gd8 = new GridData(SWT.FILL, SWT.NONE, true, false);
+ gd8.horizontalSpan = 2;
+ topBottomForm.setLayoutData(gd8);
+
+ SashForm sashForm = new SashForm(topBottomForm, SWT.NONE);
+ sashForm.setOrientation(SWT.HORIZONTAL);
+ toolkit.adapt(sashForm);
+ GridLayout sashLayout = new GridLayout(2, false);
+ sashForm.setLayout(sashLayout);
+ GridData gd3 = new GridData(SWT.FILL, SWT.NONE, true, false);
+ gd3.horizontalSpan = 2;
+ sashForm.setLayoutData(gd3);
+
+ ExpandableComposite ec = toolkit.createExpandableComposite(sashForm,
+ ExpandableComposite.TWISTIE|
+ ExpandableComposite.CLIENT_INDENT);
+ ec.setText("Headers");
+ dlsList = new DelimitedStringList(ec, SWT.None);
+ ec.setClient(dlsList);
+ toolkit.adapt(dlsList);
+ GridData gd = new GridData(SWT.FILL, SWT.NONE, true, false);
+ ec.setLayoutData(gd);
+ ec.addExpansionListener(new ExpansionAdapter() {
+ public void expansionStateChanged(ExpansionEvent e) {
+ form.reflow(true);
+ }
+ });
+
+ ExpandableComposite ec2 = toolkit.createExpandableComposite(sashForm,
+ ExpandableComposite.TWISTIE|
+ ExpandableComposite.CLIENT_INDENT);
+ ec2.setText("Response Headers");
+ resultsText = toolkit.createText(ec2, "", SWT.BORDER | SWT.V_SCROLL | SWT.WRAP | SWT.READ_ONLY );
+ ec2.setClient(resultsText);
+ GridData gd2 = new GridData(SWT.FILL, SWT.FILL, true, false);
+ ec2.setLayoutData(gd2);
+ ec2.addExpansionListener(new ExpansionAdapter() {
+ public void expansionStateChanged(ExpansionEvent e) {
+ form.reflow(true);
+ }
+ });
+
+ SashForm sashForm2 = new SashForm(topBottomForm, SWT.NONE);
+ sashForm2.setOrientation(SWT.HORIZONTAL);
+ toolkit.adapt(sashForm);
+ GridLayout sashLayout2 = new GridLayout(2, false);
+ sashForm2.setLayout(sashLayout2);
+ GridData gd5 = new GridData(SWT.FILL, SWT.NONE, true, false);
+ gd5.horizontalSpan = 2;
+ sashForm2.setLayoutData(gd5);
+
+ ExpandableComposite ec3 = toolkit.createExpandableComposite(sashForm2,
+ ExpandableComposite.TWISTIE|
+ ExpandableComposite.CLIENT_INDENT);
+ ec3.setText("Parameters");
+ parmsList = new DelimitedStringList(ec3, SWT.None);
+ ec3.setClient(parmsList);
+ toolkit.adapt(parmsList);
+ GridData gd4 = new GridData(SWT.FILL, SWT.FILL, true, false);
+ ec3.setLayoutData(gd4);
+ ec3.addExpansionListener(new ExpansionAdapter() {
+ public void expansionStateChanged(ExpansionEvent e) {
+ form.reflow(true);
+ }
+ });
+
+ ExpandableComposite ec4 = toolkit.createExpandableComposite(sashForm2,
+ ExpandableComposite.TWISTIE|
+ ExpandableComposite.CLIENT_INDENT);
+ ec4.setText("Response Body");
+
+ Composite comp2 = toolkit.createComposite(ec4);
+ comp2.setLayout(new GridLayout());
+
+ Composite comp3 = toolkit.createComposite(comp2);
+ comp3.setLayout(new GridLayout(4, false));
+ comp3.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
+
+ Button saveBtn = toolkit.createButton(comp3, "Save", SWT.PUSH);
+ saveBtn.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
+ Button editorBtn = toolkit.createButton(comp3, "Open in Editor", SWT.PUSH);
+ editorBtn.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
+ Button rawBtn = toolkit.createButton(comp3, "Show Raw", SWT.PUSH);
+ rawBtn.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
+ Button browserBtn = toolkit.createButton(comp3, "Show in Browser", SWT.PUSH);
+ browserBtn.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
+
+ bodyText = new Text(comp2, SWT.BORDER | SWT.WRAP | SWT.V_SCROLL);
+ GridData gd7 = new GridData(SWT.FILL, SWT.FILL, true, true);
+ bodyText.setLayoutData(gd7);
+
+ ec4.setClient(comp2);
+ GridData gd6 = new GridData(SWT.FILL, SWT.FILL, true, false);
+ ec4.setLayoutData(gd6);
+ ec4.addExpansionListener(new ExpansionAdapter() {
+ public void expansionStateChanged(ExpansionEvent e) {
+ form.reflow(true);
+ }
+ });
+
+ SashForm sashForm3 = new SashForm(topBottomForm, SWT.NONE);
+ sashForm3.setOrientation(SWT.HORIZONTAL);
+ toolkit.adapt(sashForm);
+ GridLayout sashLayout3 = new GridLayout(2, false);
+ sashForm3.setLayout(sashLayout3);
+ GridData gd10 = new GridData(SWT.FILL, SWT.NONE, true, false);
+// gd10.horizontalSpan = 1;
+ sashForm3.setLayoutData(gd10);
+
+ ExpandableComposite ec5 = toolkit.createExpandableComposite(sashForm3,
+ ExpandableComposite.TWISTIE|
+ ExpandableComposite.CLIENT_INDENT);
+ ec5.setText("Body Text");
+ bodyText = toolkit.createText(ec5, "", SWT.BORDER | SWT.WRAP | SWT.V_SCROLL);
+ ec5.setClient(bodyText);
+ GridData gd9 = new GridData(SWT.FILL, SWT.FILL, true, true);
+ ec5.setLayoutData(gd9);
+ ec5.addExpansionListener(new ExpansionAdapter() {
+ public void expansionStateChanged(ExpansionEvent e) {
+ form.reflow(true);
+ }
+ });
+
+// Label methodLabel = new Label(topHalf, SWT.NONE);
+// methodLabel.setText(JBossWSUIMessages.JAXRSWSTestView_HTTP_Method_Label);
+// methodLabel.setLayoutData(new GridData());
+//
+// methodCombo = new Combo(topHalf, SWT.DROP_DOWN | SWT.READ_ONLY);
+// methodCombo.setLayoutData(new GridData(SWT.FILL, SWT.NONE, true, false));
+// methodCombo.add(GET);
+// methodCombo.add(POST);
+// methodCombo.add(PUT);
+// methodCombo.add(DELETE);
+// methodCombo.setText(GET);
+// methodCombo.addSelectionListener(new SelectionListener() {
+// public void widgetDefaultSelected(SelectionEvent e) {
+// widgetSelected(e);
+// }
+// public void widgetSelected(SelectionEvent e) {
+// setControlsForMethodType(methodCombo.getText());
+// }
+// });
+//
+// Label urlLabel = new Label(topHalf, SWT.NONE);
+// urlLabel.setText(JBossWSUIMessages.JAXRSWSTestView_Service_URL_Label);
+// urlLabel.setLayoutData(new GridData());
+//
+//
+// Label actionLabel = new Label(topHalf, SWT.NONE);
+// actionLabel.setText(JBossWSUIMessages.JAXRSWSTestView_Action_URL_Label);
+// actionLabel.setLayoutData(new GridData());
+//
+// actionText = new Text(topHalf, SWT.BORDER);
+// actionText.setLayoutData(new GridData(SWT.FILL, SWT.NONE, true, false));
+//
+// tabGroup = new TabFolder(topHalf, SWT.BORDER);
+//
+// bodyTab = new TabItem(tabGroup, SWT.NONE, 0);
+// bodyTab.setText(JBossWSUIMessages.JAXRSWSTestView_Request_Body_Label);
+//
+// parmsTab = new TabItem(tabGroup, SWT.NONE, 1);
+// parmsTab.setText(JBossWSUIMessages.JAXRSWSTestView_Request_Parameters_Label);
+//
+// parmsList = new DelimitedStringList(tabGroup, SWT.None);
+// parmsTab.setControl(parmsList);
+// GridData parmsListGD = new GridData(SWT.FILL, SWT.FILL, true, true);
+// parmsListGD.horizontalSpan = 2;
+// parmsList.setLayoutData(parmsListGD);
+//
+// headerTab = new TabItem(tabGroup, SWT.NONE, 2);
+// bodyText = new Text(tabGroup, SWT.BORDER | SWT.WRAP | SWT.V_SCROLL);
+// GridData btGridData = new GridData(SWT.FILL, SWT.FILL, true, true);
+// bodyText.setLayoutData(btGridData);
+// bodyTab.setControl(bodyText);
+//
+// headerTab.setText(JBossWSUIMessages.JAXRSWSTestView_Request_Header_Label);
+// GridData hgGridData = new GridData(SWT.FILL, SWT.FILL, true, true);
+// hgGridData.horizontalSpan = 2;
+// tabGroup.setLayoutData(hgGridData);
+//
+// dlsList = new DelimitedStringList(tabGroup, SWT.None);
+// headerTab.setControl(dlsList);
+// GridData dlsListGD = new GridData(SWT.FILL, SWT.FILL, true, true);
+// dlsListGD.horizontalSpan = 2;
+// dlsList.setLayoutData(dlsListGD);
+//
+// Composite buttonBar = new Composite ( topHalf, SWT.NONE);
+// GridData buttonBarGD = new GridData(SWT.FILL, SWT.NONE, true, false);
+// buttonBarGD.horizontalSpan = 2;
+// buttonBar.setLayoutData(buttonBarGD);
+// buttonBar.setLayout(new RowLayout());
+//
+// testButton = new Button (buttonBar, SWT.PUSH);
+// testButton.setText(JBossWSUIMessages.JAXRSWSTestView_Invoke_Label);
+//
+// testButton.addSelectionListener(new SelectionListener() {
+// public void widgetSelected(SelectionEvent e) {
+// handleTest(wsTypeCombo.getText());
+// }
+// public void widgetDefaultSelected(SelectionEvent e) {
+// widgetSelected(e);
+// }
+// });
+//
+// wsdlButton = new Button (buttonBar, SWT.PUSH);
+// wsdlButton.setText(JBossWSUIMessages.JAXRSWSTestView_Button_Get_From_WSDL);
+//
+// wsdlButton.addSelectionListener(new SelectionListener() {
+// public void widgetSelected(SelectionEvent e) {
+// WSDLBrowseDialog wbDialog = new WSDLBrowseDialog(getSite().getShell());
+// int rtnCode = wbDialog.open();
+// if (rtnCode == Window.OK){
+// serviceNSMessage = null;
+// Definition wsdlDef = wbDialog.getWSDLDefinition();
+// String output = TesterWSDLUtils.getSampleSOAPInputMessage(wsdlDef,
+// wbDialog.getServiceTextValue(),
+// wbDialog.getPortTextValue(),
+// wbDialog.getBindingValue(),
+// wbDialog.getOperationTextValue());
+// String endpointURL = TesterWSDLUtils.getEndpointURL(wsdlDef,
+// wbDialog.getServiceTextValue(),
+// wbDialog.getPortTextValue(),
+// wbDialog.getBindingValue(),
+// wbDialog.getOperationTextValue());
+// String actionURL = TesterWSDLUtils.getActionURL(wsdlDef,
+// wbDialog.getServiceTextValue(),
+// wbDialog.getPortTextValue(),
+// wbDialog.getBindingValue(),
+// wbDialog.getOperationTextValue());
+// serviceNSMessage = TesterWSDLUtils.getNSServiceNameAndMessageNameArray(wsdlDef,
+// wbDialog.getServiceTextValue(),
+// wbDialog.getPortTextValue(),
+// wbDialog.getBindingValue(),
+// wbDialog.getOperationTextValue());
+// String soapIn = generateSampleSOAP(output);
+// bodyText.setText(soapIn);
+// urlCombo.setText(endpointURL);
+// actionText.setText(actionURL);
+// setControlsForWSType(wsTypeCombo.getText());
+// setControlsForMethodType(methodCombo.getText());
+// setControlsForSelectedURL();
+// }
+// }
+// public void widgetDefaultSelected(SelectionEvent e) {
+// widgetSelected(e);
+// }
+// });
+//
+// addTCPIPMonitorButton = new Button(buttonBar, SWT.PUSH);
+// addTCPIPMonitorButton.setText(JBossWSUIMessages.JAXRSWSTestView_Configure_Monitor_Button);
+//
+// addTCPIPMonitorButton.addSelectionListener(new SelectionListener() {
+// public void widgetSelected(SelectionEvent e) {
+// configureMonitor();
+// }
+// public void widgetDefaultSelected(SelectionEvent e) {
+// widgetSelected(e);
+// }
+// });
+//
+// openTCPIPMonitorButton = new Button(buttonBar, SWT.PUSH);
+// openTCPIPMonitorButton.setText(JBossWSUIMessages.JAXRSWSTestView_Open_Monitor_Button);
+//
+// openTCPIPMonitorButton.addSelectionListener(new SelectionListener() {
+// public void widgetSelected(SelectionEvent e) {
+// openMonitor();
+// }
+// public void widgetDefaultSelected(SelectionEvent e) {
+// widgetSelected(e);
+// }
+// });
+//
+// Button sampleButton = new Button(buttonBar, SWT.PUSH);
+// sampleButton.setText(JBossWSUIMessages.JAXRSWSTestView_Set_Sample_Data_Label);
+// sampleButton.setVisible(showSampleButton);
+//
+// sampleButton.addSelectionListener(new SelectionListener() {
+// public void widgetSelected(SelectionEvent e) {
+// setupSample();
+// }
+// public void widgetDefaultSelected(SelectionEvent e) {
+// widgetSelected(e);
+// }
+// });
+//
+// Composite bottomHalf = new Composite (sashForm, SWT.NONE);
+// bottomHalf.setLayout(new GridLayout(2, false));
+//
+// resultTabGroup = new TabFolder(bottomHalf, SWT.BORDER);
+// GridData rtGridData = new GridData(SWT.FILL, SWT.FILL, true, true);
+// rtGridData.horizontalSpan = 2;
+// resultTabGroup.setLayoutData(rtGridData);
+//
+// resultTab = new TabItem(resultTabGroup, SWT.NONE, 0);
+// resultTab.setText(JBossWSUIMessages.JAXRSWSTestView_Results_Body_Label);
+// resultsText = new Text(resultTabGroup, SWT.BORDER | SWT.V_SCROLL | SWT.WRAP | SWT.READ_ONLY );
+// resultsText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+//
+// resultsTextMenu = new Menu(resultsText.getShell(), SWT.POP_UP);
+//
+// copyMenuAction = new MenuItem(resultsTextMenu, SWT.PUSH);
+// copyMenuAction.setText(JBossWSUIMessages.JAXRSWSTestView_CopyResultsMenu);
+// copyMenuAction.setAccelerator(SWT.CTRL + 'C');
+// copyMenuAction.addSelectionListener(new SelectionListener(){
+//
+// public void widgetDefaultSelected(SelectionEvent arg0) {
+// if (resultsText.getSelectionCount() == 0)
+// resultsText.selectAll();
+// resultsText.copy();
+// }
+//
+// public void widgetSelected(SelectionEvent arg0) {
+// widgetDefaultSelected(arg0);
+// }
+// });
+// new MenuItem(resultsTextMenu, SWT.SEPARATOR);
+//
+// openInXMLEditorAction = new MenuItem(resultsTextMenu, SWT.PUSH);
+// openInXMLEditorAction.setText(JBossWSUIMessages.JAXRSWSTestView_Open_Result_in_XML_Editor);
+// openInXMLEditorAction.setAccelerator(SWT.CTRL + 'O');
+// openInXMLEditorAction.addSelectionListener(new SelectionListener() {
+//
+// public void widgetSelected(SelectionEvent arg0) {
+// String string = resultsText.getText();
+// openXMLEditor(string);
+// }
+//
+// public void widgetDefaultSelected(SelectionEvent arg0) {
+// widgetSelected(arg0);
+// }
+// });
+//
+// openResponseTagInXMLEditor = new MenuItem(resultsTextMenu, SWT.PUSH);
+// openResponseTagInXMLEditor.setText(JBossWSUIMessages.JAXRSWSTestView_Open_Response_Tag_Contents_in_XML_Editor);
+// openResponseTagInXMLEditor.setAccelerator(SWT.CTRL + 'R');
+// openResponseTagInXMLEditor.addSelectionListener(new SelectionListener() {
+//
+// public void widgetSelected(SelectionEvent arg0) {
+// String string = null;
+// try {
+// SOAPBody body = null;
+// if (envelope != null){
+// body = envelope.getBody();
+// } else if (soapbody != null) {
+// body = soapbody;
+// }
+//
+// NodeList list = body.getChildNodes();
+// for (int i = 0; i< list.getLength(); i++){
+// Node node = list.item(i);
+// if (node.getNodeName().contains("Response")){ //$NON-NLS-1$
+// NodeList list2 = node.getChildNodes();
+// for (int j = 0; j<list2.getLength(); j++){
+// Node node2 = list2.item(j);
+// if (node2.getNodeName().contains("Result")){ //$NON-NLS-1$
+// Node node3 = node2.getChildNodes().item(0);
+// if (node3.getNodeType() == Node.TEXT_NODE) {
+// string = node3.getNodeValue();
+// break;
+// } else if (node3.getNodeType() == Node.ELEMENT_NODE) {
+// Element element = (Element) node3;
+// string = XMLUtils.ElementToString(element);
+// break;
+// }
+// }
+// }
+// if (string != null) break;
+// }
+// }
+// if (string != null){
+// openXMLEditor(string);
+// }
+// } catch (SOAPException e) {
+// JBossWSUIPlugin.log(e);
+// }
+// }
+//
+// public void widgetDefaultSelected(SelectionEvent arg0) {
+// widgetSelected(arg0);
+// }
+// });
+//
+// resultsText.setMenu(resultsTextMenu);
+//
+// resultTab.setControl(resultsText);
+//
+// resultsText.addFocusListener(new FocusListener() {
+//
+// public void focusLost(FocusEvent arg0) {
+// }
+//
+// public void focusGained(FocusEvent arg0) {
+// setMenusForCurrentState();
+// }
+// });
+//
+// resultHeadersTab = new TabItem(resultTabGroup, SWT.NONE, 1);
+// resultHeadersTab.setText(JBossWSUIMessages.JAXRSWSTestView_Results_Header_Label);
+// resultHeadersList = new List(resultTabGroup, SWT.V_SCROLL);
+// resultHeadersTab.setControl(resultHeadersList);
+// GridData rdlsListGD = new GridData(SWT.FILL, SWT.FILL, true, true);
+// rdlsListGD.horizontalSpan = 2;
+// resultHeadersList.setLayoutData(dlsListGD);
+//
+// resultsHeaderMenu = new Menu(resultHeadersList.getShell(), SWT.POP_UP);
+//
+// copyResultHeaderMenuAction = new MenuItem(resultsHeaderMenu, SWT.PUSH);
+// copyResultHeaderMenuAction.setText(JBossWSUIMessages.JAXRSWSTestView_CopyResultMenu_Text);
+// copyResultHeaderMenuAction.setAccelerator(SWT.CTRL + 'C');
+// copyResultHeaderMenuAction.addSelectionListener(new SelectionListener(){
+//
+// public void widgetDefaultSelected(SelectionEvent arg0) {
+// if (resultHeadersList.getSelectionCount() == 0)
+// resultHeadersList.selectAll();
+// Display display = Display.getDefault();
+// final Clipboard cb = new Clipboard(display);
+// TextTransfer textTransfer = TextTransfer.getInstance();
+// cb.setContents(resultHeadersList.getSelection() ,
+// new Transfer[] { textTransfer });
+// }
+//
+// public void widgetSelected(SelectionEvent arg0) {
+// widgetDefaultSelected(arg0);
+// }
+// });
+//
+// resultHeadersList.setMenu(resultsHeaderMenu);
+//
+// resultHeadersList.addMouseListener(new MouseListener() {
+// public void mouseDoubleClick(MouseEvent arg0) {
+// }
+// public void mouseDown(MouseEvent arg0) {
+// setMenusForCurrentState();
+// }
+// public void mouseUp(MouseEvent arg0) {
+// }
+// });
+//
+// wsTypeCombo.setText(JAX_WS);
+// setControlsForWSType(wsTypeCombo.getText());
+// setControlsForMethodType(methodCombo.getText());
+// setControlsForSelectedURL();
+// setMenusForCurrentState();
+ }
+
+ @Override
+ public void dispose() {
+ toolkit.dispose();
+ mImageRegistry.dispose();
+ super.dispose();
+ }
+
+ private String generateSampleSOAP ( String innerText ) {
+ String soapIn = "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\" ?>\n" + //$NON-NLS-1$
+ "<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" " + //$NON-NLS-1$
+ "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" " + //$NON-NLS-1$
+ "xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" " + //$NON-NLS-1$
+ ">\n" + //$NON-NLS-1$
+ "<soap:Body>\n";//$NON-NLS-1$
+ if (innerText != null)
+ soapIn = soapIn + innerText;
+ soapIn = soapIn +
+ "</soap:Body>\n" + //$NON-NLS-1$
+ "</soap:Envelope>"; //$NON-NLS-1$
+ return soapIn;
+ }
+
+ private void setMenusForCurrentState() {
+ if (resultsText!= null && !resultsText.isDisposed()){
+ boolean enabled = resultsText.getText().trim().length() > 0;
+ copyMenuAction.setEnabled(enabled);
+ openInXMLEditorAction.setEnabled(enabled);
+ if (wsTypeCombo.getText().equalsIgnoreCase(JAX_WS)) {
+ openResponseTagInXMLEditor.setEnabled(enabled);
+ } else if (wsTypeCombo.getText().equalsIgnoreCase(JAX_RS) ){
+ openResponseTagInXMLEditor.setEnabled(false);
+ }
+ }
+ if (resultHeadersList != null && !resultHeadersList.isDisposed()) {
+ boolean enabled = resultHeadersList.getItemCount() > 0;
+ copyResultHeaderMenuAction.setEnabled(enabled);
+ }
+ }
+
+ private void openXMLEditor (String text){
+ IWorkbenchWindow window = getSite().getWorkbenchWindow();
+ IStorage storage = new ResultsXMLStorage(text);
+ IStorageEditorInput input = new ResultsXMLStorageInput(storage);
+ IWorkbenchPage page = window.getActivePage();
+ if (page != null) {
+ try {
+ if (window.getWorkbench().getEditorRegistry().findEditor(XML_EDITOR_ID) != null) {
+ page.openEditor(input, XML_EDITOR_ID);
+ } else {
+ page.openEditor(input, DEFAULT_TEXT_EDITOR_ID);
+ }
+ } catch (PartInitException e) {
+ JBossWSUIPlugin.log(e);
+ }
+ }
+ }
+
+ private void setControlsForSelectedURL() {
+ if (urlCombo.getText().trim().length() > 0) {
+ String urlText = urlCombo.getText();
+ try {
+ new URL(urlText);
+ testButton.setEnabled(true);
+ addTCPIPMonitorButton.setEnabled(true);
+ } catch (MalformedURLException mue) {
+ testButton.setEnabled(false);
+ addTCPIPMonitorButton.setEnabled(false);
+
+ return;
+ }
+ } else {
+ testButton.setEnabled(false);
+ addTCPIPMonitorButton.setEnabled(false);
+ }
+ }
+
+ /*
+ * Open the TCP/IP Monitor View
+ */
+ private void openMonitor() {
+ try {
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().
+ getActivePage().showView(TCPIP_VIEW_ID);
+ } catch (PartInitException e) {
+ JBossWSUIPlugin.log(e);
+ }
+ }
+
+ private IMonitor findMonitor(String urlToCheck) {
+ IMonitor monitor = null;
+
+ IMonitor[] monitors = MonitorCore.getMonitors();
+ if (monitors != null && monitors.length > 0) {
+ for (int i= 0; i < monitors.length; i++) {
+ if (urlToCheck.contains(monitors[i].getRemoteHost())) {
+ monitor = monitors[i];
+ break;
+ }
+ }
+ }
+ return monitor;
+ }
+
+ /*
+ * Configure a TCP/IP Monitor entry so we can monitor it
+ */
+ private void configureMonitor() {
+ if (urlCombo.getText().trim().length() > 0) {
+ String oldUrl = urlCombo.getText();
+ IMonitor monitor = findMonitor(oldUrl);
+ if (monitor == null) {
+
+ URL tempURL = null;
+ try {
+ tempURL = new URL(oldUrl);
+ } catch (MalformedURLException e) {
+ // ignore
+ }
+ AddMonitorDialog dialog = new AddMonitorDialog(getSite().getShell());
+ if (tempURL != null) {
+ dialog.getMonitor().setRemoteHost(tempURL.getHost());
+ if (tempURL.getPort() > 0)
+ dialog.getMonitor().setRemotePort(tempURL.getPort());
+ }
+ if (dialog.open() == Window.CANCEL)
+ return;
+ monitor = dialog.getMonitor();
+ }
+
+ if (monitor != null) {
+ monitor = findMonitor(oldUrl);
+ if (monitor != null) {
+ if (!monitor.isRunning()) {
+ try {
+ monitor.start();
+ int port = monitor.getLocalPort();
+ int remotePort = monitor.getRemotePort();
+ String host = monitor.getRemoteHost();
+ String newUrl = null;
+ if (oldUrl.contains(host + ':' + remotePort)) {
+ newUrl = oldUrl.replace(host + ':' + remotePort, "localhost:" + port); //$NON-NLS-1$
+ } else if (oldUrl.contains(host + ':' + port)) {
+ // do nothing - host/port combo is already correct
+ newUrl = oldUrl;
+ } else {
+ newUrl = oldUrl.replace(host, "localhost:" + port); //$NON-NLS-1$
+ }
+ urlCombo.setText(newUrl);
+ } catch (CoreException e) {
+ // if we hit an error, open a dialog
+ ErrorDialog dialog = new ErrorDialog(this.getSite().getShell(),
+ JBossWSUIMessages.JAXRSWSTestView_Error_Title_Starting_Monitor,
+ JBossWSUIMessages.JAXRSWSTestView_Error_Msg_Starting_Monitor,
+ new Status(IStatus.ERROR, JBossWSUIPlugin.PLUGIN_ID,
+ e.getLocalizedMessage(), e), IStatus.ERROR);
+ dialog.open();
+ }
+ }
+ }
+ }
+ }
+ }
+
+ /*
+ * Enable/disable controls based on the WS technology type
+ * and the method.
+ *
+ * @param methodType
+ */
+ private void setControlsForMethodType ( String methodType ) {
+ if (wsTypeCombo.getText().equalsIgnoreCase(JAX_RS) &&
+ methodType.equalsIgnoreCase(GET)) {
+ bodyText.setEnabled(false);
+ } else {
+ bodyText.setEnabled(true);
+ }
+ }
+
+ /*
+ * Enable/disable controls based on the WS technology type
+ * @param wsType
+ */
+ private void setControlsForWSType ( String wsType ) {
+ if (wsType.equalsIgnoreCase(JAX_WS)) {
+ actionText.setEnabled(true);
+ bodyText.setEnabled(true);
+ methodCombo.setEnabled(false);
+ parmsList.setEnabled(false);
+ parmsList.removeAll();
+ dlsList.setEnabled(false);
+ parmsTab.getControl().setEnabled(false);
+ headerTab.getControl().setEnabled(true);
+ methodCombo.setText(POST);
+
+ String emptySOAP = "<?xml version=\"1.0\" standalone=\"yes\" ?>" + //$NON-NLS-1$
+ "<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" " + //$NON-NLS-1$
+ "xmlns:ns=\"INSERT_URL_HERE\">" + //$NON-NLS-1$
+ "<soap:Body>" + //$NON-NLS-1$
+ "</soap:Body>" + //$NON-NLS-1$
+ "</soap:Envelope>"; //$NON-NLS-1$
+ emptySOAP = WSTestUtils.addNLsToXML(emptySOAP);
+
+ if (bodyText.getText().trim().length() == 0) {
+ bodyText.setText(emptySOAP);
+ }
+ wsdlButton.setEnabled(true);
+ }
+ else if (wsType.equalsIgnoreCase(JAX_RS)) {
+ actionText.setEnabled(false);
+ bodyText.setEnabled(true);
+ methodCombo.setEnabled(true);
+ parmsList.setEnabled(true);
+ dlsList.setEnabled(true);
+ parmsTab.getControl().setEnabled(true);
+ headerTab.getControl().setEnabled(true);
+ methodCombo.setText(GET);
+ wsdlButton.setEnabled(false);
+
+ if (bodyText.getText().trim().length() > 0) {
+ bodyText.setText(""); //$NON-NLS-1$
+ }
+ }
+ setMenusForCurrentState();
+ }
+
+ /*
+ * Sets up the controls to call a public sample RESTful WS that does
+ * a postal code lookup or a JAX-WS service that does a
+ * Shakespeare lookup.
+ */
+ private void setupSample() {
+ // go to http://www.geonames.org/export/web-services.html for example
+ //http://ws.geonames.org/postalCodeSearch?postalcode=9011&maxRows=10
+ if (wsTypeCombo.getText().equalsIgnoreCase(JAX_RS)) {
+ urlCombo.setText("http://ws.geonames.org/postalCodeSearch?"); //$NON-NLS-1$
+ parmsList.setSelection("postalcode=80920,maxRows=10"); //$NON-NLS-1$
+ dlsList.setSelection("content-type=application/xml"); //$NON-NLS-1$
+ methodCombo.setText(GET);
+ tabGroup.setSelection(parmsTab);
+ bodyText.setText(EMPTY_STRING);
+ }
+ else if (wsTypeCombo.getText().equalsIgnoreCase(JAX_WS)) {
+ String soapIn = "<?xml version=\"1.0\" standalone=\"yes\" ?>" + //$NON-NLS-1$
+ "<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" " + //$NON-NLS-1$
+ "xmlns:ns=\"http://xmlme.com/WebServices\">" + //$NON-NLS-1$
+ "<soap:Body>" + //$NON-NLS-1$
+ "<ns:GetSpeech>" + //$NON-NLS-1$
+ "<ns:Request>slings and arrows</ns:Request>"+ //$NON-NLS-1$
+ "</ns:GetSpeech>"+ //$NON-NLS-1$
+ "</soap:Body>" + //$NON-NLS-1$
+ "</soap:Envelope>"; //$NON-NLS-1$
+ soapIn = WSTestUtils.addNLsToXML(soapIn);
+
+ urlCombo.setText("http://www.xmlme.com/WSShakespeare.asmx"); //$NON-NLS-1$
+ actionText.setText("http://xmlme.com/WebServices/GetSpeech"); //$NON-NLS-1$
+ bodyText.setText(soapIn);
+ parmsList.setSelection(EMPTY_STRING);
+ dlsList.setSelection(EMPTY_STRING);
+ tabGroup.setSelection(bodyTab);
+ }
+ setControlsForWSType(wsTypeCombo.getText());
+ setControlsForMethodType(methodCombo.getText());
+ setControlsForSelectedURL();
+ }
+
+ /*
+ * Actually perform the test based on which type of activity it is
+ */
+ private void handleTest(final String wsTech) {
+
+ String urlText = urlCombo.getText();
+ try {
+ new URL(urlText);
+ } catch (MalformedURLException mue) {
+ // do nothing, but return since we don't have a working URL
+ return;
+ }
+
+ if (urlCombo.getItemCount() > 0) {
+ java.util.List<String> aList = Arrays.asList(urlCombo.getItems());
+ if (!aList.contains(urlCombo.getText())) {
+ urlCombo.add(urlCombo.getText());
+ }
+ } else {
+ urlCombo.add(urlCombo.getText());
+ }
+
+ final String url = urlCombo.getText();
+ final String action = actionText.getText();
+ final String body = bodyText.getText();
+ final String method = methodCombo.getText();
+ final String headers = dlsList.getSelection();
+ final String parms = parmsList.getSelection();
+
+ Job aJob = new Job(JBossWSUIMessages.JAXRSWSTestView_Invoking_WS_Status) {
+ protected IStatus run(IProgressMonitor monitor) {
+ IStatus status = Status.OK_STATUS;
+ // execute the task ...
+ if (wsTech.equalsIgnoreCase(JAX_RS)) {
+ status = handleRSTest(monitor, url, method, body, parms, headers);
+ }
+ else if (wsTech.equalsIgnoreCase(JAX_WS)) {
+ status = handleWSTest(monitor, url, action, body);
+ }
+ monitor.done();
+ return status;
+ }
+ };
+ // true to indicate that this job was initiated by a UI end user
+ aJob.setUser(true);
+ aJob.addJobChangeListener(new IJobChangeListener() {
+
+ public void sleeping(IJobChangeEvent event) {};
+ public void scheduled(IJobChangeEvent event) {};
+ public void running(IJobChangeEvent event) {};
+ public void done(final IJobChangeEvent event) {
+ if (event.getResult() instanceof WSTestStatus) {
+ final WSTestStatus status = (WSTestStatus) event.getResult();
+ PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
+ public void run() {
+ if (status.getResultsText() != null)
+ resultsText.setText(status.getResultsText());
+ else if (status.getMessage() != null)
+ resultsText.setText(status.getMessage());
+ resultHeadersList.removeAll();
+ String[] headers =
+ DelimitedStringList.parseString(status.getHeadersList(), RESULT_HEADER_DELIMITER);
+ if (headers != null && headers.length > 0) {
+ for (int i = 0; i < headers.length; i++) {
+ resultHeadersList.add(headers[i]);
+ }
+ }
+ }
+ });
+ }
+ }
+
+ public void awake(IJobChangeEvent event) {};
+ public void aboutToRun(IJobChangeEvent event) {};
+ });
+ aJob.schedule();
+
+ setMenusForCurrentState();
+ }
+
+ /*
+ * Actually call the WS and displays the result
+ */
+ private IStatus handleWSTest(final IProgressMonitor monitor, String url, String action, String body) {
+ try {
+
+ envelope = null;
+ soapbody = null;
+ monitor.worked(10);
+// JAXWSTester tester = new JAXWSTester();
+// tester.doTest(url, action, body);
+ JAXWSTester2 tester = new JAXWSTester2();
+ boolean itRan = false;
+ while (!monitor.isCanceled()) {
+ try {
+ if (!itRan && serviceNSMessage != null && serviceNSMessage.length == 3) {
+ itRan = true;
+ // call the service
+ tester.doTest(monitor, url, action, serviceNSMessage[0], serviceNSMessage[1], serviceNSMessage[2], body);
+ } else {
+ break;
+ }
+ } catch (InterruptedException ie) {
+ monitor.setCanceled(true);
+ }
+ }
+ if (monitor.isCanceled()) {
+ WSTestStatus status = new WSTestStatus(IStatus.OK,
+ JBossWSUIPlugin.PLUGIN_ID,
+ JBossWSUIMessages.JAXRSWSTestView_Message_Service_Invocation_Cancelled);
+ return status;
+ }
+ if (!itRan) {
+ WSTestStatus status = new WSTestStatus(IStatus.OK,
+ JBossWSUIPlugin.PLUGIN_ID,
+ JBossWSUIMessages.JAXRSWSTestView_Message_Unsuccessful_Test);
+ return status;
+ }
+// tester.doTest(url, action, serviceNSMessage[0], serviceNSMessage[1], serviceNSMessage[2], body);
+ monitor.worked(70);
+ String result = tester.getResultBody();
+ envelope = tester.getResultSOAP();
+ soapbody = tester.getResultSOAPBody();
+ String cleanedUp = WSTestUtils.addNLsToXML(result);
+
+ WSTestStatus status = new WSTestStatus(IStatus.OK,
+ JBossWSUIPlugin.PLUGIN_ID,
+ JBossWSUIMessages.JAXRSWSTestView_JAXWS_Success_Status);
+ status.setResultsText(cleanedUp);
+ monitor.worked(10);
+
+ String listText = EMPTY_STRING;
+ if (tester.getResultHeaders() != null) {
+ Iterator<?> iter = tester.getResultHeaders().entrySet().iterator();
+ while (iter.hasNext()) {
+ String text = EMPTY_STRING;
+ Entry<?, ?> entry = (Entry<?, ?>) iter.next();
+ if (entry.getKey() == null)
+ text = entry.getValue().toString();
+ else
+ text = text + entry.toString();
+ listText = listText + text;
+ if (iter.hasNext()) {
+ listText = listText + RESULT_HEADER_DELIMITER;
+ }
+ }
+ }
+ status.setHeadersList(listText);
+ monitor.worked(10);
+ return status;
+ } catch (Exception e) {
+ WSTestStatus status = new WSTestStatus(IStatus.OK,
+ JBossWSUIPlugin.PLUGIN_ID,
+ JBossWSUIMessages.JAXRSWSTestView_Exception_Status + e.getLocalizedMessage());
+ status.setResultsText(e.toString());
+ JBossWSUIPlugin.log(e);
+ return status;
+ }
+ }
+
+ /*
+ * Actually call the RESTful WS to test it
+ */
+ private IStatus handleRSTest(final IProgressMonitor monitor, String address, String method, String body, String parms, String headersStr) {
+
+ if (method.equalsIgnoreCase(GET))
+ body = EMPTY_STRING;
+
+ // if no actual text in the request body, set to null
+ if (body.trim().length() == 0) body = null;
+
+ monitor.worked(10);
+
+ // Process parameters for web service call
+ HashMap<String, String> parameters = new HashMap<String, String>();
+ if (parms != null && parms.length() > 0) {
+ String[] parsedList = DelimitedStringList.parseString(parms , ","); //$NON-NLS-1$
+ if (parsedList != null && parsedList.length > 0) {
+ for (int i = 0; i < parsedList.length; i++) {
+ String nameValuePair = parsedList[i];
+ String[] nameAndValue = DelimitedStringList.parseString(nameValuePair, "="); //$NON-NLS-1$
+ if (nameAndValue != null && nameAndValue.length == 2) {
+ parameters.put(nameAndValue[0], nameAndValue[1]);
+ }
+ }
+ }
+ }
+
+ monitor.worked(10);
+ // Process headers for web service call
+ HashMap<String, String> headers = new HashMap<String, String>();
+ if (headersStr != null && headersStr.length() > 0) {
+ String[] parsedList = DelimitedStringList.parseString(headersStr , ","); //$NON-NLS-1$
+ if (parsedList != null && parsedList.length > 0) {
+ for (int i = 0; i < parsedList.length; i++) {
+ String nameValuePair = parsedList[i];
+ String[] nameAndValue = DelimitedStringList.parseString(nameValuePair, "="); //$NON-NLS-1$
+ if (nameAndValue != null && nameAndValue.length == 2) {
+ headers.put(nameAndValue[0], nameAndValue[1]);
+ }
+ }
+ }
+ }
+
+ JAXRSTester tester = new JAXRSTester();
+
+ // now actually call it
+ try {
+
+ // call the service
+ tester.doTest(address, parameters, headers, method, body);
+
+ String result = tester.getResultBody();
+
+ // put the results in the result text field
+ String cleanedUp = WSTestUtils.addNLsToXML(result);
+
+ WSTestStatus status = new WSTestStatus(IStatus.OK,
+ JBossWSUIPlugin.PLUGIN_ID,
+ JBossWSUIMessages.JAXRSWSTestView_JAXRS_Success_Status);
+ status.setResultsText(cleanedUp);
+
+ String listText = EMPTY_STRING;
+ if (tester.getResultHeaders() != null) {
+ Iterator<?> iter = tester.getResultHeaders().entrySet().iterator();
+ while (iter.hasNext()) {
+ String text = EMPTY_STRING;
+ Entry<?, ?> entry = (Entry<?, ?>) iter.next();
+ if (entry.getKey() == null)
+ text = entry.getValue().toString();
+ else
+ text = text + entry.toString();
+ listText = listText + text;
+ if (iter.hasNext()) {
+ listText = listText + RESULT_HEADER_DELIMITER;
+ }
+ }
+ }
+
+ status.setHeadersList(listText);
+ monitor.worked(10);
+ return status;
+
+ } catch (Exception e) {
+ String result = tester.getResultBody();
+
+ // put the results in the result text field
+ String cleanedUp = WSTestUtils.addNLsToXML(result);
+
+ WSTestStatus status = new WSTestStatus(IStatus.OK,
+ JBossWSUIPlugin.PLUGIN_ID,
+ JBossWSUIMessages.JAXRSWSTestView_JAXRS_Success_Status);
+ status.setResultsText(cleanedUp);
+
+ String listText = EMPTY_STRING;
+ if (tester.getResultHeaders() != null) {
+ Iterator<?> iter = tester.getResultHeaders().entrySet().iterator();
+ while (iter.hasNext()) {
+ String text = EMPTY_STRING;
+ Entry<?, ?> entry = (Entry<?, ?>) iter.next();
+ if (entry.getKey() == null)
+ text = entry.getValue().toString();
+ else
+ text = text + entry.toString();
+ listText = listText + text;
+ if (iter.hasNext()) {
+ listText = listText + RESULT_HEADER_DELIMITER;
+ }
+ }
+ }
+
+ status.setHeadersList(listText);
+ monitor.worked(10);
+ return status;
+ }
+ }
+
+ /**
+ * Passing the focus request to the control.
+ */
+ public void setFocus() {
+ // set initial focus to the URL text combo
+// urlCombo.setFocus();
+ form.setFocus();
+ }
+
+}
\ No newline at end of file
Property changes on: trunk/ws/plugins/org.jboss.tools.ws.ui/JAXRSWSTestView2.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/ws/plugins/org.jboss.tools.ws.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/META-INF/MANIFEST.MF 2010-07-13 18:53:45 UTC (rev 23387)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/META-INF/MANIFEST.MF 2010-07-13 20:52:54 UTC (rev 23388)
@@ -30,7 +30,8 @@
org.eclipse.wst.internet.monitor.ui,
javax.wsdl;bundle-version="1.6.2",
org.jdom,
- javax.xml.ws
+ javax.xml.ws,
+ org.eclipse.ui.forms
Bundle-ActivationPolicy: lazy
Export-Package: org.jboss.tools.ws.ui,
org.jboss.tools.ws.ui.messages,
Added: trunk/ws/plugins/org.jboss.tools.ws.ui/icons/obj16/binary.gif
===================================================================
(Binary files differ)
Property changes on: trunk/ws/plugins/org.jboss.tools.ws.ui/icons/obj16/binary.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/ws/plugins/org.jboss.tools.ws.ui/icons/obj16/properties.gif
===================================================================
(Binary files differ)
Property changes on: trunk/ws/plugins/org.jboss.tools.ws.ui/icons/obj16/properties.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/ws/plugins/org.jboss.tools.ws.ui/icons/obj16/run.gif
===================================================================
(Binary files differ)
Property changes on: trunk/ws/plugins/org.jboss.tools.ws.ui/icons/obj16/run.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/ws/plugins/org.jboss.tools.ws.ui/icons/obj16/save_edit.gif
===================================================================
(Binary files differ)
Property changes on: trunk/ws/plugins/org.jboss.tools.ws.ui/icons/obj16/save_edit.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/ws/plugins/org.jboss.tools.ws.ui/icons/obj16/web.gif
===================================================================
(Binary files differ)
Property changes on: trunk/ws/plugins/org.jboss.tools.ws.ui/icons/obj16/web.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/ws/plugins/org.jboss.tools.ws.ui/icons/obj16/wsdl.gif
===================================================================
(Binary files differ)
Property changes on: trunk/ws/plugins/org.jboss.tools.ws.ui/icons/obj16/wsdl.gif
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/ws/plugins/org.jboss.tools.ws.ui/plugin.xml
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/plugin.xml 2010-07-13 18:53:45 UTC (rev 23387)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/plugin.xml 2010-07-13 20:52:54 UTC (rev 23388)
@@ -74,7 +74,7 @@
</category>
<view
category="org.jboss.tools.ws.ui.tester"
- class="org.jboss.tools.ws.ui.views.JAXRSWSTestView"
+ class="org.jboss.tools.ws.ui.views.JAXRSWSTestView2"
icon="icons/obj16/ws_tester.gif"
id="org.jboss.tools.ws.ui.tester.views.TestWSView"
name="%test.view.name">
Modified: trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JBossWSUI.properties
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JBossWSUI.properties 2010-07-13 18:53:45 UTC (rev 23387)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JBossWSUI.properties 2010-07-13 20:52:54 UTC (rev 23388)
@@ -105,6 +105,20 @@
JAXRSWSTestView_Service_URL_Label=Service URL:
JAXRSWSTestView_Set_Sample_Data_Label=Set Sample Data
JAXRSWSTestView_Web_Service_Type_Label=Web Service Type:
+JAXRSWSTestView2_BodyText_Section=Body Text
+JAXRSWSTestView2_GetFromWSDL_Tooltip=Get from WSDL
+JAXRSWSTestView2_Go_Tooltip=Invoke
+JAXRSWSTestView2_Headers_Section=Headers
+JAXRSWSTestView2_OpenInEditor_Action=Open in Editor
+JAXRSWSTestView2_Parameters_Section=Parameters
+JAXRSWSTestView2_RequestDetails_Section=Request Details
+JAXRSWSTestView2_ResponseBody_Section=Response Body
+JAXRSWSTestView2_ResponseDetails_Section=Response Details
+JAXRSWSTestView2_ResponseHeaders_Section=Response Headers
+JAXRSWSTestView2_SaveResponseText_Error=Error Writing Response to File
+JAXRSWSTestView2_SaveResponseText_tooltip=Save to File
+JAXRSWSTestView2_ShowInBrowser_Tooltip=Show in Browser
+JAXRSWSTestView2_ShowRaw_Tooltip=Show Raw
ResultsXMLStorageInput_WS_Invocation_Results_Prefix=Web Service Invocation Results\:
WSDLBrowseDialog_Dialog_Title=Select WSDL
WSDLBrowseDialog_FS_Browse=File system...
@@ -124,6 +138,8 @@
WSDLBrowseDialog_WSDL_URI_Field=WSDL URI:
WSDLBrowseDialog_WSDL_URL_Dialog_Title=WSDL URL
WSDLBrowseDialog_WSDL_URL_Prompt=Type the URL for the WSDL:
+WSTestUtils_SaveResponseText_Error_Msg=Error encountered writing response text to file.
+WSTestUtils_SaveResponseText_Title=Save Response Text
DelimitedStringList_Msg_No_Btn=No
DelimitedStringList_Msg_Text_ParseByAmpersand=Should we parse the string to be added by ampersands '&&' and add each individual string?
DelimitedStringList_Msg_Text_ParseByComma=Should we parse the string to be added by commas ',' and add each individual string?
Modified: trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JBossWSUIMessages.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JBossWSUIMessages.java 2010-07-13 18:53:45 UTC (rev 23387)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JBossWSUIMessages.java 2010-07-13 20:52:54 UTC (rev 23388)
@@ -136,6 +136,20 @@
public static String JAXRSWSTestView_Service_URL_Label;
public static String JAXRSWSTestView_Set_Sample_Data_Label;
public static String JAXRSWSTestView_Web_Service_Type_Label;
+ public static String JAXRSWSTestView2_BodyText_Section;
+ public static String JAXRSWSTestView2_GetFromWSDL_Tooltip;
+ public static String JAXRSWSTestView2_Go_Tooltip;
+ public static String JAXRSWSTestView2_Headers_Section;
+ public static String JAXRSWSTestView2_OpenInEditor_Action;
+ public static String JAXRSWSTestView2_Parameters_Section;
+ public static String JAXRSWSTestView2_RequestDetails_Section;
+ public static String JAXRSWSTestView2_ResponseBody_Section;
+ public static String JAXRSWSTestView2_ResponseDetails_Section;
+ public static String JAXRSWSTestView2_ResponseHeaders_Section;
+ public static String JAXRSWSTestView2_SaveResponseText_Error;
+ public static String JAXRSWSTestView2_SaveResponseText_tooltip;
+ public static String JAXRSWSTestView2_ShowInBrowser_Tooltip;
+ public static String JAXRSWSTestView2_ShowRaw_Tooltip;
public static String ResultsXMLStorageInput_WS_Invocation_Results_Prefix;
public static String WSDLBrowseDialog_Dialog_Title;
@@ -157,6 +171,9 @@
public static String WSDLBrowseDialog_WSDL_URL_Dialog_Title;
public static String WSDLBrowseDialog_WSDL_URL_Prompt;
+ public static String WSTestUtils_SaveResponseText_Error_Msg;
+ public static String WSTestUtils_SaveResponseText_Title;
+
static {
NLS.initializeMessages(BUNDLE_NAME, JBossWSUIMessages.class);
}
Modified: trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/utils/JAXWSTester2.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/utils/JAXWSTester2.java 2010-07-13 18:53:45 UTC (rev 23387)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/utils/JAXWSTester2.java 2010-07-13 20:52:54 UTC (rev 23388)
@@ -120,8 +120,9 @@
this.resultBody = baos.toString();
this.resultSOAPBody = o.getSOAPBody();
- if (d.getResponseContext() != null) {
- Object responseHeaders = d.getResponseContext().get(MessageContext.HTTP_RESPONSE_HEADERS);
+ if (response.getContext() != null) {
+ Object responseHeaders =
+ response.getContext().get(MessageContext.HTTP_RESPONSE_HEADERS);
if ( responseHeaders != null && responseHeaders instanceof Map) {
this.resultHeaders = (Map<String, String>) responseHeaders;
}
Modified: trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/utils/WSTestUtils.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/utils/WSTestUtils.java 2010-07-13 18:53:45 UTC (rev 23387)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/utils/WSTestUtils.java 2010-07-13 20:52:54 UTC (rev 23388)
@@ -10,6 +10,25 @@
******************************************************************************/
package org.jboss.tools.ws.ui.utils;
+import java.io.ByteArrayInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.PrintStream;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.swt.widgets.Shell;
+import org.jboss.tools.ws.ui.JBossWSUIPlugin;
+import org.jboss.tools.ws.ui.messages.JBossWSUIMessages;
+import org.xml.sax.SAXException;
+
/**
* Static utility methods for testing JAX-RS and JAX-WS web services
* @author bfitzpat
@@ -36,4 +55,64 @@
}
return outgoing;
}
+
+ public static IStatus saveTextToFile ( String text ) {
+ FileDialog fd = new FileDialog(new Shell(Display.getCurrent()), SWT.SAVE);
+ fd.setText(JBossWSUIMessages.WSTestUtils_SaveResponseText_Title);
+ String[] filterExt = { "*.txt", "*.xml"}; //$NON-NLS-1$ //$NON-NLS-2$
+ fd.setFilterExtensions(filterExt);
+ String selected = fd.open();
+ if (selected != null) {
+ FileOutputStream out;
+ PrintStream p;
+
+ try
+ {
+ // Create a new file output stream for the file
+ out = new FileOutputStream(selected);
+
+ // Connect print stream to the output stream
+ p = new PrintStream( out );
+
+ // print to it and close
+ p.println (text);
+ p.close();
+
+ return Status.OK_STATUS;
+ }
+ catch (Exception e)
+ {
+ Status rtnStatus = new Status(IStatus.ERROR,
+ JBossWSUIPlugin.PLUGIN_ID,
+ JBossWSUIMessages.WSTestUtils_SaveResponseText_Error_Msg,
+ e);
+ return rtnStatus;
+ }
+ }
+ return Status.CANCEL_STATUS;
+ }
+
+ public static boolean isTextXML ( String text ) {
+ DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
+ dbf.setValidating(false);
+ try {
+ //Using factory get an instance of document builder
+ DocumentBuilder db = dbf.newDocumentBuilder();
+
+ ByteArrayInputStream bais = new ByteArrayInputStream(text.getBytes());
+
+ //parse using builder to get DOM representation of the XML file
+ db.parse(bais);
+
+ return true;
+
+ }catch(ParserConfigurationException pce) {
+ // ignore
+ }catch(SAXException se) {
+ // ignore
+ } catch (IOException e) {
+ // ignore
+ }
+ return false;
+ }
}
Modified: trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/views/DelimitedStringList.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/views/DelimitedStringList.java 2010-07-13 18:53:45 UTC (rev 23387)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/views/DelimitedStringList.java 2010-07-13 20:52:54 UTC (rev 23388)
@@ -55,6 +55,7 @@
private Text mAddText;
private boolean isReadOnly = false;
private Label mWarningLabel;
+ private boolean showUpDown = true;
// current delimiter
private String mDelimiter = DELIMITER;
@@ -86,7 +87,7 @@
* @param style
*/
public DelimitedStringList(Composite parent, int style) {
- this(parent, style, false);
+ this(parent, style, false, true);
}
/**
@@ -95,9 +96,10 @@
* @param parent
* @param style
*/
- public DelimitedStringList(Composite parent, int style, boolean isReadOnly) {
+ public DelimitedStringList(Composite parent, int style, boolean isReadOnly, boolean showUpDown) {
super(parent, style);
this.isReadOnly = isReadOnly;
+ this.showUpDown = showUpDown;
this.changeListeners = new ListenerList();
int additionalStyles = SWT.NONE;
@@ -116,6 +118,7 @@
wlGridData.horizontalSpan = 2;
this.mWarningLabel.setLayoutData(wlGridData);
this.mWarningLabel.setForeground(this.mWarningLabel.getDisplay().getSystemColor(SWT.COLOR_RED));
+ this.mWarningLabel.setBackground(parent.getBackground());
}
{
this.mAddText = new Text(this, SWT.BORDER | additionalStyles);
@@ -144,13 +147,17 @@
gridData.horizontalSpan = 2;
mSpacerComposite.setLayoutData(gridData);
mSpacerComposite.setLayout(new GridLayout());
+ mSpacerComposite.setBackground(parent.getBackground());
}
{
this.mPropsList = new List(this, SWT.BORDER | SWT.V_SCROLL);
final GridData gridData = new GridData(
GridData.HORIZONTAL_ALIGN_FILL
| GridData.VERTICAL_ALIGN_FILL);
- gridData.verticalSpan = 5;
+ if (getShowUpDown())
+ gridData.verticalSpan = 5;
+ else
+ gridData.verticalSpan = 3;
this.mPropsList.setLayoutData(gridData);
this.mPropsList.addSelectionListener(new SelectionAdapter() {
@@ -159,7 +166,7 @@
}
});
}
- {
+ if (getShowUpDown()) {
this.mUpButton = new Button(this, SWT.NONE);
this.mUpButton.setLayoutData(new GridData(
GridData.HORIZONTAL_ALIGN_FILL));
@@ -171,8 +178,7 @@
moveUpInList();
}
});
- }
- {
+
this.mDownButton = new Button(this, SWT.NONE);
this.mDownButton.setLayoutData(new GridData(
GridData.HORIZONTAL_ALIGN_FILL));
@@ -424,8 +430,10 @@
*/
public void updatePropertyButtons() {
if (!isReadOnly){
- this.mDownButton.setEnabled(false);
- this.mUpButton.setEnabled(false);
+ if (this.mUpButton != null) {
+ this.mUpButton.setEnabled(false);
+ this.mDownButton.setEnabled(false);
+ }
this.mRemoveButton.setEnabled(false);
this.mEditButton.setEnabled(false);
this.mClearAllButton.setEnabled(false);
@@ -440,11 +448,13 @@
this.mRemoveButton.setEnabled(true);
this.mEditButton.setEnabled(true);
- if (selection - 1 >= 0)
- this.mUpButton.setEnabled(true);
-
- if (selection + 1 < this.mPropsList.getItemCount())
- this.mDownButton.setEnabled(true);
+ if (this.mUpButton != null) {
+ if (selection - 1 >= 0)
+ this.mUpButton.setEnabled(true);
+
+ if (selection + 1 < this.mPropsList.getItemCount())
+ this.mDownButton.setEnabled(true);
+ }
}
}
@@ -585,13 +595,23 @@
mAddButton.setEnabled(enabled);
mAddText.setEnabled(enabled);
mClearAllButton.setEnabled(enabled);
- mDownButton.setEnabled(enabled);
+ if (this.mUpButton != null) {
+ mUpButton.setEnabled(enabled);
+ mDownButton.setEnabled(enabled);
+ }
mEditButton.setEnabled(enabled);
mPropsList.setEnabled(enabled);
mRemoveButton.setEnabled(enabled);
- mUpButton.setEnabled(enabled);
if (enabled)
updatePropertyButtons();
}
+
+ public void setShowUpDown ( boolean flag ) {
+ this.showUpDown = flag;
+ }
+
+ public boolean getShowUpDown() {
+ return this.showUpDown;
+ }
}
Added: trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/views/FormLayoutFactory.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/views/FormLayoutFactory.java (rev 0)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/views/FormLayoutFactory.java 2010-07-13 20:52:54 UTC (rev 23388)
@@ -0,0 +1,397 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.jboss.tools.ws.ui.views;
+
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.forms.widgets.TableWrapLayout;
+
+/**
+ * FormLayoutFactory
+ *
+ */
+public class FormLayoutFactory {
+
+ // Used in place of 0. If 0 is used, widget borders will appear clipped
+ // on some platforms (e.g. Windows XP Classic Theme).
+ // Form tool kit requires parent composites containing the widget to have
+ // at least 1 pixel border margins in order to paint the flat borders.
+ // The form toolkit paints flat borders on a given widget when native
+ // borders are not painted by SWT. See FormToolkit#paintBordersFor()
+ public static final int DEFAULT_CLEAR_MARGIN = 2;
+
+ // Required to allow space for field decorations
+ public static final int CONTROL_HORIZONTAL_INDENT = 3;
+
+ // UI Forms Standards
+
+ // FORM BODY
+ public static final int FORM_BODY_MARGIN_TOP = 12;
+ public static final int FORM_BODY_MARGIN_BOTTOM = 12;
+ public static final int FORM_BODY_MARGIN_LEFT = 6;
+ public static final int FORM_BODY_MARGIN_RIGHT = 6;
+ public static final int FORM_BODY_HORIZONTAL_SPACING = 20;
+ // Should be 20; but, we minus 3 because the section automatically pads the
+ // bottom margin by that amount
+ public static final int FORM_BODY_VERTICAL_SPACING = 17;
+ public static final int FORM_BODY_MARGIN_HEIGHT = 0;
+ public static final int FORM_BODY_MARGIN_WIDTH = 0;
+
+ // SECTION CLIENT
+ public static final int SECTION_CLIENT_MARGIN_TOP = 5;
+ public static final int SECTION_CLIENT_MARGIN_BOTTOM = 5;
+ // Should be 6; but, we minus 4 because the section automatically pads the
+ // left margin by that amount
+ public static final int SECTION_CLIENT_MARGIN_LEFT = 2;
+ // Should be 6; but, we minus 4 because the section automatically pads the
+ // right margin by that amount
+ public static final int SECTION_CLIENT_MARGIN_RIGHT = 2;
+ public static final int SECTION_CLIENT_HORIZONTAL_SPACING = 5;
+ public static final int SECTION_CLIENT_VERTICAL_SPACING = 5;
+ public static final int SECTION_CLIENT_MARGIN_HEIGHT = 0;
+ public static final int SECTION_CLIENT_MARGIN_WIDTH = 0;
+
+ public static final int SECTION_HEADER_VERTICAL_SPACING = 6;
+
+ // CLEAR
+ public static final int CLEAR_MARGIN_TOP = DEFAULT_CLEAR_MARGIN;
+ public static final int CLEAR_MARGIN_BOTTOM = DEFAULT_CLEAR_MARGIN;
+ public static final int CLEAR_MARGIN_LEFT = DEFAULT_CLEAR_MARGIN;
+ public static final int CLEAR_MARGIN_RIGHT = DEFAULT_CLEAR_MARGIN;
+ public static final int CLEAR_HORIZONTAL_SPACING = 0;
+ public static final int CLEAR_VERTICAL_SPACING = 0;
+ public static final int CLEAR_MARGIN_HEIGHT = 0;
+ public static final int CLEAR_MARGIN_WIDTH = 0;
+
+ // FORM PANE
+ public static final int FORM_PANE_MARGIN_TOP = 0;
+ public static final int FORM_PANE_MARGIN_BOTTOM = 0;
+ public static final int FORM_PANE_MARGIN_LEFT = 0;
+ public static final int FORM_PANE_MARGIN_RIGHT = 0;
+ public static final int FORM_PANE_HORIZONTAL_SPACING = FORM_BODY_HORIZONTAL_SPACING;
+ public static final int FORM_PANE_VERTICAL_SPACING = FORM_BODY_VERTICAL_SPACING;
+ public static final int FORM_PANE_MARGIN_HEIGHT = 0;
+ public static final int FORM_PANE_MARGIN_WIDTH = 0;
+
+ // MASTER DETAILS
+ public static final int MASTER_DETAILS_MARGIN_TOP = 0;
+ public static final int MASTER_DETAILS_MARGIN_BOTTOM = 0;
+ // Used only by masters part. Details part margin dynamically calculated
+ public static final int MASTER_DETAILS_MARGIN_LEFT = 0;
+ // Used only by details part. Masters part margin dynamically calcualated
+ public static final int MASTER_DETAILS_MARGIN_RIGHT = 1;
+ public static final int MASTER_DETAILS_HORIZONTAL_SPACING = FORM_BODY_HORIZONTAL_SPACING;
+ public static final int MASTER_DETAILS_VERTICAL_SPACING = FORM_BODY_VERTICAL_SPACING;
+ public static final int MASTER_DETAILS_MARGIN_HEIGHT = 0;
+ public static final int MASTER_DETAILS_MARGIN_WIDTH = 0;
+
+ /**
+ *
+ */
+ private FormLayoutFactory() {
+ // NO-OP
+ }
+
+ /**
+ * For form bodies.
+ * @param makeColumnsEqualWidth
+ * @param numColumns
+ * @return
+ */
+ public static GridLayout createFormGridLayout(boolean makeColumnsEqualWidth, int numColumns) {
+ GridLayout layout = new GridLayout();
+
+ layout.marginHeight = FORM_BODY_MARGIN_HEIGHT;
+ layout.marginWidth = FORM_BODY_MARGIN_WIDTH;
+
+ layout.marginTop = FORM_BODY_MARGIN_TOP;
+ layout.marginBottom = FORM_BODY_MARGIN_BOTTOM;
+ layout.marginLeft = FORM_BODY_MARGIN_LEFT;
+ layout.marginRight = FORM_BODY_MARGIN_RIGHT;
+
+ layout.horizontalSpacing = FORM_BODY_HORIZONTAL_SPACING;
+ layout.verticalSpacing = FORM_BODY_VERTICAL_SPACING;
+
+ layout.makeColumnsEqualWidth = makeColumnsEqualWidth;
+ layout.numColumns = numColumns;
+
+ return layout;
+ }
+
+ /**
+ * For miscellaneous grouping composites.
+ * For sections (as a whole - header plus client).
+ * @param makeColumnsEqualWidth
+ * @param numColumns
+ * @return
+ */
+ public static GridLayout createClearGridLayout(boolean makeColumnsEqualWidth, int numColumns) {
+ GridLayout layout = new GridLayout();
+
+ layout.marginHeight = CLEAR_MARGIN_HEIGHT;
+ layout.marginWidth = CLEAR_MARGIN_WIDTH;
+
+ layout.marginTop = CLEAR_MARGIN_TOP;
+ layout.marginBottom = CLEAR_MARGIN_BOTTOM;
+ layout.marginLeft = CLEAR_MARGIN_LEFT;
+ layout.marginRight = CLEAR_MARGIN_RIGHT;
+
+ layout.horizontalSpacing = CLEAR_HORIZONTAL_SPACING;
+ layout.verticalSpacing = CLEAR_VERTICAL_SPACING;
+
+ layout.makeColumnsEqualWidth = makeColumnsEqualWidth;
+ layout.numColumns = numColumns;
+
+ return layout;
+ }
+
+ /**
+ * For form bodies.
+ * @param makeColumnsEqualWidth
+ * @param numColumns
+ * @return
+ */
+ public static TableWrapLayout createFormTableWrapLayout(boolean makeColumnsEqualWidth, int numColumns) {
+ TableWrapLayout layout = new TableWrapLayout();
+
+ layout.topMargin = FORM_BODY_MARGIN_TOP;
+ layout.bottomMargin = FORM_BODY_MARGIN_BOTTOM;
+ layout.leftMargin = FORM_BODY_MARGIN_LEFT;
+ layout.rightMargin = FORM_BODY_MARGIN_RIGHT;
+
+ layout.horizontalSpacing = FORM_BODY_HORIZONTAL_SPACING;
+ layout.verticalSpacing = FORM_BODY_VERTICAL_SPACING;
+
+ layout.makeColumnsEqualWidth = makeColumnsEqualWidth;
+ layout.numColumns = numColumns;
+
+ return layout;
+ }
+
+ /**
+ * For composites used to group sections in left and right panes.
+ * @param makeColumnsEqualWidth
+ * @param numColumns
+ * @return
+ */
+ public static TableWrapLayout createFormPaneTableWrapLayout(boolean makeColumnsEqualWidth, int numColumns) {
+ TableWrapLayout layout = new TableWrapLayout();
+
+ layout.topMargin = FORM_PANE_MARGIN_TOP;
+ layout.bottomMargin = FORM_PANE_MARGIN_BOTTOM;
+ layout.leftMargin = FORM_PANE_MARGIN_LEFT;
+ layout.rightMargin = FORM_PANE_MARGIN_RIGHT;
+
+ layout.horizontalSpacing = FORM_PANE_HORIZONTAL_SPACING;
+ layout.verticalSpacing = FORM_PANE_VERTICAL_SPACING;
+
+ layout.makeColumnsEqualWidth = makeColumnsEqualWidth;
+ layout.numColumns = numColumns;
+
+ return layout;
+ }
+
+ /**
+ * For composites used to group sections in left and right panes.
+ * @param makeColumnsEqualWidth
+ * @param numColumns
+ * @return
+ */
+ public static GridLayout createFormPaneGridLayout(boolean makeColumnsEqualWidth, int numColumns) {
+ GridLayout layout = new GridLayout();
+
+ layout.marginHeight = FORM_PANE_MARGIN_HEIGHT;
+ layout.marginWidth = FORM_PANE_MARGIN_WIDTH;
+
+ layout.marginTop = FORM_PANE_MARGIN_TOP;
+ layout.marginBottom = FORM_PANE_MARGIN_BOTTOM;
+ layout.marginLeft = FORM_PANE_MARGIN_LEFT;
+ layout.marginRight = FORM_PANE_MARGIN_RIGHT;
+
+ layout.horizontalSpacing = FORM_PANE_HORIZONTAL_SPACING;
+ layout.verticalSpacing = FORM_PANE_VERTICAL_SPACING;
+
+ layout.makeColumnsEqualWidth = makeColumnsEqualWidth;
+ layout.numColumns = numColumns;
+
+ return layout;
+ }
+
+ /**
+ * For miscellaneous grouping composites.
+ * For sections (as a whole - header plus client).
+ * @param makeColumnsEqualWidth
+ * @param numColumns
+ * @return
+ */
+ public static TableWrapLayout createClearTableWrapLayout(boolean makeColumnsEqualWidth, int numColumns) {
+ TableWrapLayout layout = new TableWrapLayout();
+
+ layout.topMargin = CLEAR_MARGIN_TOP;
+ layout.bottomMargin = CLEAR_MARGIN_BOTTOM;
+ layout.leftMargin = CLEAR_MARGIN_LEFT;
+ layout.rightMargin = CLEAR_MARGIN_RIGHT;
+
+ layout.horizontalSpacing = CLEAR_HORIZONTAL_SPACING;
+ layout.verticalSpacing = CLEAR_VERTICAL_SPACING;
+
+ layout.makeColumnsEqualWidth = makeColumnsEqualWidth;
+ layout.numColumns = numColumns;
+
+ return layout;
+ }
+
+ /**
+ * For master sections belonging to a master details block.
+ * @param makeColumnsEqualWidth
+ * @param numColumns
+ * @return
+ */
+ public static GridLayout createMasterGridLayout(boolean makeColumnsEqualWidth, int numColumns) {
+ GridLayout layout = new GridLayout();
+
+ layout.marginHeight = MASTER_DETAILS_MARGIN_HEIGHT;
+ layout.marginWidth = MASTER_DETAILS_MARGIN_WIDTH;
+
+ layout.marginTop = MASTER_DETAILS_MARGIN_TOP;
+ layout.marginBottom = MASTER_DETAILS_MARGIN_BOTTOM;
+ layout.marginLeft = MASTER_DETAILS_MARGIN_LEFT;
+ // Cannot set layout on a sash form.
+ // In order to replicate the horizontal spacing between sections,
+ // divide the amount by 2 and set the master section right margin to
+ // half the amount and set the left details section margin to half
+ // the amount. The default sash width is currently set at 3.
+ // Minus 1 pixel from each half. Use the 1 left over pixel to separate
+ // the details section from the vertical scollbar.
+ int marginRight = MASTER_DETAILS_HORIZONTAL_SPACING;
+ if (marginRight > 0) {
+ marginRight = marginRight / 2;
+ if (marginRight > 0) {
+ marginRight--;
+ }
+ }
+ layout.marginRight = marginRight;
+
+ layout.horizontalSpacing = MASTER_DETAILS_HORIZONTAL_SPACING;
+ layout.verticalSpacing = MASTER_DETAILS_VERTICAL_SPACING;
+
+ layout.makeColumnsEqualWidth = makeColumnsEqualWidth;
+ layout.numColumns = numColumns;
+
+ return layout;
+ }
+
+ /**
+ * For details sections belonging to a master details block.
+ * @param makeColumnsEqualWidth
+ * @param numColumns
+ * @return
+ */
+ public static GridLayout createDetailsGridLayout(boolean makeColumnsEqualWidth, int numColumns) {
+ GridLayout layout = new GridLayout();
+
+ layout.marginHeight = MASTER_DETAILS_MARGIN_HEIGHT;
+ layout.marginWidth = MASTER_DETAILS_MARGIN_WIDTH;
+
+ layout.marginTop = MASTER_DETAILS_MARGIN_TOP;
+ layout.marginBottom = MASTER_DETAILS_MARGIN_BOTTOM;
+ // Cannot set layout on a sash form.
+ // In order to replicate the horizontal spacing between sections,
+ // divide the amount by 2 and set the master section right margin to
+ // half the amount and set the left details section margin to half
+ // the amount. The default sash width is currently set at 3.
+ // Minus 1 pixel from each half. Use the 1 left over pixel to separate
+ // the details section from the vertical scollbar.
+ int marginLeft = MASTER_DETAILS_HORIZONTAL_SPACING;
+ if (marginLeft > 0) {
+ marginLeft = marginLeft / 2;
+ if (marginLeft > 0) {
+ marginLeft--;
+ }
+ }
+ layout.marginLeft = marginLeft;
+ layout.marginRight = MASTER_DETAILS_MARGIN_RIGHT;
+
+ layout.horizontalSpacing = MASTER_DETAILS_HORIZONTAL_SPACING;
+ layout.verticalSpacing = MASTER_DETAILS_VERTICAL_SPACING;
+
+ layout.makeColumnsEqualWidth = makeColumnsEqualWidth;
+ layout.numColumns = numColumns;
+
+ return layout;
+ }
+
+ /**
+ * For composites set as section clients.
+ * For composites containg form text.
+ * @param makeColumnsEqualWidth
+ * @param numColumns
+ * @return
+ */
+ public static GridLayout createSectionClientGridLayout(boolean makeColumnsEqualWidth, int numColumns) {
+ GridLayout layout = new GridLayout();
+
+ layout.marginHeight = SECTION_CLIENT_MARGIN_HEIGHT;
+ layout.marginWidth = SECTION_CLIENT_MARGIN_WIDTH;
+
+ layout.marginTop = SECTION_CLIENT_MARGIN_TOP;
+ layout.marginBottom = SECTION_CLIENT_MARGIN_BOTTOM;
+ layout.marginLeft = SECTION_CLIENT_MARGIN_LEFT;
+ layout.marginRight = SECTION_CLIENT_MARGIN_RIGHT;
+
+ layout.horizontalSpacing = SECTION_CLIENT_HORIZONTAL_SPACING;
+ layout.verticalSpacing = SECTION_CLIENT_VERTICAL_SPACING;
+
+ layout.makeColumnsEqualWidth = makeColumnsEqualWidth;
+ layout.numColumns = numColumns;
+
+ return layout;
+ }
+
+ /**
+ * For composites set as section clients.
+ * For composites containg form text.
+ * @param makeColumnsEqualWidth
+ * @param numColumns
+ * @return
+ */
+ public static TableWrapLayout createSectionClientTableWrapLayout(boolean makeColumnsEqualWidth, int numColumns) {
+ TableWrapLayout layout = new TableWrapLayout();
+
+ layout.topMargin = SECTION_CLIENT_MARGIN_TOP;
+ layout.bottomMargin = SECTION_CLIENT_MARGIN_BOTTOM;
+ layout.leftMargin = SECTION_CLIENT_MARGIN_LEFT;
+ layout.rightMargin = SECTION_CLIENT_MARGIN_RIGHT;
+
+ layout.horizontalSpacing = SECTION_CLIENT_HORIZONTAL_SPACING;
+ layout.verticalSpacing = SECTION_CLIENT_VERTICAL_SPACING;
+
+ layout.makeColumnsEqualWidth = makeColumnsEqualWidth;
+ layout.numColumns = numColumns;
+
+ return layout;
+ }
+
+ /**
+ * Debug method.
+ *
+ * MAGENTA = 11
+ * CYAN = 13
+ * GREEN = 5
+ * @param container
+ * @param color
+ */
+ public static void visualizeLayoutArea(Composite container, int color) {
+ container.setBackground(Display.getCurrent().getSystemColor(color));
+ }
+}
Property changes on: trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/views/FormLayoutFactory.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/views/JAXRSWSTestView2.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/views/JAXRSWSTestView2.java (rev 0)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/views/JAXRSWSTestView2.java 2010-07-13 20:52:54 UTC (rev 23388)
@@ -0,0 +1,1139 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.ws.ui.views;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map.Entry;
+
+import javax.wsdl.Definition;
+import javax.xml.soap.SOAPBody;
+import javax.xml.soap.SOAPEnvelope;
+import javax.xml.soap.SOAPException;
+
+import org.apache.axis.utils.XMLUtils;
+import org.eclipse.core.resources.IStorage;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.IJobChangeEvent;
+import org.eclipse.core.runtime.jobs.IJobChangeListener;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.action.ToolBarManager;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.ImageRegistry;
+import org.eclipse.jface.window.Window;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.browser.Browser;
+import org.eclipse.swt.custom.SashForm;
+import org.eclipse.swt.dnd.Clipboard;
+import org.eclipse.swt.dnd.TextTransfer;
+import org.eclipse.swt.dnd.Transfer;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.FocusListener;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.KeyListener;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.MouseListener;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.CoolBar;
+import org.eclipse.swt.widgets.CoolItem;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.List;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.MenuItem;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.widgets.ToolBar;
+import org.eclipse.swt.widgets.ToolItem;
+import org.eclipse.ui.IStorageEditorInput;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.forms.events.ExpansionAdapter;
+import org.eclipse.ui.forms.events.ExpansionEvent;
+import org.eclipse.ui.forms.widgets.ExpandableComposite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.ScrolledForm;
+import org.eclipse.ui.forms.widgets.ScrolledPageBook;
+import org.eclipse.ui.forms.widgets.Section;
+import org.eclipse.ui.part.ViewPart;
+import org.jboss.tools.ws.ui.JBossWSUIPlugin;
+import org.jboss.tools.ws.ui.messages.JBossWSUIMessages;
+import org.jboss.tools.ws.ui.utils.JAXRSTester;
+import org.jboss.tools.ws.ui.utils.JAXWSTester2;
+import org.jboss.tools.ws.ui.utils.ResultsXMLStorage;
+import org.jboss.tools.ws.ui.utils.ResultsXMLStorageInput;
+import org.jboss.tools.ws.ui.utils.TesterWSDLUtils;
+import org.jboss.tools.ws.ui.utils.WSTestUtils;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+/**
+ * View for testing web services (JAX-WS & JAX-RS)
+ * @author bfitzpat
+ *
+ */
+public class JAXRSWSTestView2 extends ViewPart {
+
+ private static final String PAGE1_KEY = "page1"; //$NON-NLS-1$
+ private static final String PAGE2_KEY = "page2"; //$NON-NLS-1$
+ private static final String DEFAULT_TEXT_EDITOR_ID = "org.eclipse.ui.DefaultTextEditor"; //$NON-NLS-1$
+ private static final String XML_EDITOR_ID = "org.eclipse.wst.xml.ui.internal.tabletree.XMLMultiPageEditorPart"; //$NON-NLS-1$
+ private static final String DELETE = "DELETE";//$NON-NLS-1$
+ private static final String PUT = "PUT";//$NON-NLS-1$
+ private static final String POST = "POST";//$NON-NLS-1$
+ private static final String GET = "GET";//$NON-NLS-1$
+ private static final String JAX_WS = "JAX-WS"; //$NON-NLS-1$
+ private static final String JAX_RS = "JAX-RS"; //$NON-NLS-1$
+ private static final String EMPTY_STRING = ""; //$NON-NLS-1$
+ private static final String RESULT_HEADER_DELIMITER = "%";//$NON-NLS-1$
+
+ /**
+ * The ID of the view as specified by the extension.
+ */
+ public static final String ID = "org.jboss.tools.ws.ui.tester.views.TestWSView";//$NON-NLS-1$
+
+ /* UI controls */
+ private Text resultsText;
+ private Browser resultsBrowser;
+ private Combo urlCombo;
+ private DelimitedStringList dlsList;
+ private Combo methodCombo;
+ private Text bodyText;
+ private List resultHeadersList;
+
+ private DelimitedStringList parmsList;
+
+ private SOAPEnvelope envelope;
+ private SOAPBody soapbody;
+ private MenuItem openInXMLEditorAction;
+ private MenuItem openResponseTagInXMLEditor;
+ private Menu resultsTextMenu;
+ private MenuItem copyMenuAction;
+ private Menu resultsHeaderMenu;
+ private MenuItem copyResultHeaderMenuAction;
+
+ private String[] serviceNSMessage = null;
+ private String actionText = null;
+
+ private FormToolkit toolkit;
+ private ScrolledForm form;
+ private ImageRegistry mImageRegistry;
+
+ private static final String IMG_DESC_WSDL = "icons/obj16/wsdl.gif"; //$NON-NLS-1$
+ private static final String IMG_DESC_START = "icons/obj16/run.gif"; //$NON-NLS-1$
+
+ private static final String IMG_DESC_SHOWRAW = "icons/obj16/binary.gif"; //$NON-NLS-1$
+ private static final String IMG_DESC_SHOWWEB = "icons/obj16/web.gif"; //$NON-NLS-1$
+ private static final String IMG_DESC_SHOWEDITOR = "icons/obj16/properties.gif"; //$NON-NLS-1$
+ private static final String IMG_DESC_SAVE = "icons/obj16/save_edit.gif"; //$NON-NLS-1$
+
+ private ToolItem openWSDLToolItem;
+ private ToolItem startToolItem;
+ private ScrolledPageBook pageBook;
+ private ShowRawAction rawAction;
+ private ShowInBrowserAction browserAction;
+
+ /**
+ * The constructor.
+ */
+ public JAXRSWSTestView2() {
+ }
+
+ private void getImages() {
+ mImageRegistry = new ImageRegistry();
+ mImageRegistry.put(IMG_DESC_WSDL, ImageDescriptor
+ .createFromURL(JBossWSUIPlugin.getDefault().getBundle()
+ .getEntry(IMG_DESC_WSDL)));
+ mImageRegistry.put(IMG_DESC_START, ImageDescriptor
+ .createFromURL(JBossWSUIPlugin.getDefault().getBundle()
+ .getEntry(IMG_DESC_START)));
+ mImageRegistry.put(IMG_DESC_SHOWRAW, ImageDescriptor
+ .createFromURL(JBossWSUIPlugin.getDefault().getBundle()
+ .getEntry(IMG_DESC_SHOWRAW)));
+ mImageRegistry.put(IMG_DESC_SHOWWEB, ImageDescriptor
+ .createFromURL(JBossWSUIPlugin.getDefault().getBundle()
+ .getEntry(IMG_DESC_SHOWWEB)));
+ mImageRegistry.put(IMG_DESC_SHOWEDITOR, ImageDescriptor
+ .createFromURL(JBossWSUIPlugin.getDefault().getBundle()
+ .getEntry(IMG_DESC_SHOWEDITOR)));
+ mImageRegistry.put(IMG_DESC_SAVE, ImageDescriptor
+ .createFromURL(JBossWSUIPlugin.getDefault().getBundle()
+ .getEntry(IMG_DESC_SAVE)));
+ }
+
+ private void createResponseToolbar ( ExpandableComposite parent ) {
+
+ // create a couple of actions for toggling views
+ rawAction = new ShowRawAction();
+ rawAction.setChecked(true);
+ browserAction = new ShowInBrowserAction();
+
+ ToolBarManager toolBarManager = new ToolBarManager(SWT.FLAT);
+ ToolBar toolbar = toolBarManager.createControl(parent);
+
+ toolBarManager.add(new FileSaveAction());
+ toolBarManager.add(new OpenInXMLEditorAction());
+ toolBarManager.add(rawAction);
+ toolBarManager.add(browserAction);
+
+ toolBarManager.update(true);
+
+ parent.setTextClient(toolbar);
+ }
+
+ class FormExpansionAdapter extends ExpansionAdapter {
+ public void expansionStateChanged(ExpansionEvent e) {
+ form.setRedraw(false);
+ form.reflow(true);
+ form.layout(true, true);
+ form.setRedraw(true);
+ }
+ }
+
+ class OpenInXMLEditorAction extends Action {
+ @Override
+ public void run() {
+ openXMLEditor(resultsText.getText());
+ }
+ @Override
+ public String getToolTipText() {
+ return JBossWSUIMessages.JAXRSWSTestView2_OpenInEditor_Action;
+ }
+ @Override
+ public ImageDescriptor getImageDescriptor() {
+ return mImageRegistry.getDescriptor(IMG_DESC_SHOWEDITOR);
+ }
+ }
+
+ class FileSaveAction extends Action {
+ @Override
+ public void run() {
+ IStatus status =
+ WSTestUtils.saveTextToFile(resultsText.getText());
+ if (status.getCode() == IStatus.ERROR) {
+ MessageDialog.openError(new Shell(Display.getCurrent()),
+ JBossWSUIMessages.JAXRSWSTestView2_SaveResponseText_Error,
+ status.getMessage());
+ }
+ }
+ @Override
+ public String getToolTipText() {
+ return JBossWSUIMessages.JAXRSWSTestView2_SaveResponseText_tooltip;
+ }
+ @Override
+ public ImageDescriptor getImageDescriptor() {
+ return mImageRegistry.getDescriptor(IMG_DESC_SAVE);
+ }
+ }
+
+ class ToggleAction extends Action {
+ public ToggleAction ( ) {
+ super(null, IAction.AS_CHECK_BOX);
+ }
+ }
+
+ class ShowInBrowserAction extends ToggleAction {
+ public void run() {
+ if (rawAction.isChecked()) rawAction.setChecked(false);
+ if (JAXRSWSTestView2.this.resultsText.getText().length() > 0 ) {
+ JAXRSWSTestView2.this.resultsBrowser.setText
+ (JAXRSWSTestView2.this.resultsText.getText());
+ }
+ JAXRSWSTestView2.this.pageBook.showPage(PAGE2_KEY);
+ }
+ @Override
+ public String getToolTipText() {
+ return JBossWSUIMessages.JAXRSWSTestView2_ShowInBrowser_Tooltip;
+ }
+ @Override
+ public ImageDescriptor getImageDescriptor() {
+ return mImageRegistry.getDescriptor(IMG_DESC_SHOWWEB);
+ }
+ }
+
+ class ShowRawAction extends ToggleAction {
+ public void run() {
+ if (browserAction.isChecked()) browserAction.setChecked(false);
+ JAXRSWSTestView2.this.pageBook.showPage(PAGE1_KEY);
+ }
+ @Override
+ public String getToolTipText() {
+ return JBossWSUIMessages.JAXRSWSTestView2_ShowRaw_Tooltip;
+ }
+ @Override
+ public ImageDescriptor getImageDescriptor() {
+ return mImageRegistry.getDescriptor(IMG_DESC_SHOWRAW);
+ }
+ }
+
+ private String getCurrentTestType() {
+ if (methodCombo.getText().equalsIgnoreCase(JAX_WS))
+ return JAX_WS;
+ return JAX_RS;
+ }
+
+ private void createURLAndToolbar( ) {
+ urlCombo = new Combo(form.getBody(), SWT.BORDER | SWT.DROP_DOWN);
+ GridData gdURL = new GridData(SWT.FILL, SWT.NONE, true, false);
+ urlCombo.setLayoutData(gdURL);
+ toolkit.adapt(urlCombo);
+
+ urlCombo.addKeyListener(new KeyListener() {
+ public void keyPressed(KeyEvent e) {
+ }
+
+ public void keyReleased(KeyEvent e) {
+ setControlsForSelectedURL();
+ if (e.keyCode == SWT.CR && e.stateMask == SWT.CTRL) {
+ handleTest(getCurrentTestType());
+ }
+ }
+ });
+ urlCombo.addSelectionListener(new SelectionListener() {
+ public void widgetDefaultSelected(SelectionEvent e) {
+ widgetSelected(e);
+ }
+ public void widgetSelected(SelectionEvent e) {
+ setControlsForSelectedURL();
+ }
+ });
+
+ Composite comp1 = toolkit.createComposite(form.getBody());
+ comp1.setLayoutData(new GridData(SWT.END, SWT.NONE, false, false));
+ comp1.setLayout(new FillLayout());
+
+ CoolBar coolBar = new CoolBar(comp1, SWT.FLAT);
+ coolBar.setLocked(true);
+ coolBar.setBackground(form.getBody().getBackground());
+
+ CoolItem wsMethodCoolItem = new CoolItem(coolBar, SWT.PUSH | SWT.FLAT);
+ methodCombo = new Combo(coolBar, SWT.BORDER | SWT.READ_ONLY);
+ methodCombo.setBackground(form.getBody().getBackground());
+ String[] methods = {JAX_WS, GET, POST, PUT, DELETE};
+ methodCombo.setItems(methods);
+ methodCombo.pack();
+ Point size = methodCombo.computeSize (SWT.DEFAULT, SWT.DEFAULT);
+ wsMethodCoolItem.setPreferredSize (wsMethodCoolItem.computeSize (size.x, size.y));
+ wsMethodCoolItem.setControl(methodCombo);
+ methodCombo.addSelectionListener(new SelectionListener() {
+ public void widgetDefaultSelected(SelectionEvent e) {
+ widgetSelected(e);
+ }
+ public void widgetSelected(SelectionEvent e) {
+ setControlsForWSType(getCurrentTestType());
+ setControlsForMethodType(methodCombo.getText());
+ setControlsForSelectedURL();
+ }
+ });
+ toolkit.adapt(methodCombo);
+
+ CoolItem topCoolItem = new CoolItem(coolBar, SWT.FLAT);
+
+ ToolBar topToolBar = new ToolBar(coolBar,SWT.HORIZONTAL| SWT.FLAT);
+ topToolBar.setBackground(form.getBody().getBackground());
+ openWSDLToolItem = new ToolItem(topToolBar, SWT.PUSH);
+ openWSDLToolItem.setImage(mImageRegistry.get(IMG_DESC_WSDL));
+ openWSDLToolItem.setToolTipText(JBossWSUIMessages.JAXRSWSTestView2_GetFromWSDL_Tooltip);
+ openWSDLToolItem.addSelectionListener(new SelectionListener() {
+ public void widgetSelected(SelectionEvent e) {
+ WSDLBrowseDialog wbDialog = new WSDLBrowseDialog(getSite().getShell());
+ int rtnCode = wbDialog.open();
+ if (rtnCode == Window.OK){
+ serviceNSMessage = null;
+ actionText = null;
+ Definition wsdlDef = wbDialog.getWSDLDefinition();
+ String output = TesterWSDLUtils.getSampleSOAPInputMessage(wsdlDef,
+ wbDialog.getServiceTextValue(),
+ wbDialog.getPortTextValue(),
+ wbDialog.getBindingValue(),
+ wbDialog.getOperationTextValue());
+ String endpointURL = TesterWSDLUtils.getEndpointURL(wsdlDef,
+ wbDialog.getServiceTextValue(),
+ wbDialog.getPortTextValue(),
+ wbDialog.getBindingValue(),
+ wbDialog.getOperationTextValue());
+ String actionURL = TesterWSDLUtils.getActionURL(wsdlDef,
+ wbDialog.getServiceTextValue(),
+ wbDialog.getPortTextValue(),
+ wbDialog.getBindingValue(),
+ wbDialog.getOperationTextValue());
+ serviceNSMessage = TesterWSDLUtils.getNSServiceNameAndMessageNameArray(wsdlDef,
+ wbDialog.getServiceTextValue(),
+ wbDialog.getPortTextValue(),
+ wbDialog.getBindingValue(),
+ wbDialog.getOperationTextValue());
+ String soapIn = generateSampleSOAP(output);
+ bodyText.setText(soapIn);
+ urlCombo.setText(endpointURL);
+ actionText = actionURL;
+ setControlsForWSType(getCurrentTestType());
+ setControlsForMethodType(methodCombo.getText());
+ setControlsForSelectedURL();
+ }
+ }
+ public void widgetDefaultSelected(SelectionEvent e) {
+ widgetSelected(e);
+ }
+ });
+
+ startToolItem = new ToolItem(topToolBar, SWT.PUSH| SWT.FLAT);
+ startToolItem.setImage(mImageRegistry.get(IMG_DESC_START));
+ startToolItem.setToolTipText(JBossWSUIMessages.JAXRSWSTestView2_Go_Tooltip);
+ startToolItem.addSelectionListener(new SelectionListener() {
+ public void widgetSelected(SelectionEvent e) {
+ handleTest(getCurrentTestType());
+ }
+ public void widgetDefaultSelected(SelectionEvent e) {
+ widgetSelected(e);
+ }
+ });
+
+ topToolBar.pack();
+ size = topToolBar.getSize();
+ topCoolItem.setControl(topToolBar);
+ topCoolItem.setSize(topCoolItem.computeSize(size.x, size.y));
+ toolkit.adapt(coolBar);
+ }
+
+ private void createRequestSide( SashForm sashForm ) {
+ Section section = toolkit.createSection(sashForm,
+ Section.TITLE_BAR|
+ Section.TWISTIE|Section.EXPANDED);
+ section.setText(JBossWSUIMessages.JAXRSWSTestView2_RequestDetails_Section);
+
+ Composite sectionClient = toolkit.createComposite(section);
+ sectionClient.setLayout(new GridLayout());
+ sectionClient.setLayoutData(new GridData());
+
+ ExpandableComposite ec = toolkit.createExpandableComposite(sectionClient,
+ ExpandableComposite.TREE_NODE| ExpandableComposite.TITLE_BAR |
+ ExpandableComposite.CLIENT_INDENT);
+ ec.setText(JBossWSUIMessages.JAXRSWSTestView2_Headers_Section);
+ dlsList = new DelimitedStringList(ec, SWT.None, false, false);
+ ec.setClient(dlsList);
+ toolkit.adapt(dlsList);
+ GridData gd2 = new GridData(SWT.FILL, SWT.FILL, true, false);
+ ec.setLayoutData(gd2);
+ ec.addExpansionListener(new FormExpansionAdapter());
+
+ ExpandableComposite ec3 = toolkit.createExpandableComposite(sectionClient,
+ ExpandableComposite.TREE_NODE| ExpandableComposite.TITLE_BAR |
+ ExpandableComposite.CLIENT_INDENT);
+ ec3.setText(JBossWSUIMessages.JAXRSWSTestView2_Parameters_Section);
+ parmsList = new DelimitedStringList(ec3, SWT.None, false, false);
+ parmsList.setShowUpDown(false);
+ ec3.setClient(parmsList);
+ toolkit.adapt(parmsList);
+ GridData gd4 = new GridData(SWT.FILL, SWT.FILL, true, false);
+ ec3.setLayoutData(gd4);
+ ec3.addExpansionListener(new FormExpansionAdapter());
+
+ ExpandableComposite ec5 = toolkit.createExpandableComposite(sectionClient,
+ ExpandableComposite.TWISTIE|
+ ExpandableComposite.CLIENT_INDENT |
+ ExpandableComposite.EXPANDED);
+ ec5.setText(JBossWSUIMessages.JAXRSWSTestView2_BodyText_Section);
+ bodyText = toolkit.createText(ec5, EMPTY_STRING, SWT.BORDER | SWT.WRAP | SWT.V_SCROLL);
+ ec5.setClient(bodyText);
+ GridData gd9 = new GridData(SWT.FILL, SWT.FILL, true, true);
+ gd9.minimumHeight = 200;
+ ec5.setLayoutData(gd9);
+ ec5.addExpansionListener(new FormExpansionAdapter());
+
+ section.addExpansionListener(new FormExpansionAdapter());
+ section.setClient(sectionClient);
+ }
+
+ private void createResponseSide ( SashForm sashForm ) {
+ Section section2 = toolkit.createSection(sashForm,
+ Section.TITLE_BAR|
+ Section.TWISTIE|Section.EXPANDED);
+ section2.setText(JBossWSUIMessages.JAXRSWSTestView2_ResponseDetails_Section);
+
+ Composite sectionClient2 = toolkit.createComposite(section2);
+ sectionClient2.setLayout(new GridLayout());
+ sectionClient2.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+
+ ExpandableComposite ec2 = toolkit.createExpandableComposite(sectionClient2,
+ ExpandableComposite.TREE_NODE| ExpandableComposite.TITLE_BAR |
+ ExpandableComposite.CLIENT_INDENT );
+ ec2.setText(JBossWSUIMessages.JAXRSWSTestView2_ResponseHeaders_Section);
+ ec2.setLayout(new GridLayout());
+ resultHeadersList = new List(ec2, SWT.V_SCROLL | SWT.BORDER );
+ resultHeadersList.add(EMPTY_STRING);
+ resultHeadersList.add(EMPTY_STRING);
+ resultHeadersList.add(EMPTY_STRING);
+ resultHeadersList.add(EMPTY_STRING);
+ ec2.setClient(resultHeadersList);
+ resultsHeaderMenu = new Menu(resultHeadersList.getShell(), SWT.POP_UP);
+
+ copyResultHeaderMenuAction = new MenuItem(resultsHeaderMenu, SWT.PUSH);
+ copyResultHeaderMenuAction.setText(JBossWSUIMessages.JAXRSWSTestView_CopyResultMenu_Text);
+ copyResultHeaderMenuAction.setAccelerator(SWT.CTRL + 'C');
+ copyResultHeaderMenuAction.addSelectionListener(new SelectionListener(){
+
+ public void widgetDefaultSelected(SelectionEvent arg0) {
+ if (resultHeadersList.getSelectionCount() == 0)
+ resultHeadersList.selectAll();
+ Display display = Display.getDefault();
+ final Clipboard cb = new Clipboard(display);
+ TextTransfer textTransfer = TextTransfer.getInstance();
+ cb.setContents(resultHeadersList.getSelection() ,
+ new Transfer[] { textTransfer });
+ }
+
+ public void widgetSelected(SelectionEvent arg0) {
+ widgetDefaultSelected(arg0);
+ }
+ });
+
+ resultHeadersList.setMenu(resultsHeaderMenu);
+
+ resultHeadersList.addMouseListener(new MouseListener() {
+ public void mouseDoubleClick(MouseEvent arg0) {
+ }
+ public void mouseDown(MouseEvent arg0) {
+ setMenusForCurrentState();
+ }
+ public void mouseUp(MouseEvent arg0) {
+ }
+ });
+
+ GridData gd6 = new GridData(SWT.FILL, SWT.FILL, true, false);
+ gd6.heightHint = 1;
+ gd6.minimumHeight = 50;
+ ec2.setLayoutData(gd6);
+ ec2.addExpansionListener(new FormExpansionAdapter());
+
+ ExpandableComposite ec4 = toolkit.createExpandableComposite(sectionClient2,
+ ExpandableComposite.TWISTIE| ExpandableComposite.TITLE_BAR |
+ ExpandableComposite.CLIENT_INDENT |
+ ExpandableComposite.EXPANDED);
+ ec4.setText(JBossWSUIMessages.JAXRSWSTestView2_ResponseBody_Section);
+
+ createResponseToolbar(ec4);
+
+ pageBook = toolkit.createPageBook(ec4, SWT.NONE);
+
+ Composite page1 = pageBook.createPage(PAGE1_KEY);
+ page1.setLayout(new GridLayout());
+ resultsText = toolkit.createText(page1, EMPTY_STRING, SWT.BORDER | SWT.WRAP | SWT.V_SCROLL);
+ GridData gd7 = new GridData(SWT.FILL, SWT.FILL, true, true);
+ // gd7.minimumHeight = 100;
+ gd7.heightHint = 1;
+ resultsText.setLayoutData(gd7);
+
+ pageBook.showPage(PAGE1_KEY);
+
+ Composite page2 = pageBook.createPage(PAGE2_KEY);
+ page2.setLayout(new GridLayout());
+ resultsBrowser = new Browser(page2, SWT.BORDER | SWT.WRAP );// | SWT.V_SCROLL);
+ GridData gd10 = new GridData(SWT.FILL, SWT.FILL, true, true);
+ gd7.heightHint = 1;
+ // gd10.minimumHeight = 100;
+ toolkit.adapt(resultsBrowser);
+ resultsBrowser.setLayoutData(gd10);
+
+ pageBook.showPage(PAGE2_KEY);
+
+ GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true); //GridData.FILL_HORIZONTAL);
+ gd.heightHint = 1;
+ gd.minimumHeight = 100;
+ pageBook.setLayoutData(gd);
+
+ pageBook.showPage(PAGE1_KEY);
+
+ resultsTextMenu = new Menu(resultsText.getShell(), SWT.POP_UP);
+
+ copyMenuAction = new MenuItem(resultsTextMenu, SWT.PUSH);
+ copyMenuAction.setText(JBossWSUIMessages.JAXRSWSTestView_CopyResultsMenu);
+ copyMenuAction.setAccelerator(SWT.CTRL + 'C');
+ copyMenuAction.addSelectionListener(new SelectionListener(){
+
+ public void widgetDefaultSelected(SelectionEvent arg0) {
+ if (resultsText.getSelectionCount() == 0)
+ resultsText.selectAll();
+ resultsText.copy();
+ }
+
+ public void widgetSelected(SelectionEvent arg0) {
+ widgetDefaultSelected(arg0);
+ }
+ });
+ new MenuItem(resultsTextMenu, SWT.SEPARATOR);
+
+ openInXMLEditorAction = new MenuItem(resultsTextMenu, SWT.PUSH);
+ openInXMLEditorAction.setText(JBossWSUIMessages.JAXRSWSTestView_Open_Result_in_XML_Editor);
+ openInXMLEditorAction.setAccelerator(SWT.CTRL + 'O');
+ openInXMLEditorAction.addSelectionListener(new SelectionListener() {
+
+ public void widgetSelected(SelectionEvent arg0) {
+ String string = resultsText.getText();
+ openXMLEditor(string);
+ }
+
+ public void widgetDefaultSelected(SelectionEvent arg0) {
+ widgetSelected(arg0);
+ }
+ });
+
+ openResponseTagInXMLEditor = new MenuItem(resultsTextMenu, SWT.PUSH);
+ openResponseTagInXMLEditor.setText(JBossWSUIMessages.JAXRSWSTestView_Open_Response_Tag_Contents_in_XML_Editor);
+ openResponseTagInXMLEditor.setAccelerator(SWT.CTRL + 'R');
+ openResponseTagInXMLEditor.addSelectionListener(new SelectionListener() {
+
+ public void widgetSelected(SelectionEvent arg0) {
+ String string = null;
+ try {
+ SOAPBody body = null;
+ if (envelope != null){
+ body = envelope.getBody();
+ } else if (soapbody != null) {
+ body = soapbody;
+ }
+
+ NodeList list = body.getChildNodes();
+ for (int i = 0; i< list.getLength(); i++){
+ Node node = list.item(i);
+ if (node.getNodeName().contains("Response")){ //$NON-NLS-1$
+ NodeList list2 = node.getChildNodes();
+ for (int j = 0; j<list2.getLength(); j++){
+ Node node2 = list2.item(j);
+ if (node2.getNodeName().contains("Result")){ //$NON-NLS-1$
+ Node node3 = node2.getChildNodes().item(0);
+ if (node3.getNodeType() == Node.TEXT_NODE) {
+ string = node3.getNodeValue();
+ break;
+ } else if (node3.getNodeType() == Node.ELEMENT_NODE) {
+ Element element = (Element) node3;
+ string = XMLUtils.ElementToString(element);
+ break;
+ }
+ }
+ }
+ if (string != null) break;
+ }
+ }
+ if (string != null){
+ openXMLEditor(string);
+ }
+ } catch (SOAPException e) {
+ JBossWSUIPlugin.log(e);
+ }
+ }
+
+ public void widgetDefaultSelected(SelectionEvent arg0) {
+ widgetSelected(arg0);
+ }
+ });
+
+ resultsText.setMenu(resultsTextMenu);
+
+ resultsText.addFocusListener(new FocusListener() {
+
+ public void focusLost(FocusEvent arg0) {
+ }
+
+ public void focusGained(FocusEvent arg0) {
+ setMenusForCurrentState();
+ }
+ });
+
+ ec4.setClient(pageBook);
+ GridData gd8 = new GridData(SWT.FILL, SWT.FILL, true, true);
+ gd8.heightHint = 1;
+ ec4.setLayoutData(gd8);
+ ec4.addExpansionListener(new FormExpansionAdapter());
+
+ section2.addExpansionListener(new FormExpansionAdapter());
+ section2.setClient(sectionClient2);
+ }
+
+ /**
+ * This is a callback that will allow us
+ * to create the viewer and initialize it.
+ */
+ public void createPartControl(Composite parent) {
+
+ getImages();
+
+ toolkit = new FormToolkit(parent.getDisplay());
+ form = toolkit.createScrolledForm(parent);
+ form.addListener(SWT.Resize, new Listener() {
+ public void handleEvent(Event e) {
+ form.setRedraw(false);
+ form.reflow(true);
+ form.layout(true, true);
+ form.setRedraw(true);
+ }
+ });
+ GridLayout layout = new GridLayout(2, false);
+ layout.verticalSpacing = 1;
+ form.getBody().setLayout(layout);
+
+ createURLAndToolbar();
+
+ SashForm sashForm = new SashForm(form.getBody(), SWT.NONE);
+ sashForm.setOrientation(SWT.HORIZONTAL);
+ toolkit.adapt(sashForm);
+ GridLayout sashLayout = new GridLayout(2, false);
+ sashForm.setLayout(sashLayout);
+ GridData gd3 = new GridData(SWT.FILL, SWT.FILL, true, true);
+ gd3.horizontalSpan = 2;
+ gd3.widthHint = 1;
+ sashForm.setLayoutData(gd3);
+
+ createRequestSide(sashForm);
+
+ createResponseSide(sashForm);
+
+ toolkit.paintBordersFor(form);
+ form.reflow(true);
+
+ methodCombo.setText(JAX_WS);
+ setControlsForWSType(getCurrentTestType());
+ setControlsForMethodType(methodCombo.getText());
+ setControlsForSelectedURL();
+ setMenusForCurrentState();
+ }
+
+ @Override
+ public void dispose() {
+ toolkit.dispose();
+ mImageRegistry.dispose();
+ super.dispose();
+ }
+
+ private String generateSampleSOAP ( String innerText ) {
+ String soapIn = "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\" ?>\n" + //$NON-NLS-1$
+ "<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" " + //$NON-NLS-1$
+ "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" " + //$NON-NLS-1$
+ "xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" " + //$NON-NLS-1$
+ ">\n" + //$NON-NLS-1$
+ "<soap:Body>\n";//$NON-NLS-1$
+ if (innerText != null)
+ soapIn = soapIn + innerText;
+ soapIn = soapIn +
+ "</soap:Body>\n" + //$NON-NLS-1$
+ "</soap:Envelope>"; //$NON-NLS-1$
+ return soapIn;
+ }
+
+ private void setMenusForCurrentState() {
+ if (resultsText!= null && !resultsText.isDisposed()){
+ boolean enabled = resultsText.getText().trim().length() > 0;
+ copyMenuAction.setEnabled(enabled);
+ openInXMLEditorAction.setEnabled(enabled);
+ if (getCurrentTestType().equalsIgnoreCase(JAX_WS)) {
+ openResponseTagInXMLEditor.setEnabled(enabled);
+ } else if (getCurrentTestType().equalsIgnoreCase(JAX_RS) ){
+ openResponseTagInXMLEditor.setEnabled(false);
+ }
+ }
+ if (resultHeadersList != null && !resultHeadersList.isDisposed()) {
+ boolean enabled = resultHeadersList.getItemCount() > 0;
+ copyResultHeaderMenuAction.setEnabled(enabled);
+ }
+ }
+
+ private void openXMLEditor (String text){
+ IWorkbenchWindow window = getSite().getWorkbenchWindow();
+ IStorage storage = new ResultsXMLStorage(text);
+ IStorageEditorInput input = new ResultsXMLStorageInput(storage);
+ IWorkbenchPage page = window.getActivePage();
+ if (page != null) {
+ try {
+ if (WSTestUtils.isTextXML(text)) {
+ if (window.getWorkbench().getEditorRegistry().findEditor(XML_EDITOR_ID) != null) {
+ page.openEditor(input, XML_EDITOR_ID);
+ } else {
+ page.openEditor(input, DEFAULT_TEXT_EDITOR_ID);
+ }
+ } else {
+ page.openEditor(input, DEFAULT_TEXT_EDITOR_ID);
+ }
+ } catch (PartInitException e) {
+ JBossWSUIPlugin.log(e);
+ }
+ }
+ }
+
+ private void setControlsForSelectedURL() {
+ if (urlCombo.getText().trim().length() > 0) {
+ String urlText = urlCombo.getText();
+ try {
+ new URL(urlText);
+ startToolItem.setEnabled(true);
+ } catch (MalformedURLException mue) {
+ startToolItem.setEnabled(false);
+ return;
+ }
+ } else {
+ startToolItem.setEnabled(false);
+ }
+ }
+
+ /*
+ * Enable/disable controls based on the WS technology type
+ * and the method.
+ *
+ * @param methodType
+ */
+ private void setControlsForMethodType ( String methodType ) {
+ if (getCurrentTestType().equalsIgnoreCase(JAX_RS) &&
+ methodType.equalsIgnoreCase(GET)) {
+ bodyText.setEnabled(false);
+ } else {
+ bodyText.setEnabled(true);
+ }
+ }
+
+ /*
+ * Enable/disable controls based on the WS technology type
+ * @param wsType
+ */
+ private void setControlsForWSType ( String wsType ) {
+ if (wsType.equalsIgnoreCase(JAX_WS)) {
+ bodyText.setEnabled(true);
+ parmsList.setEnabled(false);
+ parmsList.removeAll();
+ dlsList.setEnabled(false);
+
+ String emptySOAP =
+ generateSampleSOAP(null);
+ emptySOAP = WSTestUtils.addNLsToXML(emptySOAP);
+
+ if (bodyText.getText().trim().length() == 0) {
+ bodyText.setText(emptySOAP);
+ }
+ openWSDLToolItem.setEnabled(true);
+ }
+ else if (wsType.equalsIgnoreCase(JAX_RS)) {
+ bodyText.setEnabled(true);
+ parmsList.setEnabled(true);
+ dlsList.setEnabled(true);
+ openWSDLToolItem.setEnabled(false);
+
+ if (bodyText.getText().trim().length() > 0) {
+ bodyText.setText(EMPTY_STRING);
+ }
+ }
+ setMenusForCurrentState();
+ }
+
+ /*
+ * Actually perform the test based on which type of activity it is
+ */
+ private void handleTest(final String wsTech) {
+
+ String urlText = urlCombo.getText();
+ try {
+ new URL(urlText);
+ } catch (MalformedURLException mue) {
+ // do nothing, but return since we don't have a working URL
+ return;
+ }
+
+ if (urlCombo.getItemCount() > 0) {
+ java.util.List<String> aList = Arrays.asList(urlCombo.getItems());
+ if (!aList.contains(urlCombo.getText())) {
+ urlCombo.add(urlCombo.getText());
+ }
+ } else {
+ urlCombo.add(urlCombo.getText());
+ }
+
+ final String url = urlCombo.getText();
+ final String action = actionText;
+ final String body = bodyText.getText();
+ final String method = methodCombo.getText();
+ final String headers = dlsList.getSelection();
+ final String parms = parmsList.getSelection();
+
+ Job aJob = new Job(JBossWSUIMessages.JAXRSWSTestView_Invoking_WS_Status) {
+ protected IStatus run(IProgressMonitor monitor) {
+ IStatus status = Status.OK_STATUS;
+ // execute the task ...
+ if (wsTech.equalsIgnoreCase(JAX_RS)) {
+ status = handleRSTest(monitor, url, method, body, parms, headers);
+ }
+ else if (wsTech.equalsIgnoreCase(JAX_WS)) {
+ status = handleWSTest(monitor, url, action, body);
+ }
+ monitor.done();
+ return status;
+ }
+ };
+ // true to indicate that this job was initiated by a UI end user
+ aJob.setUser(true);
+ aJob.addJobChangeListener(new IJobChangeListener() {
+
+ public void sleeping(IJobChangeEvent event) {};
+ public void scheduled(IJobChangeEvent event) {};
+ public void running(IJobChangeEvent event) {};
+ public void done(final IJobChangeEvent event) {
+ if (event.getResult() instanceof WSTestStatus) {
+ final WSTestStatus status = (WSTestStatus) event.getResult();
+ PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
+ public void run() {
+ if (status.getResultsText() != null) {
+ JAXRSWSTestView2.this.resultsText.setText(status.getResultsText());
+ JAXRSWSTestView2.this.resultsBrowser.setText(status.getResultsText());
+ JAXRSWSTestView2.this.form.reflow(true);
+ }
+ else if (status.getMessage() != null) {
+ JAXRSWSTestView2.this.resultsText.setText(status.getMessage());
+ JAXRSWSTestView2.this.resultsBrowser.setText(status.getMessage());
+ JAXRSWSTestView2.this.form.reflow(true);
+ }
+ resultHeadersList.removeAll();
+ String[] headers =
+ DelimitedStringList.parseString(status.getHeadersList(), RESULT_HEADER_DELIMITER);
+ if (headers != null && headers.length > 0) {
+ for (int i = 0; i < headers.length; i++) {
+ resultHeadersList.add(headers[i]);
+ }
+ }
+ }
+ });
+ }
+ }
+
+ public void awake(IJobChangeEvent event) {};
+ public void aboutToRun(IJobChangeEvent event) {};
+ });
+ aJob.schedule();
+
+ setMenusForCurrentState();
+ }
+
+ /*
+ * Actually call the WS and displays the result
+ */
+ private IStatus handleWSTest(final IProgressMonitor monitor, String url, String action, String body) {
+ try {
+
+ envelope = null;
+ soapbody = null;
+ monitor.worked(10);
+ JAXWSTester2 tester = new JAXWSTester2();
+ boolean itRan = false;
+ while (!monitor.isCanceled()) {
+ try {
+ if (!itRan && serviceNSMessage != null && serviceNSMessage.length == 3) {
+ itRan = true;
+ // call the service
+ tester.doTest(monitor, url, action, serviceNSMessage[0], serviceNSMessage[1], serviceNSMessage[2], body);
+ } else {
+ break;
+ }
+ } catch (InterruptedException ie) {
+ monitor.setCanceled(true);
+ }
+ }
+ if (monitor.isCanceled()) {
+ WSTestStatus status = new WSTestStatus(IStatus.OK,
+ JBossWSUIPlugin.PLUGIN_ID,
+ JBossWSUIMessages.JAXRSWSTestView_Message_Service_Invocation_Cancelled);
+ return status;
+ }
+ if (!itRan) {
+ WSTestStatus status = new WSTestStatus(IStatus.OK,
+ JBossWSUIPlugin.PLUGIN_ID,
+ JBossWSUIMessages.JAXRSWSTestView_Message_Unsuccessful_Test);
+ return status;
+ }
+ monitor.worked(70);
+ String result = tester.getResultBody();
+ envelope = tester.getResultSOAP();
+ soapbody = tester.getResultSOAPBody();
+ String cleanedUp = WSTestUtils.addNLsToXML(result);
+
+ WSTestStatus status = new WSTestStatus(IStatus.OK,
+ JBossWSUIPlugin.PLUGIN_ID,
+ JBossWSUIMessages.JAXRSWSTestView_JAXWS_Success_Status);
+ status.setResultsText(cleanedUp);
+ monitor.worked(10);
+
+ String listText = EMPTY_STRING;
+ if (tester.getResultHeaders() != null) {
+ Iterator<?> iter = tester.getResultHeaders().entrySet().iterator();
+ while (iter.hasNext()) {
+ String text = EMPTY_STRING;
+ Entry<?, ?> entry = (Entry<?, ?>) iter.next();
+ if (entry.getKey() == null)
+ text = entry.getValue().toString();
+ else
+ text = text + entry.toString();
+ listText = listText + text;
+ if (iter.hasNext()) {
+ listText = listText + RESULT_HEADER_DELIMITER;
+ }
+ }
+ }
+ status.setHeadersList(listText);
+ monitor.worked(10);
+ return status;
+ } catch (Exception e) {
+ WSTestStatus status = new WSTestStatus(IStatus.OK,
+ JBossWSUIPlugin.PLUGIN_ID,
+ JBossWSUIMessages.JAXRSWSTestView_Exception_Status + e.getLocalizedMessage());
+ status.setResultsText(e.toString());
+ JBossWSUIPlugin.log(e);
+ return status;
+ }
+ }
+
+ /*
+ * Actually call the RESTful WS to test it
+ */
+ private IStatus handleRSTest(final IProgressMonitor monitor, String address, String method, String body, String parms, String headersStr) {
+
+ if (method.equalsIgnoreCase(GET))
+ body = EMPTY_STRING;
+
+ // if no actual text in the request body, set to null
+ if (body.trim().length() == 0) body = null;
+
+ monitor.worked(10);
+
+ // Process parameters for web service call
+ HashMap<String, String> parameters = new HashMap<String, String>();
+ if (parms != null && parms.length() > 0) {
+ String[] parsedList = DelimitedStringList.parseString(parms , ","); //$NON-NLS-1$
+ if (parsedList != null && parsedList.length > 0) {
+ for (int i = 0; i < parsedList.length; i++) {
+ String nameValuePair = parsedList[i];
+ String[] nameAndValue = DelimitedStringList.parseString(nameValuePair, "="); //$NON-NLS-1$
+ if (nameAndValue != null && nameAndValue.length == 2) {
+ parameters.put(nameAndValue[0], nameAndValue[1]);
+ }
+ }
+ }
+ }
+
+ monitor.worked(10);
+ // Process headers for web service call
+ HashMap<String, String> headers = new HashMap<String, String>();
+ if (headersStr != null && headersStr.length() > 0) {
+ String[] parsedList = DelimitedStringList.parseString(headersStr , ","); //$NON-NLS-1$
+ if (parsedList != null && parsedList.length > 0) {
+ for (int i = 0; i < parsedList.length; i++) {
+ String nameValuePair = parsedList[i];
+ String[] nameAndValue = DelimitedStringList.parseString(nameValuePair, "="); //$NON-NLS-1$
+ if (nameAndValue != null && nameAndValue.length == 2) {
+ headers.put(nameAndValue[0], nameAndValue[1]);
+ }
+ }
+ }
+ }
+
+ JAXRSTester tester = new JAXRSTester();
+
+ // now actually call it
+ try {
+
+ // call the service
+ tester.doTest(address, parameters, headers, method, body);
+
+ String result = tester.getResultBody();
+
+ // put the results in the result text field
+ String cleanedUp = WSTestUtils.addNLsToXML(result);
+
+ WSTestStatus status = new WSTestStatus(IStatus.OK,
+ JBossWSUIPlugin.PLUGIN_ID,
+ JBossWSUIMessages.JAXRSWSTestView_JAXRS_Success_Status);
+ status.setResultsText(cleanedUp);
+
+ String listText = EMPTY_STRING;
+ if (tester.getResultHeaders() != null) {
+ Iterator<?> iter = tester.getResultHeaders().entrySet().iterator();
+ while (iter.hasNext()) {
+ String text = EMPTY_STRING;
+ Entry<?, ?> entry = (Entry<?, ?>) iter.next();
+ if (entry.getKey() == null)
+ text = entry.getValue().toString();
+ else
+ text = text + entry.toString();
+ listText = listText + text;
+ if (iter.hasNext()) {
+ listText = listText + RESULT_HEADER_DELIMITER;
+ }
+ }
+ }
+
+ status.setHeadersList(listText);
+ monitor.worked(10);
+ return status;
+
+ } catch (Exception e) {
+ String result = tester.getResultBody();
+
+ // put the results in the result text field
+ String cleanedUp = WSTestUtils.addNLsToXML(result);
+
+ WSTestStatus status = new WSTestStatus(IStatus.OK,
+ JBossWSUIPlugin.PLUGIN_ID,
+ JBossWSUIMessages.JAXRSWSTestView_JAXRS_Success_Status);
+ status.setResultsText(cleanedUp);
+
+ String listText = EMPTY_STRING;
+ if (tester.getResultHeaders() != null) {
+ Iterator<?> iter = tester.getResultHeaders().entrySet().iterator();
+ while (iter.hasNext()) {
+ String text = EMPTY_STRING;
+ Entry<?, ?> entry = (Entry<?, ?>) iter.next();
+ if (entry.getKey() == null)
+ text = entry.getValue().toString();
+ else
+ text = text + entry.toString();
+ listText = listText + text;
+ if (iter.hasNext()) {
+ listText = listText + RESULT_HEADER_DELIMITER;
+ }
+ }
+ }
+
+ status.setHeadersList(listText);
+ monitor.worked(10);
+ return status;
+ }
+ }
+
+ /**
+ * Passing the focus request to the control.
+ */
+ public void setFocus() {
+ // set initial focus to the URL text combo
+ urlCombo.setFocus();
+ }
+
+}
\ No newline at end of file
Property changes on: trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/views/JAXRSWSTestView2.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 9 months
JBoss Tools SVN: r23387 - trunk/seam/features/org.jboss.tools.seam.feature.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2010-07-13 14:53:45 -0400 (Tue, 13 Jul 2010)
New Revision: 23387
Modified:
trunk/seam/features/org.jboss.tools.seam.feature/pom.xml
Log:
fix groupId for seam feature
Modified: trunk/seam/features/org.jboss.tools.seam.feature/pom.xml
===================================================================
--- trunk/seam/features/org.jboss.tools.seam.feature/pom.xml 2010-07-13 17:02:52 UTC (rev 23386)
+++ trunk/seam/features/org.jboss.tools.seam.feature/pom.xml 2010-07-13 18:53:45 UTC (rev 23387)
@@ -7,7 +7,7 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tool.seam.features</groupId>
+ <groupId>org.jboss.tools.seam.features</groupId>
<artifactId>org.jboss.tools.seam.feature</artifactId>
<version>3.2.0-SNAPSHOT</version>
<packaging>eclipse-feature</packaging>
15 years, 9 months
JBoss Tools SVN: r23386 - in trunk: vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: vpakan(a)redhat.com
Date: 2010-07-13 13:02:52 -0400 (Tue, 13 Jul 2010)
New Revision: 23386
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/smoke/AddRemoveJSFCapabilitiesTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAutoTestCase.java
Log:
Added functionality to use JBoss EAP 5.0 as target Server Runtime.
Modified: trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/smoke/AddRemoveJSFCapabilitiesTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/smoke/AddRemoveJSFCapabilitiesTest.java 2010-07-13 15:08:59 UTC (rev 23385)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/smoke/AddRemoveJSFCapabilitiesTest.java 2010-07-13 17:02:52 UTC (rev 23386)
@@ -11,8 +11,6 @@
package org.jboss.tools.jsf.ui.bot.test.smoke;
-import static org.jboss.tools.ui.bot.ext.SWTTestExt.eclipse;
-
import java.io.File;
import org.eclipse.swtbot.swt.finder.SWTBot;
@@ -84,7 +82,7 @@
bot.textWithLabel("web.xml Location*").setText(webXmlFileLocation);
bot.button(WidgetVariables.NEXT_BUTTON).click();
- SWTJBTExt.addServerToServerViewOnWizardPage(bot, IDELabel.ServerGroup.JBOSS_EAP_4_3, IDELabel.ServerType.JBOSS_EAP_4_3);
+ SWTJBTExt.addServerToServerViewOnWizardPage(bot, JBOSS_SERVER_GROUP, JBOSS_SERVER_TYPE);
bot.sleep(1000L);
bot.button(IDELabel.Button.FINISH).click();
eclipse.closeWarningWindowIfOpened(true);
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAutoTestCase.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAutoTestCase.java 2010-07-13 15:08:59 UTC (rev 23385)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAutoTestCase.java 2010-07-13 17:02:52 UTC (rev 23386)
@@ -44,6 +44,7 @@
protected final static String JBOSS_EAP_HOME;
protected final static String JBT_TEST_PROJECT_NAME;
protected final static String JBOSS_SERVER_GROUP;
+ protected final static String JBOSS_SERVER_TYPE;
protected final static String JBOSS_SERVER_RUNTIME_TYPE;
/* (non-Javadoc)
@@ -74,12 +75,13 @@
JBOSS_EAP_HOME = projectProperties.getProperty("JBossEap5.0"); //$NON-NLS-1$
JBOSS_SERVER_GROUP = IDELabel.ServerGroup.JBOSS_EAP_5_0;
JBOSS_SERVER_RUNTIME_TYPE = IDELabel.ServerRuntimeType.JBOSS_EAP_5_0;
-
+ JBOSS_SERVER_TYPE = IDELabel.ServerType.JBOSS_EAP_5_0;
}
else {
JBOSS_EAP_HOME = projectProperties.getProperty("JBossEap4.3"); //$NON-NLS-1$
JBOSS_SERVER_GROUP = IDELabel.ServerGroup.JBOSS_EAP_4_3;
JBOSS_SERVER_RUNTIME_TYPE = IDELabel.ServerRuntimeType.JBOSS_EAP_4_3;
+ JBOSS_SERVER_TYPE = IDELabel.ServerType.JBOSS_EAP_4_3;
}
JBT_TEST_PROJECT_NAME = projectProperties.getProperty("JSFProjectName"); //$NON-NLS-1$
}
15 years, 9 months