HI maintha,

I followed this http://wso2.com/library/95/ tutorial to generate client. I
successfully come to the step 4. But in step 5 generated
SimpleServiceStub.java not generate as appropriate(some code is missing).
because when create Client get unknown syntax like "Echo".

Generated java class attached here.


On Wed, Apr 30, 2014 at 10:44 AM, Dharshana Warusavitharana <
[email protected]> wrote:

> Hi Rukshan,
>
> Did you try out the maven plugin. I think it would be easy for you and
> us this is believed you don't need python installed
>
>  http://robotframework.org/MavenPlugin/
>
> Thank You,
> Dharshana.
>
>
> On Wed, Apr 30, 2014 at 8:59 AM, Rukshan Chathuranga <
> [email protected]> wrote:
>
>> Hi krishantha,
>>
>> I followed the instruction to install the robot. Most of dependencies
>> already had in the system and installation was success. but when installing
>> "ride", it give a warning to install wxPython 2.8 toolkit with Unicode
>> support. Also it's doesn't work without wxPython.
>>
>> It suggest the installation guide by this link
>> http://sourceforge.net/projects/wxpython/files/wxPython/2.8.12.1/.
>>
>> But it is hard to find the correct file to install. may be this one is
>> not important now.
>> if you already encountered this problem let me know how to install.
>>
>> Thanks.
>>
>>
>> On Tue, Apr 29, 2014 at 10:39 PM, Krishantha Samaraweera <
>> [email protected]> wrote:
>>
>>> Selenium2Library API documentation -
>>> https://github.com/rtomac/robotframework-selenium2library
>>> Source - https://github.com/rtomac/robotframework-selenium2library
>>>
>>> Thanks,
>>> Krishantha.
>>>
>>>
>>> On Tue, Apr 29, 2014 at 10:33 PM, Krishantha Samaraweera <
>>> [email protected]> wrote:
>>>
>>>> Robot framework installation on Linux
>>>> ================================
>>>>
>>>> 1. Install Python if doesn't exists in your machine -
>>>>
>>>> *easy_install pip*
>>>> *pip install python*
>>>>
>>>> 2. Install Jyton (Optinal)
>>>>
>>>> *sudo apt-get install jython*
>>>>
>>>> 3. Install robot framework
>>>>
>>>> *pip install robotframework *OR* easy_install robotframework  *
>>>>
>>>> 4. Install ride (The IDE for robot test case writing)
>>>>
>>>> *pip install robotframework-ride *OR *easy_install robotframework-ride*
>>>>
>>>> 5. Install Selenium2Library - Selenium implementation compatible with
>>>> robot
>>>>
>>>> *pip install robotframework-selenium2library *OR* easy_install
>>>> robotframework-selenium2library*
>>>>
>>>>
>>>> Let me know if you find any difficulty with installation.
>>>>
>>>> Thanks,
>>>> Krishantha.
>>>>
>>>>
>>>> On Tue, Apr 29, 2014 at 10:23 PM, Krishantha Samaraweera <
>>>> [email protected]> wrote:
>>>>
>>>>> Hi Rukshan,
>>>>>
>>>>> Some sample robot scripts are attached here with.
>>>>>
>>>>> Thanks,
>>>>> Krishantha.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Tue, Apr 29, 2014 at 10:17 PM, Malintha Adikari 
>>>>> <[email protected]>wrote:
>>>>>
>>>>>> adding
>>>>>>
>>>>>> 3. WSO2 Application Server Documentation[4]
>>>>>>
>>>>>> [4]
>>>>>> https://docs.wso2.org/display/AS521/WSO2+Application+Server+Documentation
>>>>>>
>>>>>>
>>>>>> On Tue, Apr 29, 2014 at 10:12 PM, Malintha Adikari <[email protected]
>>>>>> > wrote:
>>>>>>
>>>>>>> Hi Rukshan,
>>>>>>>
>>>>>>> Following resources would help you to understand the basics of
>>>>>>> required technologies.
>>>>>>>
>>>>>>> 1. Hello world with Axis2 web service [1]
>>>>>>> 2. Understanding WSDL files.[2], [3]
>>>>>>>
>>>>>>> [1]http://wso2.com/library/95/
>>>>>>> [2]http://oreilly.com/catalog/webservess/chapter/ch06.html
>>>>>>> [3]http://predic8.com/wsdl-reading.htm
>>>>>>>
>>>>>>> Regards,
>>>>>>> Malintha Adikari
>>>>>>>
>>>>>>>
>>>>>>> On Tue, Apr 29, 2014 at 9:43 PM, Rukshan Chathuranga <
>>>>>>> [email protected]> wrote:
>>>>>>>
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> Could understand the ultimate objective of the project and stating
>>>>>>>> points of the project. Feasibility of the keyword driven testing using
>>>>>>>> Robot frame, should be evaluate in this week.
>>>>>>>> Also to get understand about the Admin back-end services and WSDL
>>>>>>>> experiment, is it possible to give  the required resources and sample 
>>>>>>>> Test
>>>>>>>> Script?
>>>>>>>>
>>>>>>>> Thanks and regards.
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On Mon, Apr 28, 2014 at 6:23 PM, Rukshan Chathuranga <
>>>>>>>> [email protected]> wrote:
>>>>>>>>
>>>>>>>>> yeah i'm OK with the time and place.
>>>>>>>>> Thanks.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Mon, Apr 28, 2014 at 5:33 PM, Dharshana Warusavitharana <
>>>>>>>>> [email protected]> wrote:
>>>>>>>>>
>>>>>>>>>> Hi Rukshan,
>>>>>>>>>>
>>>>>>>>>> How is your availability at 4.30 PM tomorrow.
>>>>>>>>>>
>>>>>>>>>> If you are ok with the time shall we schedule our discussion at
>>>>>>>>>> that time at WSO2 office.
>>>>>>>>>>
>>>>>>>>>> Thank you,
>>>>>>>>>> Dharshana.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On Sun, Apr 27, 2014 at 5:33 PM, Rukshan Chathuranga <
>>>>>>>>>> [email protected]> wrote:
>>>>>>>>>>
>>>>>>>>>>> Yes. Afternoon is possible.
>>>>>>>>>>>
>>>>>>>>>>> Thanks.
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> On Sun, Apr 27, 2014 at 11:23 AM, Dharshana Warusavitharana <
>>>>>>>>>>> [email protected]> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> Sure Rukshan,
>>>>>>>>>>>>
>>>>>>>>>>>> How is your availability on afternoon sessions. I will discuss
>>>>>>>>>>>> with the team and arrange a discussion.
>>>>>>>>>>>> Meanwhile, if you need any clarifications please feel free to
>>>>>>>>>>>> raise a mail.
>>>>>>>>>>>>
>>>>>>>>>>>> Thank You,
>>>>>>>>>>>> Dharshana.
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> On Sun, Apr 27, 2014 at 10:06 AM, Rukshan Chathuranga <
>>>>>>>>>>>> [email protected]> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> hi,
>>>>>>>>>>>>>
>>>>>>>>>>>>> These days i trying to understand my project architecture in
>>>>>>>>>>>>> deep. Also i am doing robot and NLP experiments to verify the 
>>>>>>>>>>>>> feasibility.
>>>>>>>>>>>>>
>>>>>>>>>>>>> SO can we arrange a session to discuss more about this next
>>>>>>>>>>>>> week?
>>>>>>>>>>>>>
>>>>>>>>>>>>> thanks and regards.
>>>>>>>>>>>>>
>>>>>>>>>>>>> --
>>>>>>>>>>>>> Department Of Computer Science & Engineering,
>>>>>>>>>>>>> Faculty Of Engineering,
>>>>>>>>>>>>> University Of Moratuwa.
>>>>>>>>>>>>> Sri lanka.
>>>>>>>>>>>>> WEB: http://rukspot.com/
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> --
>>>>>>>>>>>>
>>>>>>>>>>>> Dharshana Warusavitharana
>>>>>>>>>>>> Senior Software Engineer , Test Automation
>>>>>>>>>>>> WSO2 Inc. http://wso2.com
>>>>>>>>>>>> email : [email protected] <[email protected]>
>>>>>>>>>>>> Tel  : +94 11 214 5345
>>>>>>>>>>>> Fax :+94 11 2145300
>>>>>>>>>>>> cell : +94772202595
>>>>>>>>>>>> blog : http://dharshanaw.blogspot.com
>>>>>>>>>>>>
>>>>>>>>>>>> lean . enterprise . middleware
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>> Department Of Computer Science & Engineering,
>>>>>>>>>>> Faculty Of Engineering,
>>>>>>>>>>> University Of Moratuwa.
>>>>>>>>>>> Sri lanka.
>>>>>>>>>>> WEB: http://rukspot.com/
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>>
>>>>>>>>>> Dharshana Warusavitharana
>>>>>>>>>> Senior Software Engineer , Test Automation
>>>>>>>>>> WSO2 Inc. http://wso2.com
>>>>>>>>>> email : [email protected] <[email protected]>
>>>>>>>>>> Tel  : +94 11 214 5345
>>>>>>>>>> Fax :+94 11 2145300
>>>>>>>>>> cell : +94772202595
>>>>>>>>>> blog : http://dharshanaw.blogspot.com
>>>>>>>>>>
>>>>>>>>>> lean . enterprise . middleware
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Department Of Computer Science & Engineering,
>>>>>>>>> Faculty Of Engineering,
>>>>>>>>> University Of Moratuwa.
>>>>>>>>> Sri lanka.
>>>>>>>>> WEB: http://rukspot.com/
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Department Of Computer Science & Engineering,
>>>>>>>> Faculty Of Engineering,
>>>>>>>> University Of Moratuwa.
>>>>>>>> Sri lanka.
>>>>>>>> WEB: http://rukspot.com/
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> *Malintha Adikari*
>>>>>>>  Software Engineer
>>>>>>> WSO2 Inc.; http://wso2.com
>>>>>>> lean.enterprise.middleware
>>>>>>>
>>>>>>> Mobile: +94 71 2312958
>>>>>>> Blog:    http://malinthas.blogspot.com
>>>>>>> Page:   http://about.me/malintha
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> *Malintha Adikari*
>>>>>>  Software Engineer
>>>>>> WSO2 Inc.; http://wso2.com
>>>>>> lean.enterprise.middleware
>>>>>>
>>>>>> Mobile: +94 71 2312958
>>>>>> Blog:    http://malinthas.blogspot.com
>>>>>> Page:   http://about.me/malintha
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Krishantha Samaraweera
>>>>> Senior Technical Lead - Test Automation
>>>>> Mobile: +94 77 7759918
>>>>> WSO2, Inc.; http://wso2.com/
>>>>> lean . enterprise . middlewear.
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Krishantha Samaraweera
>>>> Senior Technical Lead - Test Automation
>>>> Mobile: +94 77 7759918
>>>> WSO2, Inc.; http://wso2.com/
>>>> lean . enterprise . middlewear.
>>>>
>>>
>>>
>>>
>>> --
>>> Krishantha Samaraweera
>>> Senior Technical Lead - Test Automation
>>> Mobile: +94 77 7759918
>>> WSO2, Inc.; http://wso2.com/
>>> lean . enterprise . middlewear.
>>>
>>
>>
>>
>> --
>> Department Of Computer Science & Engineering,
>> Faculty Of Engineering,
>> University Of Moratuwa.
>> Sri lanka.
>> WEB: http://rukspot.com/
>>
>>
>
>
> --
>
> Dharshana Warusavitharana
> Senior Software Engineer , Test Automation
> WSO2 Inc. http://wso2.com
> email : [email protected] <[email protected]>
> Tel  : +94 11 214 5345
> Fax :+94 11 2145300
> cell : +94772202595
> blog : http://dharshanaw.blogspot.com
>
> lean . enterprise . middleware
>



-- 
Department Of Computer Science & Engineering,
Faculty Of Engineering,
University Of Moratuwa.
Sri lanka.
WEB: http://rukspot.com/
    /**
     * SimpleServiceCallbackHandler.java
     *
     * This file was auto-generated from WSDL
     * by the Apache Axis2 version: 1.0 May 05, 2006 (12:31:13 IST)
     */
    package org.apache.axis2;

    /**
     *  SimpleServiceCallbackHandler Callback class 
     */

    public abstract class SimpleServiceCallbackHandler{



	private Object clientData;


	/**
	* User can pass in any object that needs to be accessed once the NonBlocking 
	* Web service call is finished and appropreate method of this CallBack is called.
	* @param clientData Object mechanism by which the user can pass in user data
	* that will be avilable at the time this callback is called.
	*/
	public SimpleServiceCallbackHandler(Object clientData){
		this.clientData = clientData;
	}


        
           /**
            * auto generated Axis2 call back method for echo method
            *
            */
           public void receiveResultecho(
                    ) {
			        //Fill here with the code to handle the response
           }

          /**
           * auto generated Axis2 Error handler
           *
           */
            public void receiveErrorecho(java.lang.Exception e) {
                //Fill here with the code to handle the exception
            }
                


    }
    
        /**
        * SimpleServiceStub.java
        *
        * This file was auto-generated from WSDL
        * by the Apache Axis2 version: 1.0 May 05, 2006 (12:31:13 IST)
        */
        package org.apache.axis2;

        

        /*
        *  SimpleServiceStub java implementation
        */

        
        public class SimpleServiceStub extends org.apache.axis2.client.Stub
        {
        //default axis home being null forces the system to pick up the mars from the axis2 library
        public static final java.lang.String AXIS2_HOME = null;
        protected static org.apache.axis2.description.AxisOperation[] _operations;

        //hashmaps to keep the fault mapping
        private java.util.HashMap faultExeptionNameMap = new java.util.HashMap();
        private java.util.HashMap faultExeptionClassNameMap = new java.util.HashMap();
        private java.util.HashMap faultMessageMap = new java.util.HashMap();

	
    private void populateAxisService(){

        //creating the Service
        _service = new org.apache.axis2.description.AxisService("SimpleService");
	

        //creating the operations
        org.apache.axis2.description.AxisOperation __operation;
	


        _operations = new org.apache.axis2.description.AxisOperation[1];
        
                   __operation = new org.apache.axis2.description.OutInAxisOperation();
                

            __operation.setName(new javax.xml.namespace.QName("", "echo"));

	    

            _operations[0]=__operation;
            _service.addOperation(__operation);
        
        }

    //populates the faults
    private void populateFaults(){
         


    }

     public SimpleServiceStub(org.apache.axis2.context.ConfigurationContext configurationContext,
        java.lang.String targetEndpoint)
        throws java.lang.Exception {
         //To populate AxisService
         populateAxisService();
         populateFaults();
	
	
        _serviceClient = new org.apache.axis2.client.ServiceClient(configurationContext,_service);
        _serviceClient.getOptions().setTo(new org.apache.axis2.addressing.EndpointReference(
                targetEndpoint));
        
    }

    /**
     * Default Constructor
     */
    public SimpleServiceStub() throws java.lang.Exception {
        
                    this("http://10.217.234.217:8080/axis2/services/SimpleService"; );
                
    }

    /**
     * Constructor taking the target endpoint
     */
    public SimpleServiceStub(java.lang.String targetEndpoint) throws java.lang.Exception {
        this(org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContextFromFileSystem(AXIS2_HOME,null),
                targetEndpoint);
    }



        
                    /**
                    * Auto generated method signature
                    * @see org.apache.axis2.SimpleService#echo
                    */
                    public void echo(
                    )
                    throws java.rmi.RemoteException
                    
                    {
              try{
               org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[0].getName());
              _operationClient.getOptions().setAction("urn:echo");
              _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);

              

              // create SOAP envelope with that payload
              org.apache.axiom.soap.SOAPEnvelope env = null;
                    
                                    //Style is Doc. No input parameters
                                

        // create message context with that soap envelope
        org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext() ;
        _messageContext.setEnvelope(env);

        // add the message contxt to the operation client
        _operationClient.addMessageContext(_messageContext);

        //execute the operation client
        _operationClient.execute(true);

         
                return;
            
         }catch(org.apache.axis2.AxisFault f){
            org.apache.axiom.om.OMElement faultElt = f.getDetail();
            if (faultElt!=null){
                if (faultExeptionNameMap.containsKey(faultElt.getQName())){
                    //make the fault by reflection
                    try{
                        java.lang.String exceptionClassName = (java.lang.String)faultExeptionClassNameMap.get(faultElt.getQName());
                        java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);
                        java.rmi.RemoteException ex=
                                (java.rmi.RemoteException)exceptionClass.newInstance();
                        //message class
                        java.lang.String messageClassName = (java.lang.String)faultMessageMap.get(faultElt.getQName());
                        java.lang.Class messageClass = java.lang.Class.forName(messageClassName);
                        java.lang.Object messageObject = fromOM(faultElt,messageClass,null);
                        java.lang.reflect.Method m = exceptionClass.getMethod("setFaultMessage",
                                   new java.lang.Class[]{messageClass});
                        m.invoke(ex,new java.lang.Object[]{messageObject});
                        

                        throw ex;
                    }catch(java.lang.ClassCastException e){
                       // we cannot intantiate the class - throw the original Axis fault
                        throw f;
                    } catch (java.lang.ClassNotFoundException e) {
                        // we cannot intantiate the class - throw the original Axis fault
                        throw f;
                    }catch (java.lang.NoSuchMethodException e) {
                        // we cannot intantiate the class - throw the original Axis fault
                        throw f;
                    } catch (java.lang.reflect.InvocationTargetException e) {
                        // we cannot intantiate the class - throw the original Axis fault
                        throw f;
                    }  catch (java.lang.IllegalAccessException e) {
                        // we cannot intantiate the class - throw the original Axis fault
                        throw f;
                    }   catch (java.lang.InstantiationException e) {
                        // we cannot intantiate the class - throw the original Axis fault
                        throw f;
                    }
                }else{
                    throw f;
                }
            }else{
                throw f;
            }
        }
        }
            
                /**
                * Auto generated method signature for Asynchronous Invocations
                * @see org.apache.axis2.SimpleService#startecho
                */
                public  void startecho(
                final org.apache.axis2.SimpleServiceCallbackHandler callback)

                throws java.rmi.RemoteException{

              org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[0].getName());
             _operationClient.getOptions().setAction("urn:echo");
             _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);

          

              // create SOAP envelope with that payload
              org.apache.axiom.soap.SOAPEnvelope env=null;
                    
                                    //Style is Doc. No input parameters
                                

        // create message context with that soap envelope
        org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext() ;
        _messageContext.setEnvelope(env);

        // add the message contxt to the operation client
        _operationClient.addMessageContext(_messageContext);


                    
                            //Nothing to pass as the callback!!!
                        

          org.apache.axis2.util.CallbackReceiver _callbackReceiver = null;
        if ( _operations[0].getMessageReceiver()==null &&  _operationClient.getOptions().isUseSeparateListener()) {
           _callbackReceiver = new org.apache.axis2.util.CallbackReceiver();
          _operations[0].setMessageReceiver(
                    _callbackReceiver);
        }

           //execute the operation client
           _operationClient.execute(false);

                    }
                

       /**
        *  A utility method that copies the namepaces from the SOAPEnvelope
        */
       private java.util.Map getEnvelopeNamespaces(org.apache.axiom.soap.SOAPEnvelope env){
        java.util.Map returnMap = new java.util.HashMap();
        java.util.Iterator namespaceIterator = env.getAllDeclaredNamespaces();
        while (namespaceIterator.hasNext()) {
            org.apache.axiom.om.OMNamespace ns = (org.apache.axiom.om.OMNamespace) namespaceIterator.next();
            returnMap.put(ns.getPrefix(),ns.getName());
        }
       return returnMap;
    }

    
	
    private javax.xml.namespace.QName[] opNameArray = null;
	private boolean optimizeContent(javax.xml.namespace.QName opName) {
        

        if (opNameArray == null) {
			return false;
		}
		for (int i = 0; i < opNameArray.length; i++) {
			if (opName.equals(opNameArray[i])) {
				return true;   
			}
		}
		return false;
	}


     
   

    //http://10.217.234.217:8080/axis2/services/SimpleService
                private static javax.xml.namespace.QName[] qNameArray = {
                
                };
            

           /**
           *  get the default envelope
           */
           private org.apache.axiom.soap.SOAPEnvelope toEnvelope(org.apache.axiom.soap.SOAPFactory factory){
                return factory.getDefaultEnvelope();
           }


            private  java.lang.Object fromOM(
            org.apache.axiom.om.OMElement param,
            java.lang.Class type,
            java.util.Map extraNamespaces){

                try {
                       
                } catch (Exception e) {
                     throw new RuntimeException(e);
                }

                return null;
            }

        
   }
   
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to