Re: [flexcoders] Webservice with Dynamic request?

2009-02-18 Thread Alain Thibodeau
Thanks for anyone who looked at this. I found the prolem, by default I always 
put my class members as private...:(
Making them public, seems to have let access to the serializer and I am sending 
the proper soap.


 




From: Alain Thibodeau 
To: flexcoders@yahoogroups.com
Sent: Wednesday, February 18, 2009 10:54:38 AM
Subject: Re: [flexcoders] Webservice with Dynamic request?


Thank-you but I am still a little unclear as to how this actually works.
>From what I gather all I need to do is pass an array and flex will serialize 
>it...

I've tried passing an array of objects, I've simplified my test case, below is 
the code:

can anyone please help me figure out what I am doing wrong?

thanks in advance

 - - - -
 


CODE
 
varsearch1:Searchcrite ria = newSearchcriteria( );varsearch2:Searchcrite ria = 
newSearchcriteria( );var
search1.criteria1 = 
search1.criteria2 = 
search1.criteria3 = 
search1.criteria4 = 
search2.criteria1 = 
search2.criteria2 = 
search2.criteria3 = 
search2.criteria4 = 
search3.criteria1 = 
search3.criteria2 = 
search3.criteria3 = 
search3.criteria4 = 
 search3:Searchcrite ria = newSearchcriteria( 
);"test";"test";"test";"test";"test";"test";"test";"test";"test";"test";"test";"test";
 
varcriterialist: Array = [search1,search2, search3,search4, search5];
ws.GetAdvancedSearc hListDept("param1","param2","param3",criterialist,"param5");
ws.GetAdvancedSearc hListDept. addEventListener (ResultEvent. RESULT, 
resultSearchHandler ) ;

//search1, 2 3 4 5 are of type searchCriteria:

publicclassSearchcriteriaprivatevarcriteria1:String;privatevarcriteria2:String;privatevarcriteria3:String;publicfunctionSearchcriteria(
 )publicfunctiongetCriteria1() : String { returnthis.criteria1; 
}publicfunctionsetCriteria1(criteria1 : String) : void{ this.criteria1 = 
criteria1; } publicfunctiongetCriteria2() : String { returnthis.criteria2; 
}publicfunctionsetCriteria2(criteria2 : String) : void{ this.criteria2 = 
criteria2; } publicfunctiongetCriteria3() : String { returnthis.criteria3; 
}publicfunctionsetCriteria3(criteria3 : String) : void{ this.criteria3 = 
criteria3; }
{
{
}}


When I look at what is being sent to the service I see this for the 
criterialist param, they are not expanded...
All other params are passed ok as they are simple strings...
 
SENT SOAP snippet
tns:criterialist
"http:mysite/ 
schema"/>"http:mysite/ schema"/>"http:mysite/ schema"/>






From: Tracy Spratt 
To: flexcod...@yahoogro ups..com
Sent: Monday, February 9, 2009 11:55:42 AM
Subject: RE: [flexcoders] Webservice with Dynamic request?


What are the input parameters of the operation “SearchParams”?  What data 
types?  Does it have a single argument of type array that that contains an 
array  of “searchcriteria” objects, which have the three search specification 
values? 
 
The request object is a dynamic “Object”, not xml. build it something like this:
Var oRequest:Object = new Object();
oRequest.criteriali st = buildSearchCriteria Array()
webService.SearchPa rams.request = oRequest;
 
Be sure to remove the declarative mx:request tag.
Tracy Spratt
Lariat Services
Flex development bandwidth available

________

From:flexcod...@yahoogro ups.com [mailto: flexcod...@yahoogro ups.com ] On 
Behalf Of thibodeau.alain
Sent: Monday, February 09, 2009 10:30 AM
To: flexcod...@yahoogro ups.com
Subject: [flexcoders] Webservice with Dynamic request?
 
Hi All,

I am not sure how to go about this and couldn't find a sample 
anywhereI am trying to consume a webservice that contains dynamic 
request data. Meaning that my request will change depending on what 
the user has entered... I've always used services that had the same 
request params, but in this case they change...

I tried building out in AS my request like this:

webService.SearchPa rams.request 
= "  string< /title> string string";

And I have been staring at the request tag not knowing how to make 
it "loop"







string< /title>
string< /item>
string< /criteria>




 
 

I hope it's clear what I am trying to accomplish and that someone can 
point me in the correct direction...

thank-you!




  

Re: [flexcoders] Webservice with Dynamic request?

2009-02-18 Thread Alain Thibodeau
Thank-you but I am still a little unclear as to how this actually works.
>From what I gather all I need to do is pass an array and flex will serialize 
>it...

I've tried passing an array of objects, I've simplified my test case, below is 
the code:

can anyone please help me figure out what I am doing wrong?

thanks in advance


 


CODE
 
varsearch1:Searchcriteria = newSearchcriteria();varsearch2:Searchcriteria = 
newSearchcriteria();var
search1.criteria1 = 
search1.criteria2 = 
search1.criteria3 = 
search1.criteria4 = 
search2.criteria1 = 
search2.criteria2 = 
search2.criteria3 = 
search2.criteria4 = 
search3.criteria1 = 
search3.criteria2 = 
search3.criteria3 = 
search3.criteria4 = 
 search3:Searchcriteria = 
newSearchcriteria();"test";"test";"test";"test";"test";"test";"test";"test";"test";"test";"test";"test";
 
varcriterialist:Array = 
[search1,search2,search3,search4,search5];"param1","param2","param3",criterialist,"param5");
ws.GetAdvancedSearchListDept(
ws.GetAdvancedSearchListDept.addEventListener(ResultEvent.RESULT, 
resultSearchHandler) ;

//search1, 2 3 4 5 are of type searchCriteria:

publicclassSearchcriteriaprivatevarcriteria1:String;privatevarcriteria2:String;privatevarcriteria3:String;publicfunctionSearchcriteria()publicfunctiongetCriteria1()
 : String { returnthis.criteria1; }publicfunctionsetCriteria1(criteria1 : 
String) : void{ this.criteria1 = criteria1; } publicfunctiongetCriteria2() : 
String { returnthis.criteria2; }publicfunctionsetCriteria2(criteria2: String) : 
void{ this.criteria2 = criteria2; } publicfunctiongetCriteria3() : String { 
returnthis.criteria3; }publicfunctionsetCriteria3(criteria3 : String) : void{ 
this.criteria3 = criteria3; }
{
{
}}


When I look at what is being sent to the service I see this for the 
criterialist param, they are not expanded...
All other params are passed ok as they are simple strings...
 
SENT SOAP snippet
tns:criterialist
"http:mysite/schema"/>"http:mysite/schema"/>"http:mysite/schema"/>






From: Tracy Spratt 
To: flexcoders@yahoogroups.com
Sent: Monday, February 9, 2009 11:55:42 AM
Subject: RE: [flexcoders] Webservice with Dynamic request?


What are the input parameters of the operation “SearchParams”?  What data 
types?  Does it have a single argument of type array that that contains an 
array  of “searchcriteria” objects, which have the three search specification 
values? 
 
The request object is a dynamic “Object”, not xml. build it something like this:
Var oRequest:Object = new Object();
oRequest.criteriali st = buildSearchCriteria Array()
webService.SearchPa rams.request = oRequest;
 
Be sure to remove the declarative mx:request tag.
Tracy Spratt
Lariat Services
Flex development bandwidth available

________

From:flexcod...@yahoogro ups.com [mailto: flexcod...@yahoogro ups.com ] On 
Behalf Of thibodeau.alain
Sent: Monday, February 09, 2009 10:30 AM
To: flexcod...@yahoogro ups.com
Subject: [flexcoders] Webservice with Dynamic request?
 
Hi All,

I am not sure how to go about this and couldn't find a sample 
anywhere...I am trying to consume a webservice that contains dynamic 
request data. Meaning that my request will change depending on what 
the user has entered... I've always used services that had the same 
request params, but in this case they change...

I tried building out in AS my request like this:

webService.SearchPa rams.request 
= "  string< /title> string string";

And I have been staring at the request tag not knowing how to make 
it "loop"







string< /title>
string< /item>
string< /criteria>




 
 

I hope it's clear what I am trying to accomplish and that someone can 
point me in the correct direction...

thank-you!



  

RE: [flexcoders] Webservice with Dynamic request?

2009-02-09 Thread Tracy Spratt
What are the input parameters of the operation "SearchParams"?  What
data types?  Does it have a single argument of type array that that
contains an array  of "searchcriteria" objects, which have the three
search specification values? 

 

The request object is a dynamic "Object", not xml. build it something
like this:

Var oRequest:Object = new Object();

oRequest.criterialist = buildSearchCriteriaArray()

webService.SearchParams.request = oRequest;

 

Be sure to remove the declarative mx:request tag.

Tracy Spratt 
Lariat Services 

Flex development bandwidth available 



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of thibodeau.alain
Sent: Monday, February 09, 2009 10:30 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Webservice with Dynamic request?

 

Hi All,

I am not sure how to go about this and couldn't find a sample 
anywhere...I am trying to consume a webservice that contains dynamic 
request data. Meaning that my request will change depending on what 
the user has entered... I've always used services that had the same 
request params, but in this case they change...

I tried building out in AS my request like this:

webService.SearchParams.request 
= "stringstringstring";

And I have been staring at the request tag not knowing how to make 
it "loop"







string
string
string




 
 

I hope it's clear what I am trying to accomplish and that someone can 
point me in the correct direction...

thank-you!





[flexcoders] Webservice with Dynamic request?

2009-02-09 Thread thibodeau.alain
Hi All,

I am not sure how to go about this and couldn't find a sample 
anywhere...I am trying to consume a webservice that contains dynamic 
request data. Meaning that my request will change depending on what 
the user has entered... I've always used services that had the same 
request params, but in this case they change...

I tried building out in AS my request like this:

 webService.SearchParams.request 
= "stringstringstring";

And I have been staring at the request tag not knowing how to make 
it "loop"


  




  string
  string
  string




   
  

I hope it's clear what I am trying to accomplish and that someone can 
point me in the correct direction...

thank-you!