jaliya      2005/05/18 21:20:25

  Modified:    sandesha/interop build.xml server-config.wsdd
               sandesha/interop/org/apache/sandesha/samples/interop/testclient
                        InteropBean.java InteropStub.java
                        RMClientProvider.java
               sandesha/interop/webapp/jsp interop.jsp
  Log:
  Modified the addressing header addition from the client. Now, the client can 
add any addressing headers and they will be used to send messages
  
  Revision  Changes    Path
  1.13      +105 -98   ws-fx/sandesha/interop/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/ws-fx/sandesha/interop/build.xml,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- build.xml 18 May 2005 12:57:54 -0000      1.12
  +++ build.xml 19 May 2005 04:20:24 -0000      1.13
  @@ -84,20 +84,20 @@
           <property name="build.javadoc" value="${build.doc.html}/api"/>
           <property name="build.junit.xml" value="${build.doc.xml}/junit"/>
           <property name="build.junit.html" value="${build.doc.html}/junit"/>
  -     
  -     
  -     <property environment="env1" />
  -     
  -     <!-- 
  -
  -         for the time being following path id uses the libs in the sandesha
  -         lib directory only This is done to test if we really don't need
  -         any axis libs. After this is done we can include the
  -         java.class.path and leave the sandesha/lib empty. This requires that
  -         the CLASSPATH includes all required packages (see above
   
  -     ALEK: thos does nto seems to be true as 
start-functional-test-http-server depends on AXIS.jar (what version?)
  -         -->
  +
  +        <property environment="env1"/>
  +
  +        <!--
  +
  +for the time being following path id uses the libs in the sandesha
  +lib directory only This is done to test if we really don't need
  +any axis libs. After this is done we can include the
  +java.class.path and leave the sandesha/lib empty. This requires that
  +the CLASSPATH includes all required packages (see above
  +
  +    ALEK: thos does nto seems to be true as 
start-functional-test-http-server depends on AXIS.jar (what version?)
  +        -->
           <path id="classpath.libraries" description="3rd party libs">
               <fileset dir="${dir.libs}">
                   <include name="**/*.jar"/>
  @@ -122,8 +122,7 @@
           </path>
   
           <taskdef resource="axis-tasks.properties" 
classpathref="classpath.library"/>
  -        <taskdef name="runaxisfunctionaltests" 
classname="org.apache.axis.tools.ant.axis.RunAxisFunctionalTestsTask"
  -            loaderref="axis">
  +        <taskdef name="runaxisfunctionaltests" 
classname="org.apache.axis.tools.ant.axis.RunAxisFunctionalTestsTask" 
loaderref="axis">
               <classpath refid="classpath.library"/>
           </taskdef>
         
  @@ -191,20 +190,16 @@
           <echo message="                                                      
             "/>
       </target>
   
  -    <target name="clean" depends="init"
  -        description="Clean up all temporary build files">
  +    <target name="clean" depends="init" description="Clean up all temporary 
build files">
           <delete dir="${build.dir}"/>
           <delete>
               <fileset dir="." includes="before*.xml"/>
               <fileset dir="." includes="after*.xml"/>
               <fileset dir="." includes="signed*.xml"/>
  -            <fileset dir="." includes="server*.wsdd"/>
  -            <fileset dir="." includes="client*.wsdd"/>
           </delete>
       </target>
   
  -    <target name="prepare" depends="init"
  -        description="This target generates a first build directory and 
checks for some libraries">
  +    <target name="prepare" depends="init" description="This target generates 
a first build directory and checks for some libraries">
           <tstamp/>
           <mkdir dir="${build.dir}"/>
           <mkdir dir="${build.dir}/test-reports"/>
  @@ -242,7 +237,7 @@
           <!-- create directories -->
           <mkdir dir="${build.classes}"/>
       </target>
  -     
  +
       <target name="compile" depends="compile.library" description="compile 
everything"/>
   
   
  @@ -262,26 +257,26 @@
               <exclude name="**/BouncyCastle.java" unless="bc.present"/>
           </javac>
           <!-- Copy Property files -->
  -     
  +
           <copy todir="${build.classes}">
   
  -             <fileset dir="${dir.config}">
  -                <include name="interop-properties.properties" />
  -                <include name="client-config.wsdd"/>
  +            <fileset dir="${dir.interop}">
  +                <include name="sandesha-interop.properties"/>
                   <include name="server-config.wsdd"/>
  -                     <include name="sandesha.properties" />
  -                     <include name="log4j.properties" />
  -                     <include name="WSRMPolicy.xml" />
  -                     <include name="commons-logging.properties" />
  -             </fileset>
  -
  -
  +            </fileset>
  +            <fileset dir="${dir.config}">
  +                <include name="client-config.wsdd"/>
  +                <include name="sandesha.properties"/>
  +                <include name="log4j.properties"/>
  +                <include name="WSRMPolicy.xml"/>
  +                <include name="commons-logging.properties"/>
  +                 <include name="sandesha.log"/>
  +            </fileset>
           </copy>
       </target>
   
   
  -    <target name="compile.interop"
  -        depends="compile.library,interop_prepare">
  +    <target name="compile.interop" depends="compile.library,interop_prepare">
           <javac srcdir="${dir.interop}" destdir="${build.interop}" debug="on">
               <classpath refid="classpath.library"/>
           </javac>
  @@ -300,8 +295,7 @@
       <!-- Following targets were added to run the test   -->
       <!-- Added on 01-03-2005-->
   
  -    <target name="interop_prepare" depends="init"
  -        description="This target creats the interop-classses directory">
  +    <target name="interop_prepare" depends="init" description="This target 
creats the interop-classses directory">
           <tstamp/>
           <mkdir dir="${build.dir}/interop-classes"/>
       </target>
  @@ -378,74 +372,87 @@
       <target name="echo_async_ack" 
depends="run_interop_echo_string_async_ack,shutdown_server"> </target>
   
   
  -     <target name="prepare-dist">
  -             <mkdir dir="${dir.dist}" />
  -     </target>
  -     
  -     <target name="prepare-jar" depends="compile.library,prepare-dist" 
description="prepares for creating jar">
  -
  -     <property name="sandesha.jar.name" value="SandeshaInterop.jar" />
  -             <property name="dir.dist.jar" value="${dir.dist}/jar" />
  -             <property name="sandesha.jar" 
value="${dir.dist.jar}/${sandesha.jar.name}" />
  -        <property name="axishome" 
value="${env1.CATALINA_HOME}/webapps/axis/WEB-INF/lib" />
  -             <mkdir dir="${dir.dist.jar}" />
  -                     
  -     </target>
  -     
  -     <target name="jar" depends="prepare-jar" description="creates the 
sandesha jar">
  -             <jar basedir="${build.classes}" destfile="${sandesha.jar}" />
  -     
  -     </target>
  -             
  -     <target name="prepare-war" depends="jar,compile.interop" 
description="prepares for creating war">
  -       
  +    <target name="prepare-dist">
  +        <mkdir dir="${dir.dist}"/>
  +    </target>
  +
  +    <target name="prepare-jar" depends="compile.library,prepare-dist" 
description="prepares for creating jar">
  +
  +        <property name="sandesha.jar.name" value="SandeshaInterop.jar"/>
  +        <property name="dir.dist.jar" value="${dir.dist}/jar"/>
  +        <property name="sandesha.jar" 
value="${dir.dist.jar}/${sandesha.jar.name}"/>
  +        <property name="axishome" 
value="${env1.CATALINA_HOME}/webapps/axis/WEB-INF/lib"/>
  +        <mkdir dir="${dir.dist.jar}"/>
  +
  +        <copy todir="${build.classes}">
  +
  +            <fileset dir="${dir.config}">
  +                <include name="client-config.wsdd"/>
  +                <include name="sandesha.properties"/>
  +                <include name="log4j.properties"/>
  +                <include name="WSRMPolicy.xml"/>
  +                <include name="commons-logging.properties"/>
  +                 <include name="sandesha.log"/>
  +            </fileset>
  +        </copy>
  +        <copy todir="${build.classes}">
  +               <fileset dir="${dir.interop}">
  +                <include name="sandesha-interop.properties"/>
  +                <include name="server-config.wsdd"/>
  +            </fileset>
  +        </copy>
  +
  +    </target>
  +
  +    <target name="jar" depends="prepare-jar" description="creates the 
sandesha jar">
  +         <jar basedir="${build.classes}" destfile="${sandesha.jar}"/>
  +
  +    </target>
  +
  +    <target name="prepare-war" depends="jar" description="prepares for 
creating war">
           <property name="interop.prop.file.name" 
value="sandesha-interop.properties"/>
  -        <property name="sandesha.war.name" value="sandesha-interop.war" />
  -             <property name="webxml" value="${dir.interop}/webapp/web.xml" />
  -             <property name="dir.dist.war" value="${dir.dist}/war" />
  -             <property name="sandesha.war" 
value="${dir.dist.war}/${sandesha.war.name}" />
  -             <property name="webapps" value="${env1.CATALINA_HOME}/webapps" 
/>
  -             <mkdir dir="${dir.dist.war}" />
  -
  -<!--         <copy todir="${build.interop}">-->
  -<!--           <fileset dir="${dir.interop}" 
includes="sandesha-interop.properties"/>-->
  -<!--        </copy>-->
  +        <property name="sandesha.war.name" value="sandesha-interop.war"/>
  +        <property name="webxml" value="${dir.interop}/webapp/web.xml"/>
  +        <property name="dir.dist.war" value="${dir.dist}/war"/>
  +        <property name="sandesha.war" 
value="${dir.dist.war}/${sandesha.war.name}"/>
  +        <property name="webapps" value="${env1.CATALINA_HOME}/webapps"/>
  +        <mkdir dir="${dir.dist.war}"/>
   
  +        <!--         <copy todir="${build.interop}">-->
  +        <!--           <fileset dir="${dir.interop}" 
includes="sandesha-interop.properties"/>-->
  +        <!--        </copy>-->
   
   
  -     </target>
  -     
  -     <target name="create.war" depends="prepare-war" description="creates 
the sandesha war">
  -
  -             <war destfile="${sandesha.war}" webxml="${webxml}">
  -                     <fileset dir="${dir.interop}/webapp/jsp" />
  -            <filename name="{$interop.prop.file.name}"/>                
  -                     <classes dir="${build.interop}" />
  -                     <lib dir="${dir.libs}" />
  -                     <lib file="${sandesha.jar}" />
  -             </war>
  -
  -     </target>
  -     
  -     <target name="war.copy.clean" depends="war.copy" description="cleans 
the temporary files">
  -             <delete dir="${dir.dist}" />
  -             <delete dir="${build.interop}" />
  -     </target>
  -     
  -     <target name="war.copy" depends="war" >
  -         <delete file="${webapps}/${sandesha.war}" />
  -          <delete dir="${webapps}/sandesha-interop" />
  -             <copy file="${sandesha.war}" todir="${webapps}" />
  -     </target>
  -
  -    <target name="jar.copy" depends="jar" >
  -        <delete file="${axishome}/${sandesha.jar.name}" />
  -             <copy file="${sandesha.jar}" todir="${axishome}" />
  -     </target>
  +    </target>
  +
  +    <target name="create.war" depends="prepare-war" description="creates the 
sandesha war">
  +
  +        <war destfile="${sandesha.war}" webxml="${webxml}">
  +            <fileset dir="${dir.interop}/webapp/jsp"/>
  +            <lib dir="${dir.libs}"/>
  +            <lib file="${sandesha.jar}"/>
  +        </war>
  +
  +    </target>
   
  +    <target name="war.copy.clean" depends="war.copy" description="cleans the 
temporary files">
  +        <delete dir="${dir.dist}"/>
  +        <delete dir="${build.interop}"/>
  +    </target>
  +
  +    <target name="war.copy" depends="war">
  +        <delete file="${webapps}/${sandesha.war}"/>
  +        <delete dir="${webapps}/sandesha-interop"/>
  +        <copy file="${sandesha.war}" todir="${webapps}"/>
  +    </target>
  +
  +    <target name="jar.copy" depends="jar">
  +        <delete file="${axishome}/${sandesha.jar.name}"/>
  +        <copy file="${sandesha.jar}" todir="${axishome}"/>
  +    </target>
   
  -     <target name="war" depends="create.war" description="creates the war 
file" />
   
  +    <target name="war" depends="create.war" description="creates the war 
file"/>
   
   
   </project>
  
  
  
  1.10      +12 -0     ws-fx/sandesha/interop/server-config.wsdd
  
  Index: server-config.wsdd
  ===================================================================
  RCS file: /home/cvs/ws-fx/sandesha/interop/server-config.wsdd,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- server-config.wsdd        11 May 2005 13:04:26 -0000      1.9
  +++ server-config.wsdd        19 May 2005 04:20:24 -0000      1.10
  @@ -40,6 +40,18 @@
     <parameter name="className" 
value="org.apache.sandesha.samples.interop.RMInteropService"/>
     <parameter name="handlerClass" 
value="org.apache.sandesha.ws.rm.providers.RMProvider"/>
    </service>
  +
  +  <service name="RMService" provider="Handler">
  +  <requestFlow>
  +   <handler 
type="java:org.apache.sandesha.ws.rm.handlers.RMServerRequestHandler"/>
  +   <handler 
type="java:org.apache.axis.message.addressing.handler.AddressingHandler"/>
  +  </requestFlow>
  +  <parameter name="allowedMethods" value="*"/>
  +  <parameter name="scope" value="request"/>
  +  <parameter name="className" value="org.apache.sandesha.client.RMService"/>
  +  <parameter name="handlerClass" 
value="org.apache.sandesha.samples.interop.testclient.RMClientProvider"/>
  + </service>
  +
    <transport name="http">
     <requestFlow>
      <handler type="URLMapper"/>
  
  
  
  1.5       +10 -37    
ws-fx/sandesha/interop/org/apache/sandesha/samples/interop/testclient/InteropBean.java
  
  Index: InteropBean.java
  ===================================================================
  RCS file: 
/home/cvs/ws-fx/sandesha/interop/org/apache/sandesha/samples/interop/testclient/InteropBean.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- InteropBean.java  18 May 2005 12:57:54 -0000      1.4
  +++ InteropBean.java  19 May 2005 04:20:24 -0000      1.5
  @@ -10,11 +10,10 @@
       private String from;
       private String replyto;
       private int noOfMsgs;
  -    private String terminate;
  -    private String acks;
  +
       private String acksTo;
  -    private boolean sendOffer;
  -     private String faultto;
  +    private String offer;
  +    private String faultto;
       private String sourceURL;
   
       public String getFaultto() {
  @@ -26,11 +25,6 @@
       }
   
   
  -
  -
  -
  -
  -
       public String getSourceURL() {
           return sourceURL;
       }
  @@ -48,9 +42,6 @@
           this.acksTo = acksTo;
       }
   
  -    public String getAcks() {
  -        return acks;
  -    }
   
       public String getFrom() {
           return from;
  @@ -68,31 +59,11 @@
           return replyto;
       }
   
  -    public boolean isSendOffer() {
  -        return sendOffer;
  -    }
  -
  -    public void setSendOffer(boolean sendOffer) {
  -        this.sendOffer = sendOffer;
  -    }
   
       public String getTarget() {
           return target;
       }
   
  -    /**
  -     * @return
  -     */
  -    public String getTerminate() {
  -        return terminate;
  -    }
  -
  -    /**
  -     * @param string
  -     */
  -    public void setAcks(String string) {
  -        acks = string;
  -    }
   
       /**
        * @param string
  @@ -129,11 +100,13 @@
           target = string;
       }
   
  -    /**
  -     * @param string
  -     */
  -    public void setTerminate(String string) {
  -        terminate = string;
  +    public String getOffer() {
  +        return offer;
       }
   
  +    public void setOffer(String offer) {
  +        this.offer = offer;
  +    }
  +
  +
   }
  
  
  
  1.10      +55 -82    
ws-fx/sandesha/interop/org/apache/sandesha/samples/interop/testclient/InteropStub.java
  
  Index: InteropStub.java
  ===================================================================
  RCS file: 
/home/cvs/ws-fx/sandesha/interop/org/apache/sandesha/samples/interop/testclient/InteropStub.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- InteropStub.java  18 May 2005 12:57:54 -0000      1.9
  +++ InteropStub.java  19 May 2005 04:20:24 -0000      1.10
  @@ -23,6 +23,7 @@
   
   import javax.xml.namespace.QName;
   import javax.xml.rpc.ParameterMode;
  +import javax.xml.rpc.ServiceException;
   import java.util.ArrayList;
   import java.util.Iterator;
   import java.util.List;
  @@ -58,66 +59,81 @@
   
       private static InteropCallback callback = null;
   
  -    public synchronized void runPing(InteropBean bean) {
   
  +    private Call getCall(InteropBean bean) throws ServiceException {
           String target = bean.getTarget();
           String from = bean.getFrom();
           String replyTo = bean.getReplyto();
           String acksTo = bean.getAcksTo();
  -        String acks = bean.getAcks();
  -        String terminate = bean.getTerminate();
  -        String operation = bean.getOperation();
  -        int messages = bean.getNoOfMsgs();
  +        String faultTo = bean.getFaultto();
   
  -        if (replyTo != null && replyTo.equalsIgnoreCase("anonymous"))
  -            replyTo = AddressingUtils.getAnonymousRoleURI();
  +        boolean sendOffer = false;
  +        if (bean.getOffer().equalsIgnoreCase("yes"))
  +            sendOffer = true;
  +
  +        Service service = new Service();
  +        Call call = (Call) service.createCall();
  +
  +        if (replyTo != null && replyTo.equalsIgnoreCase("anonymous")) {
  +            call.setProperty(Constants.ClientProperties.REPLY_TO,
  +                    AddressingUtils.getAnonymousRoleURI());
  +        } else if (replyTo != null) {
  +            call.setProperty(Constants.ClientProperties.REPLY_TO, 
bean.getReplyto());
  +        }
   
  -        if (from != null && from.equalsIgnoreCase("anonymous"))
  +        if (from != null && from.equalsIgnoreCase("anonymous")) {
               from = AddressingUtils.getAnonymousRoleURI();
  +            call.setProperty(Constants.ClientProperties.FROM,
  +                    AddressingUtils.getAnonymousRoleURI());
  +        } else if (from != null) {
  +            call.setProperty(Constants.ClientProperties.FROM, from);
  +        }
   
  -        if (acksTo != null && acksTo.equalsIgnoreCase("anonymous"))
  +        if (acksTo != null && acksTo.equalsIgnoreCase("anonymous")) {
               acksTo = AddressingUtils.getAnonymousRoleURI();
  +            call.setProperty(Constants.ClientProperties.ACKS_TO,
  +                    AddressingUtils.getAnonymousRoleURI());
  +        } else if (acksTo != null) {
  +            call.setProperty(Constants.ClientProperties.ACKS_TO, acksTo);
  +        }
   
  -        try {
  -            boolean sync = false;
  -            if (acksTo.equals(AddressingUtils.getAnonymousRoleURI())) {
  -                sync = true;
  -            }
  -            System.out.println("=========== RUNNING THE \"Ping\" INTEROP 
TEST ==========");
  +        if (faultTo != null && faultTo.equalsIgnoreCase("anonymous")) {
  +            faultTo = AddressingUtils.getAnonymousRoleURI();
  +            call.setProperty(Constants.ClientProperties.FAULT_TO,
  +                    AddressingUtils.getAnonymousRoleURI());
  +        } else if (faultTo != null) {
  +            call.setProperty(Constants.ClientProperties.FAULT_TO, 
bean.getFaultto());
  +        }
   
  -            //RMInitiator.initClient(sync);
  -            InteropStub.initClient();
   
  -            Service service = new Service();
  -            Call call = (Call) service.createCall();
  +        if (sendOffer)
  +            call.setProperty(Constants.ClientProperties.SEND_OFFER, new 
Boolean(true));
   
  -            call.setProperty(Constants.ClientProperties.SYNC, new 
Boolean(sync));
  -            call.setProperty(Constants.ClientProperties.ACTION, 
"urn:wsrm:Ping");
  -            call.setProperty(Constants.ClientProperties.ACKS_TO, acksTo);
  -            
call.setProperty(Constants.ClientProperties.SOURCE_URL,bean.getSourceURL());
  -            if(bean.getReplyto()!=null){
  -                
call.setProperty(Constants.ClientProperties.REPLY_TO,bean.getReplyto());
  -            }
  -             if(bean.getFaultto()!=null){
  -                 System.out.println("setting faultto");
  -                
call.setProperty(Constants.ClientProperties.FAULT_TO,bean.getFaultto());
  -            }
  +        call.setTargetEndpointAddress(target);
  +        call.setProperty(Constants.ClientProperties.SOURCE_URL, 
bean.getSourceURL());
   
  -            if (from != null && from != "")
  -                call.setProperty(Constants.ClientProperties.FROM, from);
  +        return call;
  +    }
   
  -            if (replyTo != null && replyTo != "")
  -                call.setProperty(Constants.ClientProperties.REPLY_TO, 
replyTo);
  +    public synchronized void runPing(InteropBean bean) {
  +
  +        System.out.println("=========== RUNNING THE \"Ping\" INTEROP TEST 
==========");
  +        String target = bean.getTarget();
  +        int msgs = bean.getNoOfMsgs();
  +        try {
  +            InteropStub.initClient();
  +            Call call = getCall(bean);
  +
  +            call.setProperty(Constants.ClientProperties.ACTION, 
"urn:wsrm:Ping");
   
  -            call.setTargetEndpointAddress(target);
               call.setOperationName(new QName("http://tempuri.org";, "Ping"));
               call.setTransport(new RMTransport(target, ""));
   
               call.addParameter("Text", XMLType.XSD_STRING, ParameterMode.IN);
   
  -            for (int i = 1; i <= messages; i++) {
  +            for (int i = 1; i <= msgs; i++) {
                   call.setProperty(Constants.ClientProperties.MSG_NUMBER, new 
Long((i)));
  -                if (i == messages) {
  +                if (i == msgs) {
                       
call.setProperty(Constants.ClientProperties.LAST_MESSAGE, new Boolean(true));
                   }
                   String msg = "Sandesha Ping Message Number " + i;
  @@ -136,32 +152,10 @@
       public synchronized void runEcho(InteropBean bean) {
   
           String target = bean.getTarget();
  -        String from = bean.getFrom();
  -        String replyTo = bean.getReplyto();
  -        String acksTo = bean.getAcksTo();
  -        String acks = bean.getAcks();
  -        String terminate = bean.getTerminate();
  -        String operation = bean.getOperation();
  -        boolean sendOffer = bean.isSendOffer();
  -
           int messages = bean.getNoOfMsgs();
  -
  -        if (replyTo != null && replyTo.equalsIgnoreCase("anonymous"))
  -            replyTo = AddressingUtils.getAnonymousRoleURI();
  -
  -        if (from != null && from.equalsIgnoreCase("anonymous"))
  -            from = AddressingUtils.getAnonymousRoleURI();
  -
  -        if (acksTo != null && acksTo.equalsIgnoreCase("anonymous"))
  -            acksTo = AddressingUtils.getAnonymousRoleURI();
  -
           String seq = new Long(System.currentTimeMillis()).toString();
   
           try {
  -            boolean sync = false;
  -            if (acksTo.equalsIgnoreCase("anonymous"))
  -                sync = true;
  -
               System.out.println("=========== RUNNING THE \"echoString\" 
INTEROP TEST ==========");
   
               //We start the listener to be in the safe side.
  @@ -170,30 +164,8 @@
               //the reliablility of the sent messages.
               InteropStub.initClient();
   
  -            Service service = new Service();
  -            Call call = (Call) service.createCall();
  -
  -            System.out.println("Echo sync:" + sync);
  -            call.setProperty(Constants.ClientProperties.SYNC, new 
Boolean(sync));
  +            Call call = getCall(bean);
               call.setProperty(Constants.ClientProperties.ACTION, 
"urn:wsrm:echoString");
  -            call.setProperty(Constants.ClientProperties.ACKS_TO, acksTo);
  -            
call.setProperty(Constants.ClientProperties.SOURCE_URL,bean.getSourceURL());
  -             if(bean.getReplyto()!=null){
  -                
call.setProperty(Constants.ClientProperties.REPLY_TO,bean.getReplyto());
  -            }
  -             if(bean.getFaultto()!=null){
  -                
call.setProperty(Constants.ClientProperties.FAULT_TO,bean.getFaultto());
  -            }
  -
  -            if (from != null && from != "")
  -                call.setProperty(Constants.ClientProperties.FROM, from);
  -
  -            if (replyTo != null && replyTo != "")
  -                call.setProperty(Constants.ClientProperties.REPLY_TO, 
replyTo);
  -
  -            if (sendOffer) {
  -                call.setProperty(Constants.ClientProperties.SEND_OFFER, new 
Boolean(true));
  -            }
   
               call.setTargetEndpointAddress(target);
               call.setOperationName(new QName("http://tempuri.org/";, 
"echoString"));
  @@ -224,6 +196,7 @@
           }
       }
   
  +
       public static void initClient() {
           System.out.println("STARTING SENDER FOR THE CLIENT .......");
           sender = new Sender(storageManager);
  
  
  
  1.2       +0 -1      
ws-fx/sandesha/interop/org/apache/sandesha/samples/interop/testclient/RMClientProvider.java
  
  Index: RMClientProvider.java
  ===================================================================
  RCS file: 
/home/cvs/ws-fx/sandesha/interop/org/apache/sandesha/samples/interop/testclient/RMClientProvider.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- RMClientProvider.java     18 May 2005 12:57:54 -0000      1.1
  +++ RMClientProvider.java     19 May 2005 04:20:24 -0000      1.2
  @@ -68,7 +68,6 @@
   
       public void processMessage(MessageContext msgContext, SOAPEnvelope 
reqEnv, SOAPEnvelope resEnv,
                                  Object obj) throws Exception {
  -        System.out.println("RMClientProvider called 
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,");
   
           
RMClientProvider.log.info(Constants.InfomationMessage.PROVIDER_RECEIVED_MSG);
           //Some actions may need to be ignored. e.g.  
http://schemas.xmlsoap.org/ws/2005/02/trust/RST/SCT
  
  
  
  1.6       +21 -33    ws-fx/sandesha/interop/webapp/jsp/interop.jsp
  
  Index: interop.jsp
  ===================================================================
  RCS file: /home/cvs/ws-fx/sandesha/interop/webapp/jsp/interop.jsp,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- interop.jsp       18 May 2005 12:57:54 -0000      1.5
  +++ interop.jsp       19 May 2005 04:20:25 -0000      1.6
  @@ -165,13 +165,13 @@
             <tr>
               <td width='20%'>Operation</td>
   <%--            <td colspan="4"><select name='operation' 
onchange="setOperation(this)">--%>
  -            <td colspan="4"><select name='operation' 
onchange="setOperation(this)">
  +            <td colspan="4"><select name='operation' >
                   <option value="Ping">Ping</option>
                   <option value="echoString">echoString</option>
                 </select></td>
             </tr>
             <tr id="fromTR">
  -            <td width='20%' >wsrmAcksTo</td>
  +            <td width='20%' >wsrm:AcksTo</td>
               <td >
                   <table width="100%">
                           <tr>
  @@ -245,8 +245,8 @@
              </td>
           </tr>
   
  -        <tr id="offerTR" style="display:none" >
  -            <td width='20%' >Offer seq</td>
  +        <tr id="offerTR" >
  +            <td width='20%' >Send Offer</td>
               <td >
                   <table width="100%">
                           <tr>
  @@ -262,19 +262,6 @@
           </tr>
   
   
  -         <tr>
  -            <td width='20%' >Send messages</td>
  -            <td >
  -                <table width="100%">
  -                        <tr>
  -                                                     <td width="4%">acks</td>
  -                                              <td width="13%"><input 
type="checkbox" name="acks" value="checked" checked></td>
  -                                     <td width="14%">Terminate Sequence</td>
  -                                              <td width="49%"><input 
type="checkbox" name="terminate" value="checked" checked></td>
  -                        </tr>
  -                </table>
  -           </td>
  -        </tr>
           <tr>
               <td colspan='1'>No. of Messages</td>
               <td colspan ='10' ><select name='noOfMsgs'>
  @@ -319,6 +306,17 @@
   
   public void runTest(InteropBean bean,ResponseWriter writer,String 
defaultAsyncEndPoint) throws Exception {
   
  +    System.out.println("AcksTo "+bean.getAcksTo());
  +    System.out.println("FaultTo "+bean.getFaultto());
  +    System.out.println("From "+bean.getFrom());
  +    System.out.println("No of Msf "+bean.getNoOfMsgs());
  +    System.out.println("Opertation "+bean.getOperation());
  +    System.out.println("ReplyTo"+bean.getReplyto());
  +    System.out.println("Source "+bean.getSourceURL());
  +    System.out.println("Target "+bean.getTarget());
  +    System.out.println("Offer "+bean.getOffer());
  +
  +
        String to = null;
        if(bean!=null){
                to = bean.getTarget();
  @@ -326,35 +324,25 @@
        }
   
        if(to!=null) {
  -                     //session.setParameter("runTest");
  -                     //ResponseWriter writer = new ResponseWriter 
(res.getWriter());
  -
  -             writer.write(" <span><br /><h3> Starting Test ....... <br 
/></h3> ");
  +             writer.write(" <span><br /><h3> Starting Test ....... <br 
/></h3> ");
                        writer.flush();
   
  -                     String target = bean.getTarget();
  -                     String from = bean.getFrom();
  -                     String replyTo = bean.getReplyto();
  -                     String acks = bean.getAcks();
  -                     String terminate = bean.getTerminate();
  -                     String operation = bean.getOperation();
  -                     int messages = bean.getNoOfMsgs();
  -
  -                     //create callback classe and register
   
                        InteropCallback callback = new InteropCallback (writer);
   
               ClientStorageManager csm = new ClientStorageManager ();
  -                     csm.setCallback(callback);
  +
  +            csm.setCallback(callback);
                        RMProvider.setCallback(callback);
               RMClientProvider.setCallback(callback);
                        Sender.setCallback(callback);
   
               InteropStub stub= InteropStub.getInstance();
               InteropStub.setCallback(callback);
  -             if(operation.equalsIgnoreCase("ping")){
  +
  +             if(bean.getOperation().equalsIgnoreCase("ping")){
                       stub.runPing(bean);
  -            }else if(operation.equalsIgnoreCase("echoString") ){
  +            }else if(bean.getOperation().equalsIgnoreCase("echoString") ){
                      stub.runEcho(bean);
                    }
   
  
  
  

Reply via email to