[jboss-cvs] JBossAS SVN: r62442 - in branches/JBoss_4_0_1_SP1_CP/testsuite/src: main/org/jboss/test/webservice/jbws64 and 4 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Apr 20 09:25:53 EDT 2007


Author: fnasser at redhat.com
Date: 2007-04-20 09:25:53 -0400 (Fri, 20 Apr 2007)
New Revision: 62442

Added:
   branches/JBoss_4_0_1_SP1_CP/testsuite/src/main/org/jboss/test/webservice/jbws64/
   branches/JBoss_4_0_1_SP1_CP/testsuite/src/main/org/jboss/test/webservice/jbws64/Hello.java
   branches/JBoss_4_0_1_SP1_CP/testsuite/src/main/org/jboss/test/webservice/jbws64/HelloJavaBean.java
   branches/JBoss_4_0_1_SP1_CP/testsuite/src/main/org/jboss/test/webservice/jbws64/InvalidNamespaceTestCase.java
   branches/JBoss_4_0_1_SP1_CP/testsuite/src/main/org/jboss/test/webservice/jbws64/JBWS64TestCase.java
   branches/JBoss_4_0_1_SP1_CP/testsuite/src/resources/webservice/jbws64/
   branches/JBoss_4_0_1_SP1_CP/testsuite/src/resources/webservice/jbws64/WEB-INF/
   branches/JBoss_4_0_1_SP1_CP/testsuite/src/resources/webservice/jbws64/WEB-INF/jaxrpc-mapping.xml
   branches/JBoss_4_0_1_SP1_CP/testsuite/src/resources/webservice/jbws64/WEB-INF/web.xml
   branches/JBoss_4_0_1_SP1_CP/testsuite/src/resources/webservice/jbws64/WEB-INF/webservices.xml
   branches/JBoss_4_0_1_SP1_CP/testsuite/src/resources/webservice/jbws64/WEB-INF/wsdl/
   branches/JBoss_4_0_1_SP1_CP/testsuite/src/resources/webservice/jbws64/WEB-INF/wsdl/HelloService.wsdl
   branches/JBoss_4_0_1_SP1_CP/testsuite/src/resources/webservice/jbws64/config.xml
Log:
Add new files from JBAS-4309

Added: branches/JBoss_4_0_1_SP1_CP/testsuite/src/main/org/jboss/test/webservice/jbws64/Hello.java
===================================================================
--- branches/JBoss_4_0_1_SP1_CP/testsuite/src/main/org/jboss/test/webservice/jbws64/Hello.java	                        (rev 0)
+++ branches/JBoss_4_0_1_SP1_CP/testsuite/src/main/org/jboss/test/webservice/jbws64/Hello.java	2007-04-20 13:25:53 UTC (rev 62442)
@@ -0,0 +1,9 @@
+package org.jboss.test.webservice.jbws64;
+
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+
+public interface Hello extends Remote
+{
+   public String publish(String in0, String in1, String in2, String in3, String in4) throws RemoteException;
+}

Added: branches/JBoss_4_0_1_SP1_CP/testsuite/src/main/org/jboss/test/webservice/jbws64/HelloJavaBean.java
===================================================================
--- branches/JBoss_4_0_1_SP1_CP/testsuite/src/main/org/jboss/test/webservice/jbws64/HelloJavaBean.java	                        (rev 0)
+++ branches/JBoss_4_0_1_SP1_CP/testsuite/src/main/org/jboss/test/webservice/jbws64/HelloJavaBean.java	2007-04-20 13:25:53 UTC (rev 62442)
@@ -0,0 +1,15 @@
+package org.jboss.test.webservice.jbws64;
+
+import org.jboss.logging.Logger;
+
+public class HelloJavaBean implements Hello
+{
+   private Logger log = Logger.getLogger(HelloJavaBean.class);
+
+   public String publish(String in0, String in1, String in2, String in3, String in4)
+   {
+      String retMsg = in0 + "," + in1 + "," + in2 + "," + in3 + "," + in4;
+      log.info(retMsg);
+      return retMsg;
+   }
+}

Added: branches/JBoss_4_0_1_SP1_CP/testsuite/src/main/org/jboss/test/webservice/jbws64/InvalidNamespaceTestCase.java
===================================================================
--- branches/JBoss_4_0_1_SP1_CP/testsuite/src/main/org/jboss/test/webservice/jbws64/InvalidNamespaceTestCase.java	                        (rev 0)
+++ branches/JBoss_4_0_1_SP1_CP/testsuite/src/main/org/jboss/test/webservice/jbws64/InvalidNamespaceTestCase.java	2007-04-20 13:25:53 UTC (rev 62442)
@@ -0,0 +1,90 @@
+/*
+ * JBoss, the OpenSource J2EE webOS
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.test.webservice.jbws64;
+
+// $Id$
+
+import junit.framework.Test;
+import org.jboss.test.JBossTestCase;
+
+import javax.xml.soap.MessageFactory;
+import javax.xml.soap.SOAPBody;
+import javax.xml.soap.SOAPConnection;
+import javax.xml.soap.SOAPConnectionFactory;
+import javax.xml.soap.SOAPElement;
+import javax.xml.soap.SOAPMessage;
+import java.io.ByteArrayInputStream;
+
+/**
+ * Axis-1.2RC2 client may send messages like this
+ *
+ * <soapenv:Envelope>
+ *  <soapenv:Body>
+ *   <publish xmlns="http://webservices.est.useme.etish.com">
+ *    <in0 xmlns="">joel</in0>
+ *     <in1 xmlns="">secret</in1>
+ *     <in2 xmlns="">1</in2>
+ *     <in3 xmlns="">6</in3>
+ *     <in4 xmlns="">2</in4>
+ *    </publish>
+ *   </soapenv:Body>
+ * </soapenv:Envelope>
+ *
+ * http://jira.jboss.com/jira/browse/JBWS-64
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 08-Feb-2005
+ */
+public class InvalidNamespaceTestCase extends JBossTestCase
+{
+   /** Construct the test case with a given name
+    */
+   public InvalidNamespaceTestCase(String name)
+   {
+      super(name);
+   }
+
+   /** Deploy the test */
+   public static Test suite() throws Exception
+   {
+      return getDeploySetup(InvalidNamespaceTestCase.class, "ws4ee-jbws64.war");
+   }
+
+   /**
+    * Test JSE endpoint
+    */
+   public void testEndpoint() throws Exception
+   {
+      String reqMsgStr =
+              "<soapenv:Envelope" +
+              "    xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'" +
+              "    xmlns:xsd='http://www.w3.org/2001/XMLSchema'" +
+              "    xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>" +
+              "  <soapenv:Body>" +
+              "    <publish xmlns='http://webservices.est.useme.etish.com'>" +
+              "       <in0 xmlns=''>joel</in0>" +
+              "       <in1 xmlns=''>secret</in1>" +
+              "       <in2 xmlns=''>1</in2>" +
+              "       <in3 xmlns=''>6</in3>" +
+              "       <in4 xmlns=''>2</in4>" +
+              "     </publish>" +
+              "  </soapenv:Body>" +
+              "</soapenv:Envelope>";
+
+      MessageFactory msgFactory = MessageFactory.newInstance();
+      SOAPMessage reqMsg = msgFactory.createMessage(null, new ByteArrayInputStream(reqMsgStr.getBytes()));
+
+      SOAPConnectionFactory factory = SOAPConnectionFactory.newInstance();
+      SOAPConnection con = factory.createConnection();
+      SOAPMessage resMsg = con.call(reqMsg, "http://" + getServerHost() + ":8080/ws4ee-jbws64");
+
+      SOAPBody soapBody = resMsg.getSOAPBody();
+      SOAPElement soapBodyElement = (SOAPElement)soapBody.getChildElements().next();
+      SOAPElement soapElement = (SOAPElement)soapBodyElement.getChildElements().next();
+      assertEquals("joel,secret,1,6,2", soapElement.getValue());
+   }
+}

Added: branches/JBoss_4_0_1_SP1_CP/testsuite/src/main/org/jboss/test/webservice/jbws64/JBWS64TestCase.java
===================================================================
--- branches/JBoss_4_0_1_SP1_CP/testsuite/src/main/org/jboss/test/webservice/jbws64/JBWS64TestCase.java	                        (rev 0)
+++ branches/JBoss_4_0_1_SP1_CP/testsuite/src/main/org/jboss/test/webservice/jbws64/JBWS64TestCase.java	2007-04-20 13:25:53 UTC (rev 62442)
@@ -0,0 +1,90 @@
+/*
+ * JBoss, the OpenSource J2EE webOS
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.test.webservice.jbws64;
+
+// $Id$
+
+import junit.framework.Test;
+import org.jboss.test.JBossTestCase;
+
+import javax.xml.soap.MessageFactory;
+import javax.xml.soap.SOAPBody;
+import javax.xml.soap.SOAPConnection;
+import javax.xml.soap.SOAPConnectionFactory;
+import javax.xml.soap.SOAPElement;
+import javax.xml.soap.SOAPMessage;
+import java.io.ByteArrayInputStream;
+
+/**
+ * Axis-1.2RC2 client may send messages like this
+ *
+ * <soapenv:Envelope>
+ *  <soapenv:Body>
+ *   <publish xmlns="http://webservices.est.useme.etish.com">
+ *    <in0 xmlns="">joel</in0>
+ *     <in1 xmlns="">secret</in1>
+ *     <in2 xmlns="">1</in2>
+ *     <in3 xmlns="">6</in3>
+ *     <in4 xmlns="">2</in4>
+ *    </publish>
+ *   </soapenv:Body>
+ * </soapenv:Envelope>
+ *
+ * http://jira.jboss.com/jira/browse/JBWS-64
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 08-Feb-2005
+ */
+public class JBWS64TestCase extends JBossTestCase
+{
+   /** Construct the test case with a given name
+    */
+   public JBWS64TestCase(String name)
+   {
+      super(name);
+   }
+
+   /** Deploy the test */
+   public static Test suite() throws Exception
+   {
+      return getDeploySetup(JBWS64TestCase.class, "ws4ee-jbws64.war");
+   }
+
+   /**
+    * Test JSE endpoint
+    */
+   public void testEndpoint() throws Exception
+   {
+      String reqMsgStr =
+              "<soapenv:Envelope" +
+              "    xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'" +
+              "    xmlns:xsd='http://www.w3.org/2001/XMLSchema'" +
+              "    xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>" +
+              "  <soapenv:Body>" +
+              "    <publish xmlns='http://webservices.est.useme.etish.com'>" +
+              "       <in0 xmlns=''>joel</in0>" +
+              "       <in1 xmlns=''>secret</in1>" +
+              "       <in2 xmlns=''>1</in2>" +
+              "       <in3 xmlns=''>6</in3>" +
+              "       <in4 xmlns=''>2</in4>" +
+              "     </publish>" +
+              "  </soapenv:Body>" +
+              "</soapenv:Envelope>";
+
+      MessageFactory msgFactory = MessageFactory.newInstance();
+      SOAPMessage reqMsg = msgFactory.createMessage(null, new ByteArrayInputStream(reqMsgStr.getBytes()));
+
+      SOAPConnectionFactory factory = SOAPConnectionFactory.newInstance();
+      SOAPConnection con = factory.createConnection();
+      SOAPMessage resMsg = con.call(reqMsg, "http://" + getServerHost() + ":8080/ws4ee-jbws64");
+
+      SOAPBody soapBody = resMsg.getSOAPBody();
+      SOAPElement soapBodyElement = (SOAPElement)soapBody.getChildElements().next();
+      SOAPElement soapElement = (SOAPElement)soapBodyElement.getChildElements().next();
+      assertEquals("joel,secret,1,6,2", soapElement.getValue());
+   }
+}

Added: branches/JBoss_4_0_1_SP1_CP/testsuite/src/resources/webservice/jbws64/WEB-INF/jaxrpc-mapping.xml
===================================================================
--- branches/JBoss_4_0_1_SP1_CP/testsuite/src/resources/webservice/jbws64/WEB-INF/jaxrpc-mapping.xml	                        (rev 0)
+++ branches/JBoss_4_0_1_SP1_CP/testsuite/src/resources/webservice/jbws64/WEB-INF/jaxrpc-mapping.xml	2007-04-20 13:25:53 UTC (rev 62442)
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<java-wsdl-mapping version="1.1" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee    http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd">
+  <package-mapping>
+    <package-type>org.jboss.webservice.jbws64</package-type>
+    <namespaceURI>http://org.jboss.test.webservice/jbws64/types</namespaceURI>
+  </package-mapping>
+  <package-mapping>
+    <package-type>org.jboss.webservice.jbws64</package-type>
+    <namespaceURI>http://org.jboss.test.webservice/jbws64</namespaceURI>
+  </package-mapping>
+  <service-interface-mapping>
+    <service-interface>org.jboss.webservice.jbws64.HelloService</service-interface>
+    <wsdl-service-name xmlns:serviceNS="http://org.jboss.test.webservice/jbws64">serviceNS:HelloService</wsdl-service-name>
+    <port-mapping>
+      <port-name>HelloPort</port-name>
+      <java-port-name>HelloPort</java-port-name>
+    </port-mapping>
+  </service-interface-mapping>
+  <service-endpoint-interface-mapping>
+    <service-endpoint-interface>org.jboss.test.webservice.jbws64.Hello</service-endpoint-interface>
+    <wsdl-port-type xmlns:portTypeNS="http://org.jboss.test.webservice/jbws64">portTypeNS:Hello</wsdl-port-type>
+    <wsdl-binding xmlns:bindingNS="http://org.jboss.test.webservice/jbws64">bindingNS:HelloBinding</wsdl-binding>
+    <service-endpoint-method-mapping>
+      <java-method-name>publish</java-method-name>
+      <wsdl-operation>publish</wsdl-operation>
+      <method-param-parts-mapping>
+        <param-position>0</param-position>
+        <param-type>java.lang.String</param-type>
+        <wsdl-message-mapping>
+          <wsdl-message xmlns:wsdlMsgNS="http://org.jboss.test.webservice/jbws64">wsdlMsgNS:Hello_publish</wsdl-message>
+          <wsdl-message-part-name>String_1</wsdl-message-part-name>
+          <parameter-mode>IN</parameter-mode>
+        </wsdl-message-mapping>
+      </method-param-parts-mapping>
+      <method-param-parts-mapping>
+        <param-position>1</param-position>
+        <param-type>java.lang.String</param-type>
+        <wsdl-message-mapping>
+          <wsdl-message xmlns:wsdlMsgNS="http://org.jboss.test.webservice/jbws64">wsdlMsgNS:Hello_publish</wsdl-message>
+          <wsdl-message-part-name>String_2</wsdl-message-part-name>
+          <parameter-mode>IN</parameter-mode>
+        </wsdl-message-mapping>
+      </method-param-parts-mapping>
+      <method-param-parts-mapping>
+        <param-position>2</param-position>
+        <param-type>java.lang.String</param-type>
+        <wsdl-message-mapping>
+          <wsdl-message xmlns:wsdlMsgNS="http://org.jboss.test.webservice/jbws64">wsdlMsgNS:Hello_publish</wsdl-message>
+          <wsdl-message-part-name>String_3</wsdl-message-part-name>
+          <parameter-mode>IN</parameter-mode>
+        </wsdl-message-mapping>
+      </method-param-parts-mapping>
+      <method-param-parts-mapping>
+        <param-position>3</param-position>
+        <param-type>java.lang.String</param-type>
+        <wsdl-message-mapping>
+          <wsdl-message xmlns:wsdlMsgNS="http://org.jboss.test.webservice/jbws64">wsdlMsgNS:Hello_publish</wsdl-message>
+          <wsdl-message-part-name>String_4</wsdl-message-part-name>
+          <parameter-mode>IN</parameter-mode>
+        </wsdl-message-mapping>
+      </method-param-parts-mapping>
+      <method-param-parts-mapping>
+        <param-position>4</param-position>
+        <param-type>java.lang.String</param-type>
+        <wsdl-message-mapping>
+          <wsdl-message xmlns:wsdlMsgNS="http://org.jboss.test.webservice/jbws64">wsdlMsgNS:Hello_publish</wsdl-message>
+          <wsdl-message-part-name>String_5</wsdl-message-part-name>
+          <parameter-mode>IN</parameter-mode>
+        </wsdl-message-mapping>
+      </method-param-parts-mapping>
+      <wsdl-return-value-mapping>
+        <method-return-value>java.lang.String</method-return-value>
+        <wsdl-message xmlns:wsdlMsgNS="http://org.jboss.test.webservice/jbws64">wsdlMsgNS:Hello_publishResponse</wsdl-message>
+        <wsdl-message-part-name>result</wsdl-message-part-name>
+      </wsdl-return-value-mapping>
+    </service-endpoint-method-mapping>
+  </service-endpoint-interface-mapping>
+</java-wsdl-mapping>

Added: branches/JBoss_4_0_1_SP1_CP/testsuite/src/resources/webservice/jbws64/WEB-INF/web.xml
===================================================================
--- branches/JBoss_4_0_1_SP1_CP/testsuite/src/resources/webservice/jbws64/WEB-INF/web.xml	                        (rev 0)
+++ branches/JBoss_4_0_1_SP1_CP/testsuite/src/resources/webservice/jbws64/WEB-INF/web.xml	2007-04-20 13:25:53 UTC (rev 62442)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+  version="2.4">
+
+  <servlet>
+    <servlet-name>Hello</servlet-name>
+    <servlet-class>org.jboss.test.webservice.jbws64.HelloJavaBean</servlet-class>
+  </servlet>
+  <servlet-mapping>
+    <servlet-name>Hello</servlet-name>
+    <url-pattern>/*</url-pattern>
+  </servlet-mapping>
+</web-app>
+

Added: branches/JBoss_4_0_1_SP1_CP/testsuite/src/resources/webservice/jbws64/WEB-INF/webservices.xml
===================================================================
--- branches/JBoss_4_0_1_SP1_CP/testsuite/src/resources/webservice/jbws64/WEB-INF/webservices.xml	                        (rev 0)
+++ branches/JBoss_4_0_1_SP1_CP/testsuite/src/resources/webservice/jbws64/WEB-INF/webservices.xml	2007-04-20 13:25:53 UTC (rev 62442)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<webservices
+  xmlns="http://java.sun.com/xml/ns/j2ee"
+  xmlns:impl="http://test.jboss.org/jbws64"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd"
+  version="1.1">
+
+  <webservice-description>
+    <webservice-description-name>HelloService</webservice-description-name>
+    <wsdl-file>WEB-INF/wsdl/HelloService.wsdl</wsdl-file>
+    <jaxrpc-mapping-file>WEB-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
+    <port-component>
+      <port-component-name>HelloJSE</port-component-name>
+      <wsdl-port>impl:HelloPort</wsdl-port>
+      <service-endpoint-interface>org.jboss.test.webservice.jbws64.Hello</service-endpoint-interface>
+      <service-impl-bean>
+        <servlet-link>Hello</servlet-link>
+      </service-impl-bean>
+    </port-component>
+  </webservice-description>
+</webservices>

Added: branches/JBoss_4_0_1_SP1_CP/testsuite/src/resources/webservice/jbws64/WEB-INF/wsdl/HelloService.wsdl
===================================================================
--- branches/JBoss_4_0_1_SP1_CP/testsuite/src/resources/webservice/jbws64/WEB-INF/wsdl/HelloService.wsdl	                        (rev 0)
+++ branches/JBoss_4_0_1_SP1_CP/testsuite/src/resources/webservice/jbws64/WEB-INF/wsdl/HelloService.wsdl	2007-04-20 13:25:53 UTC (rev 62442)
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<definitions name="HelloService" targetNamespace="http://org.jboss.test.webservice/jbws64" xmlns:tns="http://org.jboss.test.webservice/jbws64" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
+  <types/>
+  <message name="Hello_publish">
+    <part name="String_1" type="xsd:string"/>
+    <part name="String_2" type="xsd:string"/>
+    <part name="String_3" type="xsd:string"/>
+    <part name="String_4" type="xsd:string"/>
+    <part name="String_5" type="xsd:string"/>
+  </message>
+  <message name="Hello_publishResponse">
+    <part name="result" type="xsd:string"/>
+  </message>
+  <portType name="Hello">
+    <operation name="publish" parameterOrder="String_1 String_2 String_3 String_4 String_5">
+      <input message="tns:Hello_publish"/>
+      <output message="tns:Hello_publishResponse"/>
+    </operation>
+  </portType>
+  <binding name="HelloBinding" type="tns:Hello">
+    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/>
+    <operation name="publish">
+      <soap:operation soapAction=""/>
+      <input>
+        <soap:body use="literal" namespace="http://org.jboss.test.webservice/jbws64"/>
+      </input>
+      <output>
+        <soap:body use="literal" namespace="http://org.jboss.test.webservice/jbws64"/>
+      </output>
+    </operation>
+  </binding>
+  <service name="HelloService">
+    <port name="HelloPort" binding="tns:HelloBinding">
+      <soap:address location="REPLACE_WITH_ACTUAL_URL"/>
+    </port>
+  </service>
+</definitions>

Added: branches/JBoss_4_0_1_SP1_CP/testsuite/src/resources/webservice/jbws64/config.xml
===================================================================
--- branches/JBoss_4_0_1_SP1_CP/testsuite/src/resources/webservice/jbws64/config.xml	                        (rev 0)
+++ branches/JBoss_4_0_1_SP1_CP/testsuite/src/resources/webservice/jbws64/config.xml	2007-04-20 13:25:53 UTC (rev 62442)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+   wscompile -cp ../../../../output/classes -gen:server -f:rpcliteral -mapping jaxrpc-mapping.xml config.xml
+-->
+
+<configuration
+  xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
+
+  <service name="HelloService"
+    targetNamespace="http://org.jboss.test.webservice/jbws64"
+    typeNamespace="http://org.jboss.test.webservice/jbws64/types"
+    packageName="org.jboss.webservice.jbws64">
+    <interface name="org.jboss.test.webservice.jbws64.Hello"/>
+  </service>
+
+</configuration>
+




More information about the jboss-cvs-commits mailing list