Author: mmerz
Date: Fri Mar 4 11:17:24 2005
New Revision: 156193
URL: http://svn.apache.org/viewcvs?view=rev&rev=156193
Log:
- Removed junit-dependency from PetstoreDashboard.java
- streamlined directory name for petstore-dashboard sample
- fixed wsdl.location in build-client-svn.xml
- build-svn.xml: remove jarfile from lib-dir
Added:
incubator/beehive/trunk/samples/wsm-petstore-dashboard/
- copied from r155718, incubator/beehive/trunk/samples/PetStoreDashboard/
incubator/beehive/trunk/samples/wsm-petstore-dashboard/build.xml
- copied, changed from r155944,
incubator/beehive/trunk/samples/PetStoreDashboard/build.xml
incubator/beehive/trunk/samples/wsm-petstore-dashboard/images/
- copied from r155944,
incubator/beehive/trunk/samples/PetStoreDashboard/images/
incubator/beehive/trunk/samples/wsm-petstore-dashboard/src/
- copied from r155944,
incubator/beehive/trunk/samples/PetStoreDashboard/src/
Removed:
incubator/beehive/trunk/samples/PetStoreDashboard/
incubator/beehive/trunk/samples/wsm-petstore-dashboard/bin/
Modified:
incubator/beehive/trunk/samples/wsm-addressbook/WEB-INF/build-client-svn.xml
incubator/beehive/trunk/samples/wsm-petstore-dashboard/src/ui/PetStoreDashboard.java
incubator/beehive/trunk/samples/wsm-samples/WEB-INF/build-svn.xml
Modified:
incubator/beehive/trunk/samples/wsm-addressbook/WEB-INF/build-client-svn.xml
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/wsm-addressbook/WEB-INF/build-client-svn.xml?view=diff&r1=156192&r2=156193
==============================================================================
---
incubator/beehive/trunk/samples/wsm-addressbook/WEB-INF/build-client-svn.xml
(original)
+++
incubator/beehive/trunk/samples/wsm-addressbook/WEB-INF/build-client-svn.xml
Fri Mar 4 11:17:24 2005
@@ -23,7 +23,7 @@
<import file="../../../beehive-imports.xml" />
<property
- name="AddressBook.wsdl.url"
+ name="wsdl.url"
value="http://localhost:8080/AddressBookWS/web/Service.jws?wsdl" />
<property name="webapp.dir" value=".." />
<property name="build.dir" value="build-client" />
@@ -74,7 +74,7 @@
<classpath refid="jars"/>
</taskdef>
<wsdl2java
- url="${AddressBook.wsdl.url}"
+ url="${wsdl.url}"
output="${gen.dir}"
testcase="yes">
</wsdl2java>
Copied: incubator/beehive/trunk/samples/wsm-petstore-dashboard/build.xml (from
r155944, incubator/beehive/trunk/samples/PetStoreDashboard/build.xml)
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/wsm-petstore-dashboard/build.xml?view=diff&rev=156193&p1=incubator/beehive/trunk/samples/PetStoreDashboard/build.xml&r1=155944&p2=incubator/beehive/trunk/samples/wsm-petstore-dashboard/build.xml&r2=156193
==============================================================================
--- incubator/beehive/trunk/samples/PetStoreDashboard/build.xml (original)
+++ incubator/beehive/trunk/samples/wsm-petstore-dashboard/build.xml Fri Mar 4
11:17:24 2005
@@ -1,88 +1,124 @@
<?xml version="1.0" ?>
-<project name="PetStoreDashboard" basedir="." default="all">
-
- <property name="wsdl.url"
-
value="http://localhost:8080/petstoreWeb/PetstoreInventoryManager.jws?wsdl" />
-
-
- <path id="jars">
- <fileset dir="lib">
- <include name="**/*.jar"/>
- </fileset>
- </path>
-
- <taskdef name="wsdl2java"
classname="org.apache.axis.tools.ant.wsdl.Wsdl2javaAntTask"
- loaderref="axis" >
- <classpath refid="jars"/>
- </taskdef>
-
+<!--
+ Copyright 2004 The Apache Software Foundation
- <target name="clean">
- <delete dir="build" />
- </target>
-
- <target name="dirs">
- <mkdir dir="build" />
- <mkdir dir="build/generated" />
- <mkdir dir="build/classes" />
-
- </target>
- <target name="all" depends="genClient, compile, run"/>
-
- <target name="genClient" depends="dirs">
- <wsdl2java url="${wsdl.url}"
- output="build/generated"
- testcase="yes">
- </wsdl2java>
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ $Header:$
+ -->
- </target>
+<project name="wsm-petstore-dashboard" basedir="." default="all">
- <target name="compile" depends="genClient">
- <javac srcdir="build/generated"
- destdir="build/classes"
- classpathref="jars"
- failonerror="true"
- source="1.4"
- />
-
- <!-- just in case there are some client specific source -->
- <javac srcdir="src"
- destdir="build/classes"
- classpathref="jars"
- failonerror="true"
- source="1.4"
- />
+ <import file="../../beehive-imports.xml" />
- </target>
-
- <target name="test" depends="compile">
- <junit printsummary="yes" haltonfailure="yes" showoutput="yes">
- <classpath>
- <pathelement location= "build/classes"/>
- <path refid="jars"/>
- </classpath>
-
-
- <batchtest fork="yes" todir=".">
- <fileset dir="build/classes">
- <include name="**/*Test*.class"/>
- </fileset>
- </batchtest>
- </junit>
-
- </target>
-
+ <property
+ name="wsdl.url"
+
value="http://localhost:8080/petstoreWeb/PetstoreInventoryManager.jws?wsdl" />
+
+ <property name="app.dir" value="." />
+ <property name="images.dir" value="images" />
+ <property name="lib.dir" value="lib" />
+ <property name="log.dir" value="logs" />
+ <property name="src.dir" value="src" />
+ <property name="build.dir" value="build" />
+ <property name="gen.dir" value="${build.dir}/gen" />
+ <property name="classes.dir" value="${build.dir}/classes" />
+
+ <path id="jars">
+ <fileset dir="${lib.dir}">
+ <include name="*.jar"/>
+ </fileset>
+ </path>
+
+
+ <target name="all" depends="genClient, compile, run" />
+
+
+ <target name="genClient" depends="dirs">
+ <deploy-wsm webappDir="${app.dir}" />
+ <copy todir="${lib.dir}">
+ <fileset file="WEB-INF/lib/*.jar" />
+ </copy>
+ <taskdef
+ name="wsdl2java"
+ classname="org.apache.axis.tools.ant.wsdl.Wsdl2javaAntTask"
+ loaderref="axis" >
+ <classpath refid="jars"/>
+ </taskdef>
+ <wsdl2java
+ url="${wsdl.url}"
+ output="${gen.dir}"
+ testcase="yes"
+ debug="true" />
+ </target>
+
+
+ <target name="compile" depends="genClient">
+ <javac
+ srcdir="${gen.dir}"
+ destdir="${classes.dir}"
+ classpathref="jars"
+ failonerror="true"
+ debug="true"
+ source="1.4" />
+ <javac
+ srcdir="${src.dir}"
+ destdir="${classes.dir}"
+ classpathref="jars"
+ failonerror="true"
+ debug="true"
+ source="1.4" />
+ </target>
+
+
+ <target name="test" depends="compile">
+ <junit printsummary="yes" haltonfailure="yes" showoutput="yes">
+ <classpath>
+ <pathelement location= "${classes.dir}"/>
+ <path refid="jars"/>
+ </classpath>
+ <batchtest fork="yes" todir=".">
+ <fileset dir="${classes.dir}">
+ <include name="**/*Test*.class"/>
+ </fileset>
+ </batchtest>
+ </junit>
+ </target>
+
+
+ <target name="run" >
+ <java classname="ui.PetStoreDashboard" fork="true">
+ <classpath>
+ <pathelement location= "${build.dir}"/>
+ <pathelement location= "${images.dir}"/>
+ <path refid="jars"/>
+ </classpath>
+ </java>
+ </target>
+
+
+ <target name="dirs">
+ <mkdir dir="${lib.dir}" />
+ <mkdir dir="${build.dir}" />
+ <mkdir dir="${classes.dir}" />
+ <mkdir dir="${gen.dir}" />
+ </target>
+
+
+ <target name="clean">
+ <delete dir="${build.dir}" />
+ <delete dir="${log.dir}" />
+ </target>
- <target name="run" >
- <java classname="ui.PetStoreDashboard" fork="true">
- <classpath>
- <pathelement location= "build/classes"/>
- <pathelement location= "images"/>
- <path refid="jars"/>
- </classpath>
-
- </java>
-
- </target>
-</project>
\ No newline at end of file
+</project>
Modified:
incubator/beehive/trunk/samples/wsm-petstore-dashboard/src/ui/PetStoreDashboard.java
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/wsm-petstore-dashboard/src/ui/PetStoreDashboard.java?view=diff&r1=155944&r2=156193
==============================================================================
---
incubator/beehive/trunk/samples/wsm-petstore-dashboard/src/ui/PetStoreDashboard.java
(original)
+++
incubator/beehive/trunk/samples/wsm-petstore-dashboard/src/ui/PetStoreDashboard.java
Fri Mar 4 11:17:24 2005
@@ -1,25 +1,21 @@
+package ui;
+
/*
-*PetStoreDashboard.java
-*
-* Copyright 2001-2004 The Apache Software Foundation.
-*
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
-package ui;
-
import java.awt.Container;
import java.awt.Dimension;
import java.awt.Font;
@@ -30,45 +26,56 @@
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JSplitPane;
+import javax.swing.SwingUtilities;
-import org.apache.beehive.petstore.PetstoreInventoryManager;
+import javax.xml.rpc.ServiceException;
+import org.apache.beehive.petstore.PetstoreInventoryManager;
+import org.apache.beehive.petstore.PetstoreInventoryManagerSoapBindingStub;
public class PetStoreDashboard extends JPanel {
- private static final long serialVersionUID = 1L;
-
- PetstoreInventoryManager store;
+ private static final long serialVersionUID = 1L;
+ private PetstoreInventoryManager store;
private PetStoreProductView productView;
public PetStoreDashboard(PetstoreInventoryManager store) {
+
super(new GridLayout(1, 0));
+
this.store = store;
productView = new PetStoreProductView(store);
-
- JLabel label = new JLabel("TBD.... Events from the stroe.",
- JLabel.CENTER);
+ JLabel label = new JLabel("TBD.... Events from the stroe.",
JLabel.CENTER);
productView.setBorder(null);
-
JSplitPane splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT,
productView, label);
splitPane.setOneTouchExpandable(true);
splitPane.setDividerLocation(280);
- //Provide minimum sizes for the two components in the split pane
+ // provide minimum sizes for the two components in the split pane
productView.setMinimumSize(new Dimension(200, 50));
label.setMinimumSize(new Dimension(200, 30));
add(splitPane);
+ }
+
+ public static void main(String[] args) {
+ // schedule a job for the GUI
+ SwingUtilities.invokeLater(
+ new Runnable() {
+ public void run() { createAndShowGUI(); }
+ }
+ );
}
private static void createAndShowGUI() {
- //Make sure we have nice window decorations.
+
+ // make sure we have nice window decorations
JFrame.setDefaultLookAndFeelDecorated(true);
JDialog.setDefaultLookAndFeelDecorated(true);
- //Create and set up the window.
+ // create and set up the window
JFrame frame = new JFrame("PetStore Dashboard");
Container content = frame.getContentPane();
Font font = new Font("Serif", Font.ITALIC, 30);
@@ -78,36 +85,22 @@
PetstoreInventoryManager store;
- try {
- store =
(org.apache.beehive.petstore.PetstoreInventoryManagerSoapBindingStub)
- new
org.apache.beehive.petstore.PetstoreInventoryManagementServiceLocator().getPetstoreInventoryManager();
- }
- catch (javax.xml.rpc.ServiceException jre) {
- if(jre.getLinkedCause()!=null)
- jre.getLinkedCause().printStackTrace();
- throw new junit.framework.AssertionFailedError("JAX-RPC
ServiceException caught: " + jre);
+ try {
+ store = (PetstoreInventoryManagerSoapBindingStub) new
org.apache.beehive.petstore.PetstoreInventoryManagementServiceLocator().getPetstoreInventoryManager();
+ }
+ catch (ServiceException jre) {
+ if (null != jre.getLinkedCause()) {
+ jre.getLinkedCause().printStackTrace();
}
+ throw new Exception("JAX-RPC ServiceException caught: " + jre);
+ }
- // Time out after a minute
-
((org.apache.beehive.petstore.PetstoreInventoryManagerSoapBindingStub)store).setTimeout(60000);
-
-
-
+ // time out after a minute
+ ((PetstoreInventoryManagerSoapBindingStub)store).setTimeout(60000);
+ // display the window.
frame.getContentPane().add(new PetStoreDashboard(store));
-
- //Display the window.
frame.pack();
frame.setVisible(true);
}
-
- public static void main(String[] args) {
- //Schedule a job for the event-dispatching thread:
- //creating and showing this application's GUI.
- javax.swing.SwingUtilities.invokeLater(new Runnable() {
- public void run() {
- createAndShowGUI();
- }
- });
- }
-}
+}
\ No newline at end of file
Modified: incubator/beehive/trunk/samples/wsm-samples/WEB-INF/build-svn.xml
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/wsm-samples/WEB-INF/build-svn.xml?view=diff&r1=156192&r2=156193
==============================================================================
--- incubator/beehive/trunk/samples/wsm-samples/WEB-INF/build-svn.xml (original)
+++ incubator/beehive/trunk/samples/wsm-samples/WEB-INF/build-svn.xml Fri Mar
4 11:17:24 2005
@@ -94,6 +94,7 @@
<target name="clean">
<delete dir="${attachments.dir}" />
+ <delete file="${webservice.jar}" />
<delete file="velocity.log" />
<clean-webapp webappDir="${webapp.dir}" />
</target>