Here is the code I am trying to execute. Right now I am just passing a 
string the represents the json and I am parsing it on the back-end. This 
way of doing is seems to defeat some of the purpose of using Tuscany. So I 
am wondering if there is a better way.

  function sendAndGetInfo(){
           try{
               var info = new Object();
               info.Firstname = 
document.getElementById("Firstname").value;
               info.Lastname = document.getElementById("Lastname").value;
               info.Description = 
document.getElementById("Description").value;
               info.Latitude = document.getElementById("Latitude").value;
               info.Longatude = 
document.getElementById("Longatude").value;
               json_data = JSON.stringify(info);
               
               console.log(json_data);
               
               HelloWorldService.setPersonInfo(json_data, 
handleInfoResponse);    
                      
           }catch(e){
               console.dir(e);
           }      
       }
       
       function handleInfoResponse(result) {
           console.log(result);
       } 


Willis C. White III
Software Engineer, CIO Lab
IBM Certified IT Specialist 
Code Warrior  







From:   Willis C White/Poughkeepsie/IBM@IBMUS
To:     [email protected]
Date:   10/17/2011 12:24 PM
Subject:        Re: can HelloWorldJSONRPC be modified to send objects?



I am using Tuscany 1.6 with WAS 7.0 in RAD 7.5

Willis C. White III
Software Engineer, CIO Lab
IBM Certified IT Specialist 
Code Warrior 

EM:[email protected]
NM:Willis White/Poughkeepsie/IBM 






From:        Simon Laws <[email protected]> 
To:        [email protected] 
Date:        10/17/2011 11:59 AM 
Subject:        Re: can HelloWorldJSONRPC be modified to send objects? 





On Mon, Oct 17, 2011 at 3:21 PM, Willis C White <[email protected]> 
wrote: 
I am trying to send a collection of data (Stings and Doubles) to the back 
end (without Dojo). I see there is a scaDomain.js file that seems to be 
doing the work - but I can't find it. 

1. Is there an example of sending an object to the back end using WAS - 
that I could look at? 

2. Where is scaDomain.js located? 

2a. Can I still use scaDomain.js if I want to send an object and not just 
a primitive? 

Willis C. White III
Software Engineer, CIO Lab
IBM Certified IT Specialist 
Code Warrior 





Hi Willis

What version of Tuscany are you on? 

Regards

Simon


-- 
Apache Tuscany committer: tuscany.apache.org
Co-author of a book about Tuscany and SCA: tuscanyinaction.com 

<<image/gif>>

<<image/gif>>

<<image/gif>>

<<image/gif>>

<<image/gif>>

<<image/gif>>

Reply via email to