[jbossws-commits] JBossWS SVN: r1225 - in branches/jbossws-1.0/src/test: . ant java/org/jboss/test/ws/jaxrpc java/org/jboss/test/ws/jaxrpc/jbws1186 java/org/jboss/test/ws/jaxrpc/jbws1303 resources/jaxrpc resources/jaxrpc/jbws1186/WEB-INF resources/jaxrpc/jbws1303 resources/jaxrpc/jbws1303/META-INF resources/jaxrpc/jbws1303/WEB-INF resources/jaxrpc/jbws1303/WEB-INF/wsdl resources/jaxrpc/jbws718 resources/jaxws/jsr181/complex

jbossws-commits at lists.jboss.org jbossws-commits at lists.jboss.org
Mon Oct 16 06:40:27 EDT 2006


Author: thomas.diesler at jboss.com
Date: 2006-10-16 06:40:10 -0400 (Mon, 16 Oct 2006)
New Revision: 1225

Added:
   branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1186/ServerHandler.java
   branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/
   branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/JBWS1303TestCase.java
   branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/LastModImpl.java
   branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/ServerHandler.java
   branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1303/
   branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1303/META-INF/
   branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1303/META-INF/application-client.xml
   branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1303/META-INF/jboss-client.xml
   branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1303/WEB-INF/
   branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1303/WEB-INF/web.xml
   branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1303/WEB-INF/webservices.xml
   branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1303/WEB-INF/wsdl/
   branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1303/WEB-INF/wsdl/lastmodified.wsdl
   branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1303/wstools-config.xml
Removed:
   branches/jbossws-1.0/src/test/resources/jaxrpc/jbws718/null
   branches/jbossws-1.0/src/test/resources/jaxrpc/jbws718/org/
   branches/jbossws-1.0/src/test/resources/jaxws/jsr181/complex/org/
Modified:
   branches/jbossws-1.0/src/test/ant/build-jars-jaxrpc.xml
   branches/jbossws-1.0/src/test/build.xml
   branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1186/JBWS1186TestCase.java
   branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1186/TestEndpointImpl.java
   branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1186/WEB-INF/web.xml
   branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1186/WEB-INF/webservices.xml
Log:
[JBWS-1303] Unmarshall issue with xsi:type specified bean property
Add test case for jbws-1303



Modified: branches/jbossws-1.0/src/test/ant/build-jars-jaxrpc.xml
===================================================================
--- branches/jbossws-1.0/src/test/ant/build-jars-jaxrpc.xml	2006-10-16 10:37:30 UTC (rev 1224)
+++ branches/jbossws-1.0/src/test/ant/build-jars-jaxrpc.xml	2006-10-16 10:40:10 UTC (rev 1225)
@@ -717,11 +717,12 @@
       </metainf>
     </jar>
     
-    <!-- jaxrpcws-jbws1186 -->
+    <!-- jbossws-jbws1186 -->
     <war warfile="${build.test.dir}/libs/jaxrpc-jbws1186.war" webxml="${build.test.dir}/resources/jaxrpc/jbws1186/WEB-INF/web.xml">
       <classes dir="${build.test.dir}/classes">
         <include name="org/jboss/test/ws/jaxrpc/jbws1186/TestEndpointImpl.class"/>
         <include name="org/jboss/test/ws/jaxrpc/jbws1186/TestEndpoint.class"/>
+        <include name="org/jboss/test/ws/jaxrpc/jbws1186/ServerHandler.class"/>
         <include name="org/jboss/test/ws/jaxrpc/jbws1186/UserType.class"/>
       </classes>
       <webinf dir="${build.test.dir}/resources/jaxrpc/jbws1186/WEB-INF">
@@ -779,6 +780,33 @@
       </metainf>
     </jar>  
     
+    <!-- jaxrpc-jbws1303 -->
+    <war warfile="${build.test.dir}/libs/jaxrpc-jbws1303.war" webxml="${build.test.dir}/resources/jaxrpc/jbws1303/WEB-INF/web.xml">
+      <classes dir="${build.test.dir}/classes">
+        <include name="org/jboss/test/ws/jaxrpc/jbws1303/*.class"/>
+        <exclude name="org/jboss/test/ws/jaxrpc/jbws1303/*TestCase.class"/>
+      </classes>
+      <webinf dir="${build.test.dir}/resources/jaxrpc/jbws1303/WEB-INF">
+        <include name="webservices.xml"/>
+        <include name="jaxrpc-mapping.xml"/>
+        <include name="wsdl/**"/>
+      </webinf>
+    </war>
+    <jar destfile="${build.test.dir}/libs/jaxrpc-jbws1303-client.jar">
+      <fileset dir="${build.test.dir}/classes">
+        <include name="org/jboss/test/ws/jaxrpc/jbws1303/*.class"/>
+        <exclude name="org/jboss/test/ws/jaxrpc/jbws1303/*TestCase.class"/>
+      </fileset>
+      <metainf dir="${build.test.dir}/resources/jaxrpc/jbws1303/META-INF">
+        <include name="application-client.xml"/>
+        <include name="jboss-client.xml"/>
+      </metainf>
+      <metainf dir="${build.test.dir}/resources/jaxrpc/jbws1303/WEB-INF">
+        <include name="wsdl/**"/>
+        <include name="jaxrpc-mapping.xml"/>
+      </metainf>
+    </jar>
+    
     <!-- jaxrpc-marshall-doclit.war -->
     <war warfile="${build.test.dir}/libs/jaxrpc-marshall-doclit.war" webxml="${build.test.dir}/resources/jaxrpc/marshall-doclit/WEB-INF/web.xml">
       <classes dir="${build.test.dir}/classes">

Modified: branches/jbossws-1.0/src/test/build.xml
===================================================================
--- branches/jbossws-1.0/src/test/build.xml	2006-10-16 10:37:30 UTC (rev 1224)
+++ branches/jbossws-1.0/src/test/build.xml	2006-10-16 10:40:10 UTC (rev 1225)
@@ -206,8 +206,7 @@
 
   <target name="deploy-jbpmbpel" unless="jbpmbpel.available">
     <mkdir dir="${jboss.server.deploy.jbpmbpel}" />
-    <unjar dest="${jboss.server.deploy.jbpmbpel}"
-           src="${thirdparty.dir}/jbpm-bpel.sar" />
+    <unjar dest="${jboss.server.deploy.jbpmbpel}" src="${thirdparty.dir}/jbpm-bpel.sar" />
   </target>
   
   <!-- ================================================================== -->
@@ -233,6 +232,7 @@
       <src path="${test.java.dir}"/>
       <exclude name="org/jboss/test/ws/interop/**"/>
       <exclude name="org/jboss/test/ws/jaxrpc/jbws718/**"/>
+      <exclude name="org/jboss/test/ws/jaxrpc/jbws1303/**"/>
       <classpath refid="javac.classpath"/>
     </javac>
   </target>
@@ -303,6 +303,7 @@
     <mkdir dir="${build.test.dir}/wstools/java"/>
     <wstools dest="${build.test.dir}/wstools/resources/jaxrpc/jbws718/WEB-INF" config="${test.resources.dir}/jaxrpc/jbws718/wstools-config.xml"/>
     <!--wstools dest="${build.test.dir}/wstools/resources/jaxrpc/jbws958/WEB-INF" config="${test.resources.dir}/jaxrpc/jbws958/wstools-config.xml"/-->
+    <wstools dest="${build.test.dir}/wstools/resources/jaxrpc/jbws1303/WEB-INF" config="${test.resources.dir}/jaxrpc/jbws1303/wstools-config.xml"/>
     <wstools dest="${build.test.dir}/wstools/resources/jaxrpc/samples/docstyle/bare/WEB-INF" config="${test.resources.dir}/jaxrpc/samples/docstyle/bare/wstools-config.xml"/>
     <wstools dest="${build.test.dir}/wstools/resources/jaxrpc/samples/docstyle/wrapped/WEB-INF" config="${test.resources.dir}/jaxrpc/samples/docstyle/wrapped/wstools-config.xml"/>
     <wstools dest="${build.test.dir}/wstools/resources/jaxrpc/samples/dynamichandler/WEB-INF" config="${test.resources.dir}/jaxrpc/samples/dynamichandler/wstools-config.xml"/>
@@ -326,6 +327,7 @@
 
     <move todir="${build.test.dir}/wstools/java">
       <fileset dir="${build.test.dir}/wstools/resources/jaxrpc/jbws718/WEB-INF" includes="org/**"/>
+      <fileset dir="${build.test.dir}/wstools/resources/jaxrpc/jbws1303/WEB-INF" includes="org/**"/>
       <fileset dir="${build.test.dir}/wstools/resources/jaxrpc/samples/docstyle/wrapped/WEB-INF" includes="org/**"/>
       <!--fileset dir="${build.test.dir}/wstools/resources/jaxrpc/samples/wsbpel/hello/WEB-INF" includes="org/**" /-->
     </move>

Modified: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1186/JBWS1186TestCase.java
===================================================================
--- branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1186/JBWS1186TestCase.java	2006-10-16 10:37:30 UTC (rev 1224)
+++ branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1186/JBWS1186TestCase.java	2006-10-16 10:40:10 UTC (rev 1225)
@@ -96,10 +96,10 @@
    {
       UserType userType = new UserType();
       UserType retObj = port.echo(null, userType);
-      assertEquals("null null", retObj.getName());
+      assertNull("null expected", retObj);
    }
 
-   public void testAccessMessage() throws Exception
+   public void testMessageAccess() throws Exception
    {
       MessageFactory factory = MessageFactory.newInstance();
       
@@ -121,7 +121,6 @@
       SOAPMessage resMessage = con.call(reqMessage, "http://" + getServerHost() + ":8080/jaxrpc-jbws1186");
       SOAPElement soapElement = (SOAPElement)resMessage.getSOAPBody().getChildElements().next();
       soapElement = (SOAPElement)soapElement.getChildElements().next();
-      soapElement = (SOAPElement)soapElement.getChildElements().next();
-      assertEquals("null null", soapElement.getValue());
+      assertEquals("1", soapElement.getAttribute("xsi:nil"));
    }
 }

Added: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1186/ServerHandler.java
===================================================================
--- branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1186/ServerHandler.java	2006-10-16 10:37:30 UTC (rev 1224)
+++ branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1186/ServerHandler.java	2006-10-16 10:40:10 UTC (rev 1225)
@@ -0,0 +1,95 @@
+/*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, JBoss Inc., and individual contributors as indicated
+  * by the @authors tag. See the copyright.txt in the distribution for a
+  * full listing of individual contributors.
+  *
+  * This is free software; you can redistribute it and/or modify it
+  * under the terms of the GNU Lesser General Public License as
+  * published by the Free Software Foundation; either version 2.1 of
+  * the License, or (at your option) any later version.
+  *
+  * This software is distributed in the hope that it will be useful,
+  * but WITHOUT ANY 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 along with this software; if not, write to the Free
+  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+  */
+package org.jboss.test.ws.jaxrpc.jbws1186;
+
+import javax.xml.namespace.QName;
+import javax.xml.rpc.handler.GenericHandler;
+import javax.xml.rpc.handler.MessageContext;
+import javax.xml.rpc.handler.soap.SOAPMessageContext;
+import javax.xml.soap.MessageFactory;
+import javax.xml.soap.Name;
+import javax.xml.soap.SOAPBody;
+import javax.xml.soap.SOAPBodyElement;
+import javax.xml.soap.SOAPElement;
+import javax.xml.soap.SOAPEnvelope;
+import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPFactory;
+import javax.xml.soap.SOAPMessage;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.soap.SOAPContentElement;
+
+public class ServerHandler extends GenericHandler
+{
+   private Logger log = Logger.getLogger(ServerHandler.class);
+   
+   public QName[] getHeaders()
+   {
+      return new QName[]{};
+   }
+
+   public boolean handleRequest(MessageContext msgContext)
+   {
+      try
+      {
+         SOAPMessage soapMessage = ((SOAPMessageContext)msgContext).getMessage();
+         SOAPEnvelope soapEnvelope = soapMessage.getSOAPPart().getEnvelope();
+         String nsURI = soapEnvelope.getAttribute("xmlns:xsi");
+         log.info("xmlns:xsi: " + nsURI);
+      }
+      catch (SOAPException ex)
+      {
+         throw new RuntimeException(ex);
+      }      
+      return true;
+   }
+
+   public boolean handleResponse(MessageContext msgContext)
+   {
+      try
+      {
+         SOAPMessage soapMessage = ((SOAPMessageContext)msgContext).getMessage();
+         SOAPElement soapElement = (SOAPElement)soapMessage.getSOAPBody().getChildElements().next();
+         
+         // Use propriatary API to test the response value
+         SOAPContentElement resElement = (SOAPContentElement)soapElement.getChildElements().next();
+         if (resElement.getObjectValue() == null)
+         {
+            MessageFactory msgFactory = MessageFactory.newInstance();
+            SOAPFactory soapFactory = SOAPFactory.newInstance();
+            
+            soapMessage = msgFactory.createMessage();
+            SOAPEnvelope soapEnvelope = soapMessage.getSOAPPart().getEnvelope();
+            soapEnvelope.addNamespaceDeclaration("xsi", "http://www.w3.org/2001/XMLSchema-instance");
+            Name resName = soapFactory.createName("echoResponse", "ns1", "http://org.jboss.test.ws/jbws1186");
+            SOAPBodyElement bodyElement = soapMessage.getSOAPBody().addBodyElement(resName);
+            bodyElement.addChildElement("result").setAttribute("xsi:nil", "1");
+            ((SOAPMessageContext)msgContext).setMessage(soapMessage);
+         }
+      }
+      catch (Exception ex)
+      {
+         throw new RuntimeException(ex);
+      }      
+      return true;
+   }
+}


Property changes on: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1186/ServerHandler.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Modified: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1186/TestEndpointImpl.java
===================================================================
--- branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1186/TestEndpointImpl.java	2006-10-16 10:37:30 UTC (rev 1224)
+++ branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1186/TestEndpointImpl.java	2006-10-16 10:40:10 UTC (rev 1225)
@@ -32,7 +32,12 @@
    public UserType echo(String message, UserType ut) throws RemoteException
    {
       log.info("echo: " + message);
-      ut.setName(message + " " + ut.getName());
+      
+      if (message != null || ut.getName() != null)
+         ut.setName(message + " " + ut.getName());
+      else
+         ut = null;
+      
       return ut;
    }
 

Added: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/JBWS1303TestCase.java
===================================================================
--- branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/JBWS1303TestCase.java	2006-10-16 10:37:30 UTC (rev 1224)
+++ branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/JBWS1303TestCase.java	2006-10-16 10:40:10 UTC (rev 1225)
@@ -0,0 +1,73 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY 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 along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxrpc.jbws1303;
+
+// $Id$
+
+import javax.naming.InitialContext;
+import javax.xml.rpc.Service;
+
+import junit.framework.Test;
+
+import org.jboss.test.ws.JBossWSTest;
+import org.jboss.test.ws.JBossWSTestSetup;
+
+/**
+ * Unmarshall issue with xsi:type specified bean property
+ *
+ * http://jira.jboss.org/jira/browse/JBWS-1303
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 16-Oct-2006
+ */
+public class JBWS1303TestCase extends JBossWSTest
+{
+   private static LastMod_PortType port;
+
+   public static Test suite()
+   {
+      return JBossWSTestSetup.newTestSetup(JBWS1303TestCase.class, "jaxrpc-jbws1303.war, jaxrpc-jbws1303-client.jar");
+   }
+
+   protected void setUp() throws Exception
+   {
+      super.setUp();
+      if (port == null)
+      {
+         InitialContext iniCtx = getInitialContext();
+         Service service = (Service)iniCtx.lookup("java:comp/env/service/TestService");
+         port = (LastMod_PortType)service.getPort(LastMod_PortType.class);
+      }
+   }
+
+   public void testEndpoint() throws Exception
+   {
+      if (true)
+      {
+         System.out.println("FIXME: JBWS-1303");
+         return;
+      }
+      Lastmod lastmod = new Lastmod("yesterday");
+      LastmodResponse lastmodRes = port.lastmod(lastmod);
+      assertEquals("yesterday", lastmodRes.getTimeChanged());
+   }
+}


Property changes on: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/JBWS1303TestCase.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/LastModImpl.java
===================================================================
--- branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/LastModImpl.java	2006-10-16 10:37:30 UTC (rev 1224)
+++ branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/LastModImpl.java	2006-10-16 10:40:10 UTC (rev 1225)
@@ -0,0 +1,39 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY 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 along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxrpc.jbws1303;
+
+import java.rmi.RemoteException;
+
+import org.jboss.logging.Logger;
+
+public class LastModImpl implements LastMod_PortType
+{
+   // Provide logging
+   private static Logger log = Logger.getLogger(LastModImpl.class);
+
+   public LastmodResponse lastmod(Lastmod lastmod) throws RemoteException
+   {
+      String req = lastmod.getLastmodRequest();
+      log.info("lastmod: " + req);
+      return new LastmodResponse(req);
+   }
+}


Property changes on: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/LastModImpl.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/ServerHandler.java
===================================================================
--- branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/ServerHandler.java	2006-10-16 10:37:30 UTC (rev 1224)
+++ branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/ServerHandler.java	2006-10-16 10:40:10 UTC (rev 1225)
@@ -0,0 +1,68 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY 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 along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxrpc.jbws1303;
+
+import javax.xml.namespace.QName;
+import javax.xml.rpc.handler.GenericHandler;
+import javax.xml.rpc.handler.MessageContext;
+import javax.xml.rpc.handler.soap.SOAPMessageContext;
+import javax.xml.soap.MessageFactory;
+import javax.xml.soap.SOAPElement;
+import javax.xml.soap.SOAPMessage;
+
+public class ServerHandler extends GenericHandler
+{
+   public QName[] getHeaders()
+   {
+      return new QName[] {};
+   }
+
+   /**
+    * <env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
+    *  <env:Header/>
+    *  <env:Body>
+    *   <lastmodResponse xmlns='http://netid.msu.edu:8080/lastmod.pl'>
+    *    <TimeChanged xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:type='string'>yesterday</TimeChanged>
+    *   </lastmodResponse>
+    *  </env:Body>
+    * </env:Envelope>
+    */
+   public boolean handleResponse(MessageContext msgContext)
+   {
+      try
+      {
+         SOAPMessage soapMessage = MessageFactory.newInstance().createMessage();
+         SOAPElement bodyElement = soapMessage.getSOAPBody().addChildElement("lastmodResponse");
+         bodyElement.setAttribute("xmlns", "http://netid.msu.edu:8080/lastmod.pl");
+         SOAPElement soapElement = bodyElement.addChildElement("TimeChanged");
+         soapElement.addNamespaceDeclaration("xsi", "http://www.w3.org/2001/XMLSchema-instance");
+         soapElement.setAttribute("xsi:type", "string");
+         soapElement.setValue("yesterday");
+         ((SOAPMessageContext)msgContext).setMessage(soapMessage);
+      }
+      catch (Exception ex)
+      {
+         throw new RuntimeException(ex);
+      }
+      return true;
+   }
+}


Property changes on: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/ServerHandler.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Modified: branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1186/WEB-INF/web.xml
===================================================================
--- branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1186/WEB-INF/web.xml	2006-10-16 10:37:30 UTC (rev 1224)
+++ branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1186/WEB-INF/web.xml	2006-10-16 10:40:10 UTC (rev 1225)
@@ -4,11 +4,12 @@
   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>TestEndpoint</servlet-name>
     <servlet-class>org.jboss.test.ws.jaxrpc.jbws1186.TestEndpointImpl</servlet-class>
   </servlet>
+  
   <servlet-mapping>
     <servlet-name>TestEndpoint</servlet-name>
     <url-pattern>/*</url-pattern>

Modified: branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1186/WEB-INF/webservices.xml
===================================================================
--- branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1186/WEB-INF/webservices.xml	2006-10-16 10:37:30 UTC (rev 1224)
+++ branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1186/WEB-INF/webservices.xml	2006-10-16 10:40:10 UTC (rev 1225)
@@ -10,6 +10,10 @@
    <service-impl-bean>
     <servlet-link>TestEndpoint</servlet-link>
    </service-impl-bean>
+   <handler>
+    <handler-name>ServerHandler</handler-name>
+    <handler-class>org.jboss.test.ws.jaxrpc.jbws1186.ServerHandler</handler-class>
+   </handler>
   </port-component>
  </webservice-description>
 </webservices>
\ No newline at end of file

Added: branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1303/META-INF/application-client.xml
===================================================================
--- branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1303/META-INF/application-client.xml	2006-10-16 10:37:30 UTC (rev 1224)
+++ branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1303/META-INF/application-client.xml	2006-10-16 10:40:10 UTC (rev 1225)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<application-client 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/application-client_1_4.xsd"
+  version="1.4">
+
+  <display-name>JAXRPC simple tests</display-name>
+
+  <service-ref>
+    <service-ref-name>service/TestService</service-ref-name>
+    <service-interface>javax.xml.rpc.Service</service-interface>
+    <wsdl-file>use overwrite in jboss-client.xml</wsdl-file>
+    <jaxrpc-mapping-file>META-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
+    <port-component-ref>
+      <service-endpoint-interface>org.jboss.test.ws.jaxrpc.jbws1303.LastMod_PortType</service-endpoint-interface>
+    </port-component-ref>
+  </service-ref>
+
+</application-client>
+


Property changes on: branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1303/META-INF/application-client.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1303/META-INF/jboss-client.xml
===================================================================
--- branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1303/META-INF/jboss-client.xml	2006-10-16 10:37:30 UTC (rev 1224)
+++ branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1303/META-INF/jboss-client.xml	2006-10-16 10:40:10 UTC (rev 1225)
@@ -0,0 +1,15 @@
+<?xml version='1.0' encoding='UTF-8' ?>
+
+<!DOCTYPE jboss-client PUBLIC
+   "-//JBoss//DTD Application Client 4.0//EN"
+   "http://www.jboss.org/j2ee/dtd/jboss-client_4_0.dtd">
+
+<jboss-client>
+  <jndi-name>jbossws-client</jndi-name>
+
+  <service-ref>
+    <service-ref-name>service/TestService</service-ref-name>
+    <wsdl-override>http://@jbosstest.host.name@:8080/jaxrpc-jbws1303?wsdl</wsdl-override>
+  </service-ref>
+
+</jboss-client>


Property changes on: branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1303/META-INF/jboss-client.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1303/WEB-INF/web.xml
===================================================================
--- branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1303/WEB-INF/web.xml	2006-10-16 10:37:30 UTC (rev 1224)
+++ branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1303/WEB-INF/web.xml	2006-10-16 10:40:10 UTC (rev 1225)
@@ -0,0 +1,19 @@
+<?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>LastMod</servlet-name>
+    <servlet-class>org.jboss.test.ws.jaxrpc.jbws1303.LastModImpl</servlet-class>
+  </servlet>
+
+  <servlet-mapping>
+    <servlet-name>LastMod</servlet-name>
+    <url-pattern>/*</url-pattern>
+  </servlet-mapping>
+
+</web-app>
+


Property changes on: branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1303/WEB-INF/web.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1303/WEB-INF/webservices.xml
===================================================================
--- branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1303/WEB-INF/webservices.xml	2006-10-16 10:37:30 UTC (rev 1224)
+++ branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1303/WEB-INF/webservices.xml	2006-10-16 10:40:10 UTC (rev 1225)
@@ -0,0 +1,19 @@
+<webservices version='1.1' xmlns='http://java.sun.com/xml/ns/j2ee' xmlns:impl='http://netid.msu.edu:8080/lastmod.pl' 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'>
+ <webservice-description>
+  <webservice-description-name>LastMod</webservice-description-name>
+  <wsdl-file>WEB-INF/wsdl/lastmodified.wsdl</wsdl-file>
+  <jaxrpc-mapping-file>WEB-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
+  <port-component>
+   <port-component-name>LastModPort</port-component-name>
+   <wsdl-port>impl:LastModPort</wsdl-port>
+   <service-endpoint-interface>org.jboss.test.ws.jaxrpc.jbws1303.LastMod_PortType</service-endpoint-interface>
+   <service-impl-bean>
+    <servlet-link>LastMod</servlet-link>
+   </service-impl-bean>
+   <handler>
+    <handler-name>ServerHandler</handler-name>
+    <handler-class>org.jboss.test.ws.jaxrpc.jbws1303.ServerHandler</handler-class>
+   </handler>
+  </port-component>
+ </webservice-description>
+</webservices>
\ No newline at end of file


Property changes on: branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1303/WEB-INF/webservices.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1303/WEB-INF/wsdl/lastmodified.wsdl
===================================================================
--- branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1303/WEB-INF/wsdl/lastmodified.wsdl	2006-10-16 10:37:30 UTC (rev 1224)
+++ branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1303/WEB-INF/wsdl/lastmodified.wsdl	2006-10-16 10:40:10 UTC (rev 1225)
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<definitions name="LastMod" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+  targetNamespace="http://netid.msu.edu:8080/lastmod.pl" xmlns:tns="http://netid.msu.edu:8080/lastmod.pl" xmlns="http://schemas.xmlsoap.org/wsdl/"
+  xmlns:xsdl="http://netid.msu.edu:8080/lastmodified.wsdl">
+  
+  <types>
+    
+    <schema targetNamespace="http://netid.msu.edu:8080/lastmod.pl" xmlns="http://www.w3.org/2001/XMLSchema">
+      <element name="lastmod">
+        <complexType>
+          <sequence>
+            <element name="lastmodRequest" nillable="false" type="xsd:string" form="qualified"/>
+          </sequence>
+        </complexType>
+      </element>
+      
+      <element name="lastmodResponse">
+        <complexType>
+          <sequence>
+            <element name="TimeChanged" nillable="false" type="xsd:string" form="qualified"/>
+          </sequence>
+        </complexType>
+      </element>
+    </schema>
+  </types>
+  
+  <message name="lastmodInput">
+    <part element="tns:lastmod" name="parameters"/>
+  </message>
+  
+  <message name="lastmodOutput">
+    <part element="tns:lastmodResponse" name="result"/>
+  </message>
+  
+  <portType name="LastModPortType">
+    <operation name="lastmod">
+      <input message="tns:lastmodInput"/>
+      <output message="tns:lastmodOutput"/>
+    </operation>
+  </portType>
+  
+  <binding name="LastModBinding" type="tns:LastModPortType">
+    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+    <operation name="lastmod">
+      <soap:operation soapAction=""/>
+      <input>
+        <soap:body use="literal"/>
+      </input>
+      
+      <output>
+        <soap:body use="literal"/>
+      </output>
+    </operation>
+  </binding>
+  
+  <service name="LastMod">
+    <documentation> Gets the last password change time when fed a netid </documentation>
+    <port name="LastModPort" binding="tns:LastModBinding">
+      <soap:address location="http://netid.msu.edu:8080/lastmod.pl"/>
+    </port>
+  </service>
+  
+</definitions>
\ No newline at end of file


Property changes on: branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1303/WEB-INF/wsdl/lastmodified.wsdl
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1303/wstools-config.xml
===================================================================
--- branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1303/wstools-config.xml	2006-10-16 10:37:30 UTC (rev 1224)
+++ branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1303/wstools-config.xml	2006-10-16 10:40:10 UTC (rev 1225)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  wstools -config wstools-config.xml
+-->
+
+<configuration xmlns="http://www.jboss.org/jbossws-tools"
+   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+   xsi:schemaLocation="http://www.jboss.org/jbossws-tools
+   http://www.jboss.org/jbossws-tools/schema/jbossws-tool_1_0.xsd">
+
+  <global>
+    <package-namespace package="org.jboss.test.ws.jaxrpc.jbws1303" namespace="http://netid.msu.edu:8080/lastmod.pl"/>
+  </global>
+  
+  <wsdl-java location="resources/jaxrpc/jbws1303/WEB-INF/wsdl/lastmodified.wsdl" parameter-style="bare">
+    <mapping file="jaxrpc-mapping.xml" />
+  </wsdl-java>
+
+</configuration>


Property changes on: branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1303/wstools-config.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Deleted: branches/jbossws-1.0/src/test/resources/jaxrpc/jbws718/null
===================================================================
--- branches/jbossws-1.0/src/test/resources/jaxrpc/jbws718/null	2006-10-16 10:37:30 UTC (rev 1224)
+++ branches/jbossws-1.0/src/test/resources/jaxrpc/jbws718/null	2006-10-16 10:40:10 UTC (rev 1225)
@@ -1,51 +0,0 @@
-<?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.test.ws.jaxrpc.jbws718</package-type>
-  <namespaceURI>http://jboss.org/test/ws/jbws718</namespaceURI>
- </package-mapping>
- <java-xml-type-mapping>
-  <java-type>org.jboss.test.ws.jaxrpc.jbws718.PingMsg</java-type>
-  <anonymous-type-qname xmlns:typeNS='http://jboss.org/test/ws/jbws718'>typeNS:&gt;PingMsg</anonymous-type-qname>
-  <qname-scope>complexType</qname-scope>
-  <variable-mapping>
-   <java-variable-name>message</java-variable-name>
-   <xml-element-name>message</xml-element-name>
-  </variable-mapping>
- </java-xml-type-mapping>
- <java-xml-type-mapping>
-  <java-type>org.jboss.test.ws.jaxrpc.jbws718.PingMsgResponse</java-type>
-  <anonymous-type-qname xmlns:typeNS='http://jboss.org/test/ws/jbws718'>typeNS:&gt;PingMsgResponse</anonymous-type-qname>
-  <qname-scope>complexType</qname-scope>
- </java-xml-type-mapping>
- <service-interface-mapping>
-  <service-interface>org.jboss.test.ws.jaxrpc.jbws718.TestService_Service</service-interface>
-  <wsdl-service-name xmlns:serviceNS='http://jboss.org/test/ws/jbws718'>serviceNS:TestService</wsdl-service-name>
-  <port-mapping>
-   <port-name>TestServicePort</port-name>
-   <java-port-name>TestServicePort</java-port-name>
-  </port-mapping>
- </service-interface-mapping>
- <service-endpoint-interface-mapping>
-  <service-endpoint-interface>org.jboss.test.ws.jaxrpc.jbws718.TestService_PortType</service-endpoint-interface>
-  <wsdl-port-type xmlns:portTypeNS='http://jboss.org/test/ws/jbws718'>portTypeNS:TestService</wsdl-port-type>
-  <wsdl-binding xmlns:bindingNS='http://jboss.org/test/ws/jbws718'>bindingNS:TestServiceBinding</wsdl-binding>
-  <service-endpoint-method-mapping>
-   <java-method-name>ping</java-method-name>
-   <wsdl-operation>ping</wsdl-operation>
-   <method-param-parts-mapping>
-    <param-position>0</param-position>
-    <param-type>org.jboss.test.ws.jaxrpc.jbws718.PingMsg</param-type>
-    <wsdl-message-mapping>
-     <wsdl-message xmlns:wsdlMsgNS='http://jboss.org/test/ws/jbws718'>wsdlMsgNS:PingIn</wsdl-message>
-     <wsdl-message-part-name>parameters</wsdl-message-part-name>
-     <parameter-mode>INOUT</parameter-mode>
-    </wsdl-message-mapping>
-   </method-param-parts-mapping>
-   <wsdl-return-value-mapping>
-    <method-return-value>org.jboss.test.ws.jaxrpc.jbws718.PingMsgResponse</method-return-value>
-    <wsdl-message xmlns:wsdlMsgNS='http://jboss.org/test/ws/jbws718'>wsdlMsgNS:PingOut</wsdl-message>
-    <wsdl-message-part-name>parameters</wsdl-message-part-name>
-   </wsdl-return-value-mapping>
-  </service-endpoint-method-mapping>
- </service-endpoint-interface-mapping>
-</java-wsdl-mapping>
\ No newline at end of file




More information about the jbossws-commits mailing list