[jboss-svn-commits] JBossWS SVN: r1036 - branches/hbraun/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Mon Sep 25 10:24:13 EDT 2006


Author: heiko.braun at jboss.com
Date: 2006-09-25 10:24:10 -0400 (Mon, 25 Sep 2006)
New Revision: 1036

Added:
   branches/hbraun/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/TestServiceImpl.java
   branches/hbraun/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/TestService_Service.java
   branches/hbraun/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/XOPHandlerTestCase.java
   branches/hbraun/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/XOPTestCase.java
Log:
separate MTOM test cases from doc/lit and rpc/lit

Added: branches/hbraun/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/TestServiceImpl.java
===================================================================
--- branches/hbraun/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/TestServiceImpl.java	2006-09-25 14:23:36 UTC (rev 1035)
+++ branches/hbraun/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/TestServiceImpl.java	2006-09-25 14:24:10 UTC (rev 1036)
@@ -0,0 +1,44 @@
+package org.jboss.test.ws.jaxrpc.xop.rpclit;
+
+import org.jboss.ws.soap.MessageContextAssociation;
+import org.jboss.ws.common.CommonMessageContext;
+import org.jboss.ws.jaxrpc.StubExt;
+import org.jboss.test.ws.jaxrpc.xop.shared.PingMsg;
+import org.jboss.test.ws.jaxrpc.xop.shared.PingMsgResponse;
+
+import java.rmi.RemoteException;
+import java.util.StringTokenizer;
+
+/**
+ * @author Heiko Braun, <heiko at openj.net>
+ * @since 11-Apr-2006
+ */
+public class TestServiceImpl implements TestService_PortType {
+
+   public PingMsgResponse pingComplex(PingMsg pingMsg) throws RemoteException {
+
+      String message = pingMsg.getMessage();      
+      toggleXOP(message);
+
+      return new PingMsgResponse(pingMsg.getXopContent());
+   }
+
+   public byte[] pingSimple(String parameters, byte[] xopContent) throws RemoteException { 
+      toggleXOP(parameters);
+      return xopContent;
+   }
+
+   private void toggleXOP(String message) {
+      StringTokenizer tok = new StringTokenizer(message, "|");
+      String requestOptimized = tok.nextToken();
+      String responseOptimized = tok.nextToken();
+      System.out.println(requestOptimized+"|"+responseOptimized);
+
+      if(responseOptimized.equals("0"))
+      {
+         CommonMessageContext ctx = MessageContextAssociation.peekMessageContext();
+         ctx.setProperty(StubExt.PROPERTY_MTOM_ENABLED, Boolean.FALSE);
+      }
+   }
+
+}


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

Added: branches/hbraun/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/TestService_Service.java
===================================================================
--- branches/hbraun/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/TestService_Service.java	2006-09-25 14:23:36 UTC (rev 1035)
+++ branches/hbraun/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/TestService_Service.java	2006-09-25 14:24:10 UTC (rev 1036)
@@ -0,0 +1,17 @@
+/*  
+* JBoss, the OpenSource EJB server
+* Distributable under LGPL license. See terms of license at gnu.org.
+*/
+
+//Auto Generated by jbossws - Please do not edit!!!
+
+package org.jboss.test.ws.jaxrpc.xop.rpclit;
+
+
+import javax.xml.rpc.ServiceException;
+
+
+public interface  TestService_Service extends  javax.xml.rpc.Service
+{
+   public org.jboss.test.ws.jaxrpc.xop.rpclit.TestService_PortType getTestServicePort() throws ServiceException;
+}


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

Added: branches/hbraun/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/XOPHandlerTestCase.java
===================================================================
--- branches/hbraun/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/XOPHandlerTestCase.java	2006-09-25 14:23:36 UTC (rev 1035)
+++ branches/hbraun/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/XOPHandlerTestCase.java	2006-09-25 14:24:10 UTC (rev 1036)
@@ -0,0 +1,63 @@
+/*
+* 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.xop.rpclit;
+
+import junit.framework.Test;
+import org.jboss.test.ws.JBossWSTestSetup;
+import org.jboss.test.ws.JBossWSTest;
+import org.jboss.test.ws.jaxrpc.xop.XOPTestSupport;
+import org.jboss.test.ws.jaxrpc.xop.shared.PingMsg;
+import org.jboss.test.ws.jaxrpc.xop.shared.PingMsgResponse;
+import org.jboss.ws.utils.IOUtils;
+import org.jboss.ws.jaxrpc.StubExt;
+
+import javax.naming.InitialContext;
+import javax.xml.rpc.Service;
+import javax.xml.rpc.Stub;
+import javax.activation.DataHandler;
+import java.io.File;
+
+/**
+ * @author Heiko Braun <heiko.braun at jboss.com>
+ * @version $Id$
+ * @since Sep 22, 2006
+ */
+public class XOPHandlerTestCase extends XOPBase  {   
+
+   public static Test suite()
+   {
+      return JBossWSTestSetup.newTestSetup(XOPHandlerTestCase.class, "jaxrpc-xop-rpclit_handler.war, jaxrpc-xop-rpclit_handler-client.jar");
+   }
+
+   protected void setUp() throws Exception
+   {
+      super.setUp();
+      if (port == null)
+      {
+         InitialContext iniCtx = getInitialContext();
+         Service service = (Service)iniCtx.lookup("java:comp/env/service/XOPHandlerTestCaseRPC");
+         port = (TestService_PortType)service.getPort(TestService_PortType.class);
+      }
+
+      ((Stub)port)._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, "http://localhost:8081/jaxrpc-xop-rpclit_handler");
+   }
+}


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

Added: branches/hbraun/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/XOPTestCase.java
===================================================================
--- branches/hbraun/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/XOPTestCase.java	2006-09-25 14:23:36 UTC (rev 1035)
+++ branches/hbraun/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/XOPTestCase.java	2006-09-25 14:24:10 UTC (rev 1036)
@@ -0,0 +1,66 @@
+/*
+ * 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.xop.rpclit;
+
+// $Id$
+
+import junit.framework.Test;
+import org.jboss.test.ws.JBossWSTest;
+import org.jboss.test.ws.JBossWSTestSetup;
+import org.jboss.test.ws.jaxrpc.xop.XOPTestSupport;
+import org.jboss.test.ws.jaxrpc.xop.shared.PingMsg;
+import org.jboss.test.ws.jaxrpc.xop.shared.PingMsgResponse;
+import org.jboss.ws.jaxrpc.StubExt;
+import org.jboss.ws.utils.IOUtils;
+
+import javax.activation.DataHandler;
+import javax.naming.InitialContext;
+import javax.xml.rpc.Service;
+import javax.xml.rpc.Stub;
+import java.io.File;
+
+/**
+ *
+ * @author Heiko.Braun at jboss.org
+ * @since 11-Nov-2005
+ */
+public class XOPTestCase extends XOPBase {
+
+   public static Test suite()
+   {
+      return JBossWSTestSetup.newTestSetup(XOPTestCase.class, "jaxrpc-xop-rpclit.war, jaxrpc-xop-rpclit-client.jar");
+   }
+
+   protected void setUp() throws Exception
+   {
+      super.setUp();
+      if (port == null)
+      {
+         InitialContext iniCtx = getInitialContext();
+         Service service = (Service)iniCtx.lookup("java:comp/env/service/XOPTestCaseRPC");
+         port = (TestService_PortType)service.getPort(TestService_PortType.class);
+      }
+
+      ((Stub)port)._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, "http://localhost:8081/jaxrpc-xop-rpclit");
+   }
+
+}


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




More information about the jboss-svn-commits mailing list