[jboss-svn-commits] JBL Code SVN: r21983 - in labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice: src/org/jboss/soa/esb/samples/quickstart/publishAsWebservice and 1 other directory.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Fri Aug 29 04:15:03 EDT 2008


Author: beve
Date: 2008-08-29 04:15:02 -0400 (Fri, 29 Aug 2008)
New Revision: 21983

Added:
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/src/org/jboss/soa/esb/samples/quickstart/publishAsWebservice/ESBWSListenerAction.java
Removed:
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/src/org/jboss/soa/esb/samples/quickstart/publishAsWebservice/MyJMSListenerAction.java
Modified:
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/jboss-esb.xml
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/readme.txt
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/request.xsd
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/soap-userpass-message.xml
Log:
Work for JBESB-1963 "EBWS: esb-based web services should be callable from SoapUI"


Modified: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/jboss-esb.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/jboss-esb.xml	2008-08-29 05:30:09 UTC (rev 21982)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/jboss-esb.xml	2008-08-29 08:15:02 UTC (rev 21983)
@@ -28,7 +28,7 @@
                 />
             </listeners>
             <actions  inXsd="/request.xsd" outXsd="/response.xsd" faultXsd="/fault.xsd" webservice="security">
-                   <action name="action" class="org.jboss.soa.esb.samples.quickstart.publishAsWebservice.MyJMSListenerAction" process="displayMessage"/>  
+                   <action name="action" class="org.jboss.soa.esb.samples.quickstart.publishAsWebservice.ESBWSListenerAction" process="displayMessage"/>  
             </actions>
         </service>
       </services>

Modified: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/readme.txt
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/readme.txt	2008-08-29 05:30:09 UTC (rev 21982)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/readme.txt	2008-08-29 08:15:02 UTC (rev 21983)
@@ -1,46 +1,31 @@
-Overview:
-
-=========
-
+Overview:
+=========
   The purpose of the publish_as_webservice quickstart sample is to demonstrate how to 
-  publish a esb service as a web service. 
-
+  publish a esb service as a web service. 
   This quickstart also demonstrates web service security using a UsernameToken in the 
-  SOAP header.
+  SOAP header.
 
-
+Running this quickstart:
+========================
+  Please refer to 'ant help-quickstarts' for prerequisites about the quickstarts
+  and a more detailed descripton of the different ways to run the quickstarts.
 
-Running this quickstart:
+To Run '.esb' archive mode:
+===========================
+  1. In a command terminal window in this folder ("Window1"), type 'ant deploy'.
+  2. Open another command terminal window in this folder ("Window2"), type
+     'ant runtest'.
+  3. Open another command terminal window in this folder ("Window2"), type
+     'ant sendesb'.
+  4. In this folder ("Window1"), type 'ant undeploy'.
 
-========================
+To Run from Soapui:
+===========================
+  1. Use the following URL: 'http://127.0.0.1:8080/Quickstart_publish_as_webservice/ESBServiceSample/HelloWorldPubService?wsdl'.
+  2. Copy the contents of soap-userpass-message.xml.
+  3. Exceute the web service call from soapui.
 
-  Please refer to 'ant help-quickstarts' for prerequisites about the quickstarts
-
-  and a more detailed descripton of the different ways to run the quickstarts.
-
-
-
-To Run '.esb' archive mode:
-
-===========================
-
-  1. In a command terminal window in this folder ("Window1"), type 'ant deploy'.
-
-  2. Open another command terminal window in this folder ("Window2"), type
-
-     'ant runtest'.
-
-  3. Open another command terminal window in this folder ("Window2"), type
-
-     'ant sendesb'.
-
-  4. In this folder ("Window1"), type 'ant undeploy'.
-
-
-Things to look for in this quickstart:
-
-======================================
-
+======================================
   1. soap-userpass-message.xml
 	 This is the SOAP Envelope that is sent to the Web Service. 
  	 Take a look at the header:

Modified: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/request.xsd
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/request.xsd	2008-08-29 05:30:09 UTC (rev 21982)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/request.xsd	2008-08-29 08:15:02 UTC (rev 21983)
@@ -2,7 +2,7 @@
   <xs:element name="sayHi" type="x1:sayHi"/>
   <xs:complexType name="sayHi">
     <xs:sequence>
-      <xs:element name="arg0" type="xs:string" minOccurs="0"/>
+      <xs:element name="arg0" type="xs:string" minOccurs="1"/>
     </xs:sequence>
   </xs:complexType>
 </xs:schema>

Modified: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/soap-userpass-message.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/soap-userpass-message.xml	2008-08-29 05:30:09 UTC (rev 21982)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/soap-userpass-message.xml	2008-08-29 08:15:02 UTC (rev 21983)
@@ -13,7 +13,9 @@
   </soap:Header>
 
   <soap:Body>
-      <say:sayHi><say:HelloWorld>HelloWorld</say:HelloWorld></say:sayHi>"
+      <say:sayHi>
+		<say:HelloWorld>HelloWorld</say:HelloWorld>
+	  </say:sayHi>"
   </soap:Body>
 
 </soap:Envelope> 

Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/src/org/jboss/soa/esb/samples/quickstart/publishAsWebservice/ESBWSListenerAction.java (from rev 21950, labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/src/org/jboss/soa/esb/samples/quickstart/publishAsWebservice/MyJMSListenerAction.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/src/org/jboss/soa/esb/samples/quickstart/publishAsWebservice/ESBWSListenerAction.java	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/src/org/jboss/soa/esb/samples/quickstart/publishAsWebservice/ESBWSListenerAction.java	2008-08-29 08:15:02 UTC (rev 21983)
@@ -0,0 +1,55 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and others contributors as indicated 
+ * by the @authors tag. All rights reserved. 
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors. 
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package org.jboss.soa.esb.samples.quickstart.publishAsWebservice;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.soa.esb.actions.AbstractActionLifecycle;
+import org.jboss.soa.esb.actions.ActionProcessingDetailFaultException;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.message.Message;
+
+public class ESBWSListenerAction extends AbstractActionLifecycle
+{
+    protected ConfigTree _config;
+    
+    public ESBWSListenerAction(ConfigTree config)
+    {
+        _config = config;
+    }
+    
+    public Message displayMessage(Message message) throws Exception
+    {
+        final String request = (String)message.getBody().get() ;
+        if (request.contains("Error")) {
+            final String detail = "<say:sayFault xmlns:say=\"http://www.jboss.org/sayHi\"><say:code>" +
+                "myErrorCode" + "</say:code><say:faultString>" + "myDescription" +
+                "</say:faultString></say:sayFault>" ;
+            throw new ActionProcessingDetailFaultException(new QName("http://www.jboss.org/sayHi", "myErrorCode"), "myDescription", detail) ;
+        }
+        
+        System.out.println("Received request: " + request) ;
+        final String responseMsg = "<say:sayHiResponse xmlns:say=\"http://www.jboss.org/sayHi\"><say:arg0>" +
+            "Response from ESB Service" + "</say:arg0></say:sayHiResponse>" ;
+        message.getBody().add(responseMsg);
+        return message;
+    }
+}

Deleted: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/src/org/jboss/soa/esb/samples/quickstart/publishAsWebservice/MyJMSListenerAction.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/src/org/jboss/soa/esb/samples/quickstart/publishAsWebservice/MyJMSListenerAction.java	2008-08-29 05:30:09 UTC (rev 21982)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/src/org/jboss/soa/esb/samples/quickstart/publishAsWebservice/MyJMSListenerAction.java	2008-08-29 08:15:02 UTC (rev 21983)
@@ -1,55 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, JBoss Inc., and others contributors as indicated 
- * by the @authors tag. All rights reserved. 
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors. 
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A 
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
- * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
- * MA  02110-1301, USA.
- * 
- * (C) 2005-2006,
- * @author JBoss Inc.
- */
-package org.jboss.soa.esb.samples.quickstart.publishAsWebservice;
-
-import javax.xml.namespace.QName;
-
-import org.jboss.soa.esb.actions.AbstractActionLifecycle;
-import org.jboss.soa.esb.actions.ActionProcessingDetailFaultException;
-import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.message.Message;
-
-public class MyJMSListenerAction extends AbstractActionLifecycle
-{
-    protected ConfigTree _config;
-    
-    public MyJMSListenerAction(ConfigTree config)
-    {
-        _config = config;
-    }
-    
-    public Message displayMessage(Message message) throws Exception
-    {
-        final String request = (String)message.getBody().get() ;
-        if (request.contains("Error")) {
-            final String detail = "<say:sayFault xmlns:say=\"http://www.jboss.org/sayHi\"><say:code>" +
-                "myErrorCode" + "</say:code><say:faultString>" + "myDescription" +
-                "</say:faultString></say:sayFault>" ;
-            throw new ActionProcessingDetailFaultException(new QName("http://www.jboss.org/sayHi", "myErrorCode"), "myDescription", detail) ;
-        }
-        
-        System.out.println("Received request: " + request) ;
-        final String responseMsg = "<say:sayHiResponse xmlns:say=\"http://www.jboss.org/sayHi\"><say:arg0>" +
-            "Response from ESB Service" + "</say:arg0></say:sayHiResponse>" ;
-        message.getBody().add(responseMsg);
-        return message;
-    }
-}




More information about the jboss-svn-commits mailing list