Author: dasarath
Date: Wed Nov  2 22:01:59 2005
New Revision: 330476

URL: http://svn.apache.org/viewcvs?rev=330476&view=rev
Log: (empty)

Added:
    webservices/kandula/branches/Kandula_1/src/samples/interop/
    
webservices/kandula/branches/Kandula_1/src/samples/interop/TEST-InteropPortTypeRPCServiceTestCase.txt
    webservices/kandula/branches/Kandula_1/src/samples/interop/build.xml
    
webservices/kandula/branches/Kandula_1/src/samples/interop/client-config.wsdd
    webservices/kandula/branches/Kandula_1/src/samples/interop/deploy.wsdd
    webservices/kandula/branches/Kandula_1/src/samples/interop/interop.wsdl
    webservices/kandula/branches/Kandula_1/src/samples/interop/src/
    
webservices/kandula/branches/Kandula_1/src/samples/interop/src/InteropPortTypeRPCServiceTestCase.java
    
webservices/kandula/branches/Kandula_1/src/samples/interop/src/InteropServiceSoapBindingImpl.java
    webservices/kandula/branches/Kandula_1/src/samples/interop/undeploy.wsdd

Added: 
webservices/kandula/branches/Kandula_1/src/samples/interop/TEST-InteropPortTypeRPCServiceTestCase.txt
URL: 
http://svn.apache.org/viewcvs/webservices/kandula/branches/Kandula_1/src/samples/interop/TEST-InteropPortTypeRPCServiceTestCase.txt?rev=330476&view=auto
==============================================================================
--- 
webservices/kandula/branches/Kandula_1/src/samples/interop/TEST-InteropPortTypeRPCServiceTestCase.txt
 (added)
+++ 
webservices/kandula/branches/Kandula_1/src/samples/interop/TEST-InteropPortTypeRPCServiceTestCase.txt
 Wed Nov  2 22:01:59 2005
@@ -0,0 +1,5 @@
+Testsuite: InteropPortTypeRPCServiceTestCase

+Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 3.344 sec

+

+Testcase: testInteropServiceCommitUnsuccessful took 2.86 sec

+Testcase: testInteropServiceRollback took 0.484 sec


Added: webservices/kandula/branches/Kandula_1/src/samples/interop/build.xml
URL: 
http://svn.apache.org/viewcvs/webservices/kandula/branches/Kandula_1/src/samples/interop/build.xml?rev=330476&view=auto
==============================================================================
--- webservices/kandula/branches/Kandula_1/src/samples/interop/build.xml (added)
+++ webservices/kandula/branches/Kandula_1/src/samples/interop/build.xml Wed 
Nov  2 22:01:59 2005
@@ -0,0 +1,80 @@
+<?xml version="1.0"?>

+<project name="kandula"

+        default="compile"

+        basedir=".">

+

+        <property name="src.dir" value="src" />         

+        <property name="build.dir" value="build" />

+        <property name="home.dir" value="../../.." />

+        <property name="samples.dir" value="${home.dir}/src/samples" />

+        

+        <property file="${home.dir}/build.properties" />                

+        

+        <path id="base.classpath">

+               <fileset dir="${home.dir}/target/lib" >

+                       <include name="**/*.jar" />

+               </fileset>

+               <fileset dir="${home.dir}/target" >

+                       <include name="**/*.jar" />

+               </fileset>              

+               <pathelement location="${samples.dir}/common/build"/>           

+        </path>

+        

+        <taskdef resource="axis-tasks.properties"  
classpathref="base.classpath" />

+        

+        <target name="compile" depends="wsdl2java" >

+               <ant dir="${samples.dir}/common"/>

+               <javac srcdir="${src.dir}" destdir="${build.dir}">

+                       <classpath refid="base.classpath" />

+               </javac>

+        </target>

+        

+        <target name="clean" >

+               <delete>

+                       <fileset dir="${src.dir}" excludes="**/*Impl.java, 
**/*TestCase.java" />

+               </delete>

+               <delete dir="${build.dir}" />   

+        </target> 

+

+        <target name="init" >

+               <mkdir dir="${build.dir}" />

+        </target>       

+

+        

+        <target name="wsdl2java" depends="init">

+                <axis-wsdl2java

+                       output="${src.dir}"

+                       verbose="true"

+                       serverside="true"

+                       url="${basedir}/interop.wsdl" >

+                       <mapping namespace="urn:test" package="" />

+                </axis-wsdl2java>

+                <move todir="." flatten="true" >

+                       <fileset dir="${src.dir}" includes="**/*.wsdd" />

+                </move>

+       </target>

+

+

+       <target name="dist" depends="compile">

+               <jar jarfile="${build.dir}/interop.jar">

+                       <fileset dir="${samples.dir}/common/build">

+                               <include name="**/*.class" />

+                       </fileset>              

+                       <fileset dir="${build.dir}">

+                               <include name="**/*.class" />

+                       </fileset>

+               </jar>

+       </target>

+       

+       <target name="test" >

+               <junit printsummary="withOutAndErr" >

+                       <formatter type="plain"/>

+                       <classpath>                             

+                               <path refid="base.classpath" />

+                               <fileset dir="${basedir}/build" 
includes="*.jar" />

+                               <pathelement location="${ws-tx.dir}/conf" />

+                       </classpath>

+                       <test name="InteropPortTypeRPCServiceTestCase" />

+               </junit>

+        </target>

+</project>
\ No newline at end of file

Added: 
webservices/kandula/branches/Kandula_1/src/samples/interop/client-config.wsdd
URL: 
http://svn.apache.org/viewcvs/webservices/kandula/branches/Kandula_1/src/samples/interop/client-config.wsdd?rev=330476&view=auto
==============================================================================
--- 
webservices/kandula/branches/Kandula_1/src/samples/interop/client-config.wsdd 
(added)
+++ 
webservices/kandula/branches/Kandula_1/src/samples/interop/client-config.wsdd 
Wed Nov  2 22:01:59 2005
@@ -0,0 +1,80 @@
+<!-- a barebone jboss.net/axis client configuration which includes some basic 
typemappings related to jboss -->

+

+<deployment name="defaultClientConfig"

+            xmlns="http://xml.apache.org/axis/wsdd/";

+            xmlns:java="http://xml.apache.org/axis/wsdd/providers/java";>

+

+  <globalConfiguration>

+       <parameter name="sendMultiRefs" value="false"/>

+       <parameter name="disablePrettyXML" value="true"/>

+        

+        <requestFlow>

+               <handler 
type="java:org.apache.axis.message.addressing.handler.AddressingHandler" />

+               <!-- use this handler for j2ee clients, e.g. inside Catalina -->

+               

+                       <handler 
type="java:org.apache.ws.transaction.participant.j2ee.handler.TransactionHandler"/>

+               -->

+

+

+               <!-- use this handler for standalone clients -->

+               <handler 
type="java:org.apache.ws.transaction.participant.standalone.handler.TransactionHandler"/>

+

+        </requestFlow>

+        <responseFlow>

+        

+               <handler 
type="java:org.apache.axis.message.addressing.handler.AddressingHandler" />

+               

+        </responseFlow>

+  </globalConfiguration>

+

+  <transport name="http" 
pivot="java:org.apache.axis.transport.http.HTTPSender">

+       <requestFlow>           

+       </requestFlow>

+       <responseFlow>          

+       </responseFlow> 

+  </transport>

+

+ <transport name="local" 
pivot="java:org.apache.axis.transport.local.LocalSender"/>

+ <transport name="java" 
pivot="java:org.apache.axis.transport.java.JavaSender"/>

+

+<typeMapping

+       xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing";

+      deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory" 

+      encodingStyle="" 

+      qname="wsa:EndpointReference" 

+      serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"

+      type="java:org.apache.axis.message.addressing.EndpointReferenceType"/>

+

+ <typeMapping

+       xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing"; 

+      deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory" 

+      encodingStyle="" 

+      qname="wsa:ReferencePropertiesType" 

+      serializer="org.apache.axis.encoding.ser.BeanSerializerFactory" 

+      type="java:org.apache.axis.message.addressing.ReferencePropertiesType"/>

+

+ <typeMapping 

+       xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing";

+      deserializer="org.apache.axis.encoding.ser.SimpleDeserializerFactory" 

+      encodingStyle="" 

+      qname="wsa:Address" 

+      serializer="org.apache.axis.encoding.ser.SimpleSerializerFactory" 

+      type="java:org.apache.axis.message.addressing.Address"/>

+

+ <typeMapping 

+       xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing";

+      deserializer="org.apache.axis.encoding.ser.SimpleDeserializerFactory" 

+      encodingStyle="" 

+      qname="wsa:PortType" 

+      serializer="org.apache.axis.encoding.ser.SimpleSerializerFactory" 

+      type="java:org.apache.axis.message.addressing.PortType" />

+

+ <typeMapping 

+       xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing";

+      deserializer="org.apache.axis.encoding.ser.SimpleDeserializerFactory" 

+      encodingStyle="" 

+      qname="wsa:ServiceNameType" 

+      serializer="org.apache.axis.encoding.ser.SimpleSerializerFactory" 

+      type="java:org.apache.axis.message.addressing.ServiceNameType" />

+

+</deployment>


Added: webservices/kandula/branches/Kandula_1/src/samples/interop/deploy.wsdd
URL: 
http://svn.apache.org/viewcvs/webservices/kandula/branches/Kandula_1/src/samples/interop/deploy.wsdd?rev=330476&view=auto
==============================================================================
--- webservices/kandula/branches/Kandula_1/src/samples/interop/deploy.wsdd 
(added)
+++ webservices/kandula/branches/Kandula_1/src/samples/interop/deploy.wsdd Wed 
Nov  2 22:01:59 2005
@@ -0,0 +1,29 @@
+<!-- Use this file to deploy some handlers/chains and services      -->

+<!-- Two ways to do this:                                           -->

+<!--   java org.apache.axis.client.AdminClient deploy.wsdd          -->

+<!--      after the axis server is running                          -->

+<!-- or                                                             -->

+<!--   java org.apache.axis.utils.Admin client|server deploy.wsdd   -->

+<!--      from the same directory that the Axis engine runs         -->

+

+<deployment

+    xmlns="http://xml.apache.org/axis/wsdd/";

+    xmlns:java="http://xml.apache.org/axis/wsdd/providers/java";>

+

+  <!-- Services from InteropPortTypeRPCService WSDL service -->

+

+  <service name="InteropService" provider="java:RPC" style="rpc" use="encoded">

+      <parameter name="wsdlTargetNamespace" value="urn:test"/>

+      <parameter name="wsdlServiceElement" value="InteropPortTypeRPCService"/>

+      <parameter name="wsdlServicePort" value="InteropService"/>

+      <parameter name="className" value="InteropServiceSoapBindingImpl"/>

+      <parameter name="wsdlPortType" value="InteropPortTypeRPC"/>

+      <parameter name="typeMappingVersion" value="1.2"/>

+      <operation name="commit" qname="operNS:commit" xmlns:operNS="urn:test" 
soapAction="urn:test#Commit" >

+      </operation>

+      <operation name="rollback" qname="operNS:rollback" 
xmlns:operNS="urn:test" soapAction="urn:test#Rollback" >

+      </operation>

+      <parameter name="allowedMethods" value="commit rollback"/>

+

+  </service>

+</deployment>


Added: webservices/kandula/branches/Kandula_1/src/samples/interop/interop.wsdl
URL: 
http://svn.apache.org/viewcvs/webservices/kandula/branches/Kandula_1/src/samples/interop/interop.wsdl?rev=330476&view=auto
==============================================================================
--- webservices/kandula/branches/Kandula_1/src/samples/interop/interop.wsdl 
(added)
+++ webservices/kandula/branches/Kandula_1/src/samples/interop/interop.wsdl Wed 
Nov  2 22:01:59 2005
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8"?>

+<wsdl:definitions targetNamespace="urn:test" 
xmlns:apachesoap="http://xml.apache.org/xml-soap"; xmlns:impl="urn:test" 
xmlns:intf="urn:test" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"; 
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; 
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema";>

+<!--WSDL created by Apache Axis version: 1.2beta

+Built on Jun 30, 2004 (07:14:17 GMT+06:00)-->

+

+   <wsdl:message name="CommitResponse">

+

+   </wsdl:message>

+

+   <wsdl:message name="RollbackRequest">

+

+   </wsdl:message>

+

+   <wsdl:message name="CommitRequest">

+

+   </wsdl:message>

+

+   <wsdl:message name="RollbackResponse">

+

+   </wsdl:message>

+

+   <wsdl:portType name="InteropPortTypeRPC">

+

+      <wsdl:operation name="commit">

+

+         <wsdl:input message="impl:CommitRequest" name="CommitRequest"/>

+

+         <wsdl:output message="impl:CommitResponse" name="CommitResponse"/>

+

+      </wsdl:operation>

+

+      <wsdl:operation name="rollback">

+

+         <wsdl:input message="impl:RollbackRequest" name="RollbackRequest"/>

+

+         <wsdl:output message="impl:RollbackResponse" name="RollbackResponse"/>

+

+      </wsdl:operation>

+

+   </wsdl:portType>

+

+   <wsdl:binding name="InteropServiceSoapBinding" 
type="impl:InteropPortTypeRPC">

+

+      <wsdlsoap:binding style="rpc" 
transport="http://schemas.xmlsoap.org/soap/http"/>

+

+      <wsdl:operation name="commit">

+

+         <wsdlsoap:operation soapAction="urn:test#Commit"/>

+

+         <wsdl:input name="CommitRequest">

+

+            <wsdlsoap:body 
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; namespace="urn:test" 
use="encoded"/>

+

+         </wsdl:input>

+

+         <wsdl:output name="CommitResponse">

+

+            <wsdlsoap:body 
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; namespace="urn:test" 
use="encoded"/>

+

+         </wsdl:output>

+

+      </wsdl:operation>

+

+      <wsdl:operation name="rollback">

+

+         <wsdlsoap:operation soapAction="urn:test#Rollback"/>

+

+         <wsdl:input name="RollbackRequest">

+

+            <wsdlsoap:body 
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; namespace="urn:test" 
use="encoded"/>

+

+         </wsdl:input>

+

+         <wsdl:output name="RollbackResponse">

+

+            <wsdlsoap:body 
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; namespace="urn:test" 
use="encoded"/>

+

+         </wsdl:output>

+

+      </wsdl:operation>

+

+   </wsdl:binding>

+

+   <wsdl:service name="InteropPortTypeRPCService">

+

+      <wsdl:port binding="impl:InteropServiceSoapBinding" 
name="InteropService">

+

+         <wsdlsoap:address 
location="http://localhost:8081/axis/services/InteropService"/>

+

+      </wsdl:port>

+

+   </wsdl:service>

+

+</wsdl:definitions>


Added: 
webservices/kandula/branches/Kandula_1/src/samples/interop/src/InteropPortTypeRPCServiceTestCase.java
URL: 
http://svn.apache.org/viewcvs/webservices/kandula/branches/Kandula_1/src/samples/interop/src/InteropPortTypeRPCServiceTestCase.java?rev=330476&view=auto
==============================================================================
--- 
webservices/kandula/branches/Kandula_1/src/samples/interop/src/InteropPortTypeRPCServiceTestCase.java
 (added)
+++ 
webservices/kandula/branches/Kandula_1/src/samples/interop/src/InteropPortTypeRPCServiceTestCase.java
 Wed Nov  2 22:01:59 2005
@@ -0,0 +1,40 @@
+/*

+ * Copyright  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.

+ *

+ */

+import org.apache.ws.transaction.participant.standalone.TransactionManager;

+

+public class InteropPortTypeRPCServiceTestCase extends 
junit.framework.TestCase {

+       public InteropPortTypeRPCServiceTestCase(java.lang.String name) {

+               super(name);

+       }

+       public void testInteropServiceCommitUnsuccessful() throws Exception {

+               TransactionManager tm= TransactionManager.getInstance();

+               InteropPortTypeRPC interop= new 
InteropPortTypeRPCServiceLocator().getInteropService();

+               tm.begin();

+               interop.commit();

+               interop.rollback();

+               tm.commit();

+       }

+

+       public void testInteropServiceRollback() throws Exception {

+               TransactionManager tm= TransactionManager.getInstance();

+               InteropPortTypeRPC interop= new 
InteropPortTypeRPCServiceLocator().getInteropService();

+               tm.begin();

+               interop.commit();

+               interop.commit();

+               tm.rollback();

+       }       

+}


Added: 
webservices/kandula/branches/Kandula_1/src/samples/interop/src/InteropServiceSoapBindingImpl.java
URL: 
http://svn.apache.org/viewcvs/webservices/kandula/branches/Kandula_1/src/samples/interop/src/InteropServiceSoapBindingImpl.java?rev=330476&view=auto
==============================================================================
--- 
webservices/kandula/branches/Kandula_1/src/samples/interop/src/InteropServiceSoapBindingImpl.java
 (added)
+++ 
webservices/kandula/branches/Kandula_1/src/samples/interop/src/InteropServiceSoapBindingImpl.java
 Wed Nov  2 22:01:59 2005
@@ -0,0 +1,80 @@
+/*

+ * Copyright  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.

+ *

+ */

+import java.rmi.RemoteException;

+

+import javax.transaction.Status;

+import javax.transaction.Transaction;

+import javax.transaction.TransactionManager;

+

+import org.apache.ws.transaction.participant.j2ee.TransactionManagerGlue;

+import 
org.apache.ws.transaction.participant.j2ee.TransactionManagerGlueFactory;

+

+public class InteropServiceSoapBindingImpl implements InteropPortTypeRPC {

+       TransactionManagerGlue tmGlue= null;

+       TransactionManager tm= null;

+

+       public InteropServiceSoapBindingImpl() {

+               tmGlue= 
TransactionManagerGlueFactory.getInstance().getTransactionManagerGlue();

+               tm= tmGlue.getTransactionManager();

+       }

+

+       public void commit() throws java.rmi.RemoteException {

+               try {

+                       Transaction tx= tm.getTransaction();

+                       System.out.println(

+                               "[InteropServiceSoapBindingImpl] commit() " + 
TxStatus.getStatusName(tm.getStatus()));

+                       if (tm.getStatus() == Status.STATUS_ACTIVE) {

+                               tx.enlistResource(new DummyXAResource(true, 
false));

+                               System.out.println(

+                                       "[InteropServiceSoapBindingImpl] "

+                                               + tx.toString()

+                                               + " tx.hashCode= "

+                                               + tx.hashCode());

+                       }

+               }

+               catch (Exception e) {

+                       e.printStackTrace();

+                       if (e instanceof RemoteException)

+                               throw (RemoteException)e;

+                       else

+                               throw new RemoteException(e.toString());

+               }

+       }

+

+       public void rollback() throws java.rmi.RemoteException {

+               try {

+                       Transaction tx= tm.getTransaction();

+                       System.out.println(

+                               "[InteropServiceSoapBindingImpl] rollback() " + 
TxStatus.getStatusName(tm.getStatus()));

+                       if (tm.getStatus() == Status.STATUS_ACTIVE) {

+                               tx.enlistResource(new DummyXAResource(false, 
false));

+                               System.out.println(

+                                       "[InteropServiceSoapBindingImpl] "

+                                               + tx.toString()

+                                               + " tx.hashCode= "

+                                               + tx.hashCode());

+                       }

+               }

+               catch (Exception e) {

+                       e.printStackTrace();

+                       if (e instanceof RemoteException)

+                               throw (RemoteException)e;

+                       else

+                               throw new RemoteException(e.toString());

+               }

+       }

+}


Added: webservices/kandula/branches/Kandula_1/src/samples/interop/undeploy.wsdd
URL: 
http://svn.apache.org/viewcvs/webservices/kandula/branches/Kandula_1/src/samples/interop/undeploy.wsdd?rev=330476&view=auto
==============================================================================
--- webservices/kandula/branches/Kandula_1/src/samples/interop/undeploy.wsdd 
(added)
+++ webservices/kandula/branches/Kandula_1/src/samples/interop/undeploy.wsdd 
Wed Nov  2 22:01:59 2005
@@ -0,0 +1,15 @@
+<!-- Use this file to undeploy some handlers/chains and services    -->

+<!-- Two ways to do this:                                           -->

+<!--   java org.apache.axis.client.AdminClient undeploy.wsdd        -->

+<!--      after the axis server is running                          -->

+<!-- or                                                             -->

+<!--   java org.apache.axis.utils.Admin client|server undeploy.wsdd -->

+<!--      from the same directory that the Axis engine runs         -->

+

+<undeployment

+    xmlns="http://xml.apache.org/axis/wsdd/";>

+

+  <!-- Services from InteropPortTypeRPCService WSDL service -->

+

+  <service name="InteropService"/>

+</undeployment>




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to