Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    BIG ISSUE about SCRIPTINCLUDE

    Mozilla/5.0
    (Windows; U; Windows NT 5.1; es-ES; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8
    Windows xp sp2
    GWT 2.0.4
    SMART 2.3

    Developer Console: no errors, nothing
    firebug: NO RESPONSE, nothing happend

    Code:
    	public  DataSource createDataSource(final String Tipo , final String String_Object,String Action) {  
    		
     final DataSource dataSource = new XJSONDataSource ();
    	   
    	   dataSource.setDataTransport(RPCTransport.SCRIPTINCLUDE);        
    	   dataSource.setShowPrompt(false);
    	   dataSource.setDataFormat(DSDataFormat.JSON);  
    	   	   
    	   //SC.say(keyhash.str_ws_root +"/"+ keyhash.str_ws_root_name +"/"+keyhash.str_ws_scrip_rewrite + "/"+ String_Object );
    
    	   if (Tipo.toString().equals("login")){
    		   dataSource.setDataURL( keyhash.str_ws_root +"/"+ keyhash.str_ws_root_name +"/"+keyhash.str_ws_scrip_rewrite + "/"+ String_Object);    
    	   }
    	   SC.say( dataSource.getDataURL() );
    	   //correct URL!
    	return dataSource;
        }  
    	 
    	 public k_comunication()
    	{
    		
    	}
    }
    now its imposible call a fecth because nothing happend...?
    but the simple datasource without scriptinclude option works.

    #2
    What did you expect to happen with this code? You don't show using it anywhere.

    Comment


      #3
      logic...
      i call that
      Code:
          
      final DataSource LoginSource = new k_comunication().createDataSource( "login" , url , "");
        				   
      LoginSource.fetchData( null , new DSCallback(){
      public void execute(DSResponse response, Object rawData,	DSRequest request) {
      //THIS NEVER CALLED
      sc.say("lala");
      }      					
      });

      Comment


        #4
        Read up on SCRIPTINCLUDE and not that it does not follow normal RPC exchanges so your callback is not likely to be called.

        Comment


          #5
          Hi David thanks for your help, bbut i read the doc of SCRIPTINCLUDE, i have the callback in me webservice response, is in php so is easy , sample: host.com?callback=is.xxxx&delete=1, in my php got echo $_get callback.. , my code wwas working, i dont now what happend :S

          and i dont understand very good the "not that it does not follow normal RPC exchanges "

          Comment

          Working...
          X