[flexcoders] Re: WebService timeout to Axis on Tomcat

2011-09-09 Thread pirvulescu_adrian


--- In flexcoders@yahoogroups.com, andrewwestberg andrewwestberg@... wrote:

 In my flex app, I keep getting a webservice fault after 30 seconds.
 I've set the requestTimeout property higher, but it doesn't seem to
 have an effect.  It only happens on a long-running webservice call
 that will most likely always take longer than 30 seconds.
 
 Is there some timeout happening on the server-side in Tomcat, or maybe
 in the lower-level HTTP request from flex? How can I debug this?
 
 Thanks,
 -Andrew



Any news on this... :)



[flexcoders] Re: WebService timeout to Axis on Tomcat

2011-09-09 Thread valdhor
Try setting the request timeout to zero.

Also, what is the actual fault that is returned? Add the following to your 
fault handler to find out...

Alert.show(fault.fault.faultString, fault.fault.faultCode.toString());

--- In flexcoders@yahoogroups.com, pirvulescu_adrian pirvulescu_adrian@... 
wrote:

 
 
 --- In flexcoders@yahoogroups.com, andrewwestberg andrewwestberg@ wrote:
 
  In my flex app, I keep getting a webservice fault after 30 seconds.
  I've set the requestTimeout property higher, but it doesn't seem to
  have an effect.  It only happens on a long-running webservice call
  that will most likely always take longer than 30 seconds.
  
  Is there some timeout happening on the server-side in Tomcat, or maybe
  in the lower-level HTTP request from flex? How can I debug this?
  
  Thanks,
  -Andrew
 
 
 
 Any news on this... :)





Re: [flexcoders] Re: Webservice Random Faults

2010-02-24 Thread ArunKumar Madas
I am afraid having to do that will defeat the purpose of having webservices
in place!
To me it alternately looks like having HTTPService with required params to a
CF page that queries the db and returns the data back (in your case its via
AMF using remoteObj).
In-case someone is looking for an answer -

  I spent a lot of time trying to dig through the framework api with debug
points everywhere. Its unfortunate, i was in a place where finding the cause
of the problem was a pain as the faults were not consistent and any code
changes cannot be tested without it being reproducible. I read in the
comments of this url - http://www.judahfrangipane.com/blog/?p=87 that
getting rid of fiddler sometimes avoids these errors. In my case these were
not the IO errors (#2032) as i receive the HTTP status codes fine 200 in the
response in fiddler. I just couldn't give a straight solution to get rid of
fiddler without the issue being reproducible.

 While i debugged through the framework, i figured out that error was
getting generated from mx.rpc.AsyncRequest.as (Line 62) and the
acknowledgement forwarded by fiddler has DSErrorHint set to true. This is
the catch to isolate why fiddler receives the HTTP status 200 fine (acting
as proxy) just that it doesn't reach through till flash player fine. One of
the QA Engineers reproduced the problem in-house and I have witnessed having
fiddler on (acting as proxy) causes the problem and turning it off gets rid
of it [I was really lucky to reproduce it, it was like one out of 30-40
operations faults]. Hard to even convince any one even now, but hope this
saves someones time.

Use network sniffers instead of http proxies for debugging.

~ Arun

On Mon, Feb 22, 2010 at 12:12 PM, valdhor valdhorli...@embarqmail.comwrote:



 I came across multiple problems using Flex's built-in SOAP decoder. Instead
 I created a SOAP client on my server that makes all the calls and then
 returns the data to Flex using AMF. This also gets around any cross domain
 issues. It works for me 100% of the time ;-}


 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
 ArunKumar Madas arun.fle...@... wrote:
 
  We have been encountering random SOAP Faults in our application.
 Definitely
  something is going wrong.
  We have a CF implementation for webservices (using coldspring) consumed
 by
  the flex application.
  The end users are randomly encountering Fault events. We are using FLEX
 SDK
  3.5
 
  Here are the details -
 
  faultCode = DecodingError
  faultString = SOAP Response cannot be decoded. Raw response: null
  faultDetail = null
 
  The same webservice call works 99% of the time. Randomly we encounter
 some
  faults.
  I have gone through this URL http://www.judahfrangipane.com/blog/?p=87and
  some others with no resolution.
 
  Monitoring the network SOAP packets using Fiddler, we get HTTP 200 OK
  response without any error.
  We enabled Flash Debug logging with all events to be logegd
  into flashLog.txt and we found that the fault is generated internal to
 the
  framework -
 
  Here are the details -
 
  2/17/2010 09:28:11.935 [INFO] mx.rpc.soap.Operation Creating SOAP
 Operation
  for getCacheUpdates
  2/17/2010 09:28:11.935 [DEBUG] mx.rpc.soap.Operation Invoking SOAP
 operation
  getCacheUpdates
  2/17/2010 09:28:11.935 [DEBUG] mx.rpc.soap.SOAPEncoder Encoding SOAP
 request
  envelope
  2/17/2010 09:28:11.945 [DEBUG] mx.rpc.soap.SOAPEncoder Encoding SOAP
 request
  body
  2/17/2010 09:28:11.945 [INFO] mx.messaging.Producer
  'E62FB659-260E-FDD0-479B-DC8AAF12EE52' producer sending message
  'FACB3D46-5745-E0B7-4F3C-DC8B26A9872C'
  2/17/2010 09:28:11.945 [DEBUG] mx.messaging.Channel 'direct_http_channel'
  channel sending message:
  (mx.messaging.messages::SOAPMessage)#0
  body = SOAP-ENV:Envelope xmlns:SOAP-ENV=
  http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsd=
  http://www.w3.org/2001/XMLSchema; xmlns:xsi=
  http://www.w3.org/2001/XMLSchema-instance;
  SOAP-ENV:Body SOAP-ENV:encodingStyle=
  http://schemas.xmlsoap.org/soap/encoding/;
  intf:getCacheUpdates xmlns:intf=http://webservices.com.webservices;
  adex xsi:type=xsd:stringlt;adexgt;
  lt;headergt;
  lt;statusgt;truelt;/statusgt;
  lt;operatorToken/gt;
  lt;terminalToken/gt;
  lt;/headergt;
  lt;bodygt;
  lt;data name=cacheStatus
  dataType=objectgt;lt;![CDATA[{park:02/16/2010 06:02:07
  PM,parkPass:01/01/2000 12:00:00 AM,country:02/16/2010 06:02:07
  PM,site:02/16/2010 06:02:07 PM,loop:02/16/2010 06:02:07
  PM,ticketType:02/16/2010 06:02:07 PM,discount:02/16/2010 06:02:07
  PM,location:02/16/2010 06:02:07 PM,equipment:02/16/2010 06:02:07
  PM,campground:02/17/2010 09:28:11 AM,asset:01/01/2000 12:00:00
  AM,state:02/16/2010 06:02:07 PM,retail:02/16/2010 06:02:07
  PM}]]gt;lt;/datagt;
  lt;data name=parkId
  dataType=numericgt;lt;![CDATA[511]]gt;lt;/datagt;
  lt;data name=locationId
  dataType=numericgt;lt;![CDATA[6558]]gt;lt;/datagt;
  lt;/bodygt;
  lt;/adexgt;/adex
  /intf:getCacheUpdates
  /SOAP-ENV:Body
  

[flexcoders] Re: Webservice Random Faults

2010-02-22 Thread valdhor
I came across multiple problems using Flex's built-in SOAP decoder. Instead I 
created a SOAP client on my server that makes all the calls and then returns 
the data to Flex using AMF. This also gets around any cross domain issues. It 
works for me 100% of the time ;-}

--- In flexcoders@yahoogroups.com, ArunKumar Madas arun.fle...@... wrote:

 We have been encountering random SOAP Faults in our application. Definitely
 something is going wrong.
 We have a CF implementation for webservices (using coldspring) consumed by
 the flex application.
 The end users are randomly encountering Fault events. We are using FLEX SDK
 3.5
 
 Here are the details -
 
  faultCode = DecodingError
  faultString = SOAP Response cannot be decoded. Raw response: null
  faultDetail = null
 
 The same webservice call works 99% of the time. Randomly we encounter some
 faults.
 I have gone through this URL http://www.judahfrangipane.com/blog/?p=87 and
 some others with no resolution.
 
 Monitoring the network SOAP packets using Fiddler, we get HTTP 200 OK
 response without any error.
 We enabled Flash Debug logging with all events to be logegd
 into flashLog.txt and we found that the fault is generated internal to the
 framework -
 
 Here are the details -
 
 2/17/2010 09:28:11.935 [INFO] mx.rpc.soap.Operation Creating SOAP Operation
 for getCacheUpdates
 2/17/2010 09:28:11.935 [DEBUG] mx.rpc.soap.Operation Invoking SOAP operation
 getCacheUpdates
 2/17/2010 09:28:11.935 [DEBUG] mx.rpc.soap.SOAPEncoder Encoding SOAP request
 envelope
 2/17/2010 09:28:11.945 [DEBUG] mx.rpc.soap.SOAPEncoder Encoding SOAP request
 body
 2/17/2010 09:28:11.945 [INFO] mx.messaging.Producer
 'E62FB659-260E-FDD0-479B-DC8AAF12EE52' producer sending message
 'FACB3D46-5745-E0B7-4F3C-DC8B26A9872C'
 2/17/2010 09:28:11.945 [DEBUG] mx.messaging.Channel 'direct_http_channel'
 channel sending message:
 (mx.messaging.messages::SOAPMessage)#0
   body = SOAP-ENV:Envelope xmlns:SOAP-ENV=
 http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsd=
 http://www.w3.org/2001/XMLSchema; xmlns:xsi=
 http://www.w3.org/2001/XMLSchema-instance;
   SOAP-ENV:Body SOAP-ENV:encodingStyle=
 http://schemas.xmlsoap.org/soap/encoding/;
 intf:getCacheUpdates xmlns:intf=http://webservices.com.webservices;
   adex xsi:type=xsd:stringlt;adexgt;
   lt;headergt;
 lt;statusgt;truelt;/statusgt;
 lt;operatorToken/gt;
 lt;terminalToken/gt;
   lt;/headergt;
   lt;bodygt;
 lt;data name=cacheStatus
 dataType=objectgt;lt;![CDATA[{park:02/16/2010 06:02:07
 PM,parkPass:01/01/2000 12:00:00 AM,country:02/16/2010 06:02:07
 PM,site:02/16/2010 06:02:07 PM,loop:02/16/2010 06:02:07
 PM,ticketType:02/16/2010 06:02:07 PM,discount:02/16/2010 06:02:07
 PM,location:02/16/2010 06:02:07 PM,equipment:02/16/2010 06:02:07
 PM,campground:02/17/2010 09:28:11 AM,asset:01/01/2000 12:00:00
 AM,state:02/16/2010 06:02:07 PM,retail:02/16/2010 06:02:07
 PM}]]gt;lt;/datagt;
 lt;data name=parkId
 dataType=numericgt;lt;![CDATA[511]]gt;lt;/datagt;
 lt;data name=locationId
 dataType=numericgt;lt;![CDATA[6558]]gt;lt;/datagt;
   lt;/bodygt;
 lt;/adexgt;/adex
 /intf:getCacheUpdates
   /SOAP-ENV:Body
 /SOAP-ENV:Envelope
   clientId = DirectHTTPChannel0
   contentType = text/xml; charset=utf-8
   destination = DefaultHTTP
   headers = (Object)#1
   httpHeaders = (Object)#2
 SOAPAction = 
   messageId = FACB3D46-5745-E0B7-4F3C-DC8B26A9872C
   method = POST
   recordHeaders = false
   timestamp = 0
   timeToLive = 0
   url = http://xyz/webservices/com/webservices/CachingWebServices.cfc;
 2/17/2010 09:28:12.505 [INFO] mx.messaging.Producer
 'E62FB659-260E-FDD0-479B-DC8AAF12EE52' producer acknowledge of
 'FACB3D46-5745-E0B7-4F3C-DC8B26A9872C'.
 *2/17/2010 09:28:12.505 [ERROR] mx.messaging.Producer
 'E62FB659-260E-FDD0-479B-DC8AAF12EE52' producer fault for
 'FACB3D46-5745-E0B7-4F3C-DC8B26A9872C'.*
 **
 *Its actually getting generated from Line 710 of
 mx.messaging.MessageAgent.as*
 **
 **
 *Here is the RAW Response in the fiddler (HTTP 200 OK)*
 
 HTTP/1.1 200 OK
 Connection: close
 Date: Wed, 17 Feb 2010 15:22:46 GMT
 Content-Type: text/xml; charset=utf-8
 Server: Microsoft-IIS/6.0
 PICS-Label: (PICS-1.0 http://www.rsac.org/ratingsv01.html; l on
 2009.11.13T12:51-0600 exp 2015.11.13T12:00-0600 r (v 0 s 0 n 0 l 0))
 X-Powered-By: ASP.NET
 Vary: Accept-Encoding
 Set-Cookie: Coyote-2-a0305b5=a030548:0; path=/
 Content-Length: 1345
 
 ?xml version=1.0 encoding=utf-8?soapenv:Envelope xmlns:soapenv=
 http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsd=
 http://www.w3.org/2001/XMLSchema; xmlns:xsi=
 http://www.w3.org/2001/XMLSchema-instance;
  soapenv:Body
   ns1:getCacheUpdatesResponse soapenv:encodingStyle=
 http://schemas.xmlsoap.org/soap/encoding/; xmlns:ns1=
 http://webservices.com.webservices;
getCacheUpdatesReturn xsi:type=soapenc:string xmlns:soapenc=
 http://schemas.xmlsoap.org/soap/encoding/;lt;?xmlhttp://schemas.xmlsoap.org/soap/encoding/%22%3Elt;?xmlversion=quot;1.0quot;
 

[flexcoders] Re: WebService Payload Truncated (#2006 Out of Bounds Error) on Send in Gumbo

2009-08-19 Thread michaelisraelcaplan
I've been looking at this problem for just about a day straight now, and just 
can't see why I'm getting an out of bounds error on send.  I've tried updated 
to the latest Gumbo nightly (9377), which no luck.  

My code to launch the WebService call looks like this:


_calibrationData = new ByteArray();
var stream:FileStream = new FileStream();
stream.open(file, FileMode.READ);
stream.readBytes(_calibrationData, 0, stream.bytesAvailable);

var token:AsyncToken = this._service.mLoadCalibration(file.name, 
_calibrationData);
token.addResponder(this._mLoadCalibrationResponder);


Which seems to be a-okay.  Or, am I missing something obvious?


I'm pretty sure I've hit up against a SDK bug. I've opened a bug report with 
Adobe, to track this issue at http://bugs.adobe.com/jira/browse/SDK-22751


Anyone else transferring large (1MB) base64 encoded data using the Flex 
webservice client?


Any feedback highly welcome!

Thanks,

Mike




[flexcoders] Re: WebService Payload Truncated (#2006 Out of Bounds Error) on Send in Gumbo

2009-08-19 Thread valdhor
I wonder if you have hit a windows limitation. This article may give you some 
ideas...

http://blogs.msdn.com/drnick/archive/2006/03/10/547568.aspx


--- In flexcoders@yahoogroups.com, michaelisraelcaplan mcap...@... wrote:

 I've been looking at this problem for just about a day straight now, and just 
 can't see why I'm getting an out of bounds error on send.  I've tried updated 
 to the latest Gumbo nightly (9377), which no luck.  
 
 My code to launch the WebService call looks like this:
 
 
 _calibrationData = new ByteArray();
 var stream:FileStream = new FileStream();
 stream.open(file, FileMode.READ);
 stream.readBytes(_calibrationData, 0, stream.bytesAvailable);
 
 var token:AsyncToken = this._service.mLoadCalibration(file.name, 
 _calibrationData);
 token.addResponder(this._mLoadCalibrationResponder);
 
 
 Which seems to be a-okay.  Or, am I missing something obvious?
 
 
 I'm pretty sure I've hit up against a SDK bug. I've opened a bug report with 
 Adobe, to track this issue at http://bugs.adobe.com/jira/browse/SDK-22751
 
 
 Anyone else transferring large (1MB) base64 encoded data using the Flex 
 webservice client?
 
 
 Any feedback highly welcome!
 
 Thanks,
 
 Mike





[flexcoders] Re: WebService Payload Truncated (#2006 Out of Bounds Error) on Send in Gumbo

2009-08-19 Thread michaelisraelcaplan
Interesting point.  I tried truncating my byte array down to 60KB, I still got 
the out of bounds fault.  However, if i drop the byte array down to 10KB, no 
out of bounds error.

Somewhere between the two (60KB and 10KB) is the breaking point.  I've read 
through the article you referenced (thanks for the link!), but still don't see 
what quota parameter Flex would be blowing.  Are we talking 
MaxReceivedMessageSize?


The other interesting thing is that I'm seeing much greater volume than 60KB 
being transmitted to the SOAP server when inspecting incoming data server side 
using Wireshark.  If this is a quota violation being triggered, how would it 
enforce on the packet data?  Would some of it be dropped?  Maybe everything 
following the violation?

Thanks,

Mike


--- In flexcoders@yahoogroups.com, valdhor valdhorli...@... wrote:

 I wonder if you have hit a windows limitation. This article may give you some 
 ideas...
 
 http://blogs.msdn.com/drnick/archive/2006/03/10/547568.aspx
 
 
 --- In flexcoders@yahoogroups.com, michaelisraelcaplan mcaplan@ wrote:
 
  I've been looking at this problem for just about a day straight now, and 
  just can't see why I'm getting an out of bounds error on send.  I've tried 
  updated to the latest Gumbo nightly (9377), which no luck.  
  
  My code to launch the WebService call looks like this:
  
  
  _calibrationData = new ByteArray();
  var stream:FileStream = new FileStream();
  stream.open(file, FileMode.READ);
  stream.readBytes(_calibrationData, 0, stream.bytesAvailable);
  
  var token:AsyncToken = this._service.mLoadCalibration(file.name, 
  _calibrationData);
  token.addResponder(this._mLoadCalibrationResponder);
  
  
  Which seems to be a-okay.  Or, am I missing something obvious?
  
  
  I'm pretty sure I've hit up against a SDK bug. I've opened a bug report 
  with Adobe, to track this issue at 
  http://bugs.adobe.com/jira/browse/SDK-22751
  
  
  Anyone else transferring large (1MB) base64 encoded data using the Flex 
  webservice client?
  
  
  Any feedback highly welcome!
  
  Thanks,
  
  Mike
 





[flexcoders] Re: WebService Payload Truncated (#2006 Out of Bounds Error) on Send in Gumbo

2009-08-19 Thread michaelisraelcaplan
Ah, MaxReceivedMessageSize is not a Windows limit,per se, but a Windows WCF 
limit that is programatically controlled by the SOAP server.  That shouldn't be 
a factor with the out of bounds fault?


--- In flexcoders@yahoogroups.com, michaelisraelcaplan mcap...@... wrote:

 Interesting point.  I tried truncating my byte array down to 60KB, I still 
 got the out of bounds fault.  However, if i drop the byte array down to 
 10KB, no out of bounds error.
 
 Somewhere between the two (60KB and 10KB) is the breaking point.  I've read 
 through the article you referenced (thanks for the link!), but still don't 
 see what quota parameter Flex would be blowing.  Are we talking 
 MaxReceivedMessageSize?
 
 
 The other interesting thing is that I'm seeing much greater volume than 60KB 
 being transmitted to the SOAP server when inspecting incoming data server 
 side using Wireshark.  If this is a quota violation being triggered, how 
 would it enforce on the packet data?  Would some of it be dropped?  Maybe 
 everything following the violation?
 
 Thanks,
 
 Mike
 
 
 --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote:
 
  I wonder if you have hit a windows limitation. This article may give you 
  some ideas...
  
  http://blogs.msdn.com/drnick/archive/2006/03/10/547568.aspx
  
  
  --- In flexcoders@yahoogroups.com, michaelisraelcaplan mcaplan@ wrote:
  
   I've been looking at this problem for just about a day straight now, and 
   just can't see why I'm getting an out of bounds error on send.  I've 
   tried updated to the latest Gumbo nightly (9377), which no luck.  
   
   My code to launch the WebService call looks like this:
   
   
   _calibrationData = new ByteArray();
   var stream:FileStream = new FileStream();
   stream.open(file, FileMode.READ);
   stream.readBytes(_calibrationData, 0, stream.bytesAvailable);
   
   var token:AsyncToken = this._service.mLoadCalibration(file.name, 
   _calibrationData);
   token.addResponder(this._mLoadCalibrationResponder);
   
   
   Which seems to be a-okay.  Or, am I missing something obvious?
   
   
   I'm pretty sure I've hit up against a SDK bug. I've opened a bug report 
   with Adobe, to track this issue at 
   http://bugs.adobe.com/jira/browse/SDK-22751
   
   
   Anyone else transferring large (1MB) base64 encoded data using the Flex 
   webservice client?
   
   
   Any feedback highly welcome!
   
   Thanks,
   
   Mike
  
 





[flexcoders] Re: WebService Payload Truncated (#2006 Out of Bounds Error) on Send in Gumbo

2009-08-19 Thread valdhor
I wonder if it's the actual size or whether there is something in the data that 
it doesn't like. Could you try a different portion of the data (Say between the 
60K point and 120K ?).


--- In flexcoders@yahoogroups.com, michaelisraelcaplan mcap...@... wrote:

 Ah, MaxReceivedMessageSize is not a Windows limit,per se, but a Windows WCF 
 limit that is programatically controlled by the SOAP server.  That shouldn't 
 be a factor with the out of bounds fault?
 
 
 --- In flexcoders@yahoogroups.com, michaelisraelcaplan mcaplan@ wrote:
 
  Interesting point.  I tried truncating my byte array down to 60KB, I still 
  got the out of bounds fault.  However, if i drop the byte array down to 
  10KB, no out of bounds error.
  
  Somewhere between the two (60KB and 10KB) is the breaking point.  I've read 
  through the article you referenced (thanks for the link!), but still don't 
  see what quota parameter Flex would be blowing.  Are we talking 
  MaxReceivedMessageSize?
  
  
  The other interesting thing is that I'm seeing much greater volume than 
  60KB being transmitted to the SOAP server when inspecting incoming data 
  server side using Wireshark.  If this is a quota violation being triggered, 
  how would it enforce on the packet data?  Would some of it be dropped?  
  Maybe everything following the violation?
  
  Thanks,
  
  Mike
  
  
  --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote:
  
   I wonder if you have hit a windows limitation. This article may give you 
   some ideas...
   
   http://blogs.msdn.com/drnick/archive/2006/03/10/547568.aspx
   
   
   --- In flexcoders@yahoogroups.com, michaelisraelcaplan mcaplan@ wrote:
   
I've been looking at this problem for just about a day straight now, 
and just can't see why I'm getting an out of bounds error on send.  
I've tried updated to the latest Gumbo nightly (9377), which no luck.  

My code to launch the WebService call looks like this:


_calibrationData = new ByteArray();
var stream:FileStream = new FileStream();
stream.open(file, FileMode.READ);
stream.readBytes(_calibrationData, 0, stream.bytesAvailable);

var token:AsyncToken = this._service.mLoadCalibration(file.name, 
_calibrationData);
token.addResponder(this._mLoadCalibrationResponder);


Which seems to be a-okay.  Or, am I missing something obvious?


I'm pretty sure I've hit up against a SDK bug. I've opened a bug report 
with Adobe, to track this issue at 
http://bugs.adobe.com/jira/browse/SDK-22751


Anyone else transferring large (1MB) base64 encoded data using the 
Flex webservice client?


Any feedback highly welcome!

Thanks,

Mike
   
  
 





[flexcoders] Re: Webservice with Dynamic request?

2009-02-09 Thread valdhor
This is how I would do it. You should be able to extrapolate it to your
requirements:

?xml version=1.0?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
creationComplete=onCreationComplete()
 mx:Script
 ![CDATA[
 import mx.controls.Alert;
 import mx.rpc.events.ResultEvent;
 import mx.rpc.events.FaultEvent;
 import mx.rpc.soap.mxml.*;

 private var ws:mx.rpc.soap.mxml.WebService;
 private var searchcriteria:Object = new Object();

 public function onCreationComplete():void
 {
 ws = new mx.rpc.soap.mxml.WebService();
 ws.endpointURI = http://myserver.com/WebService;;
 ws.loadWSDL(http://myserver.com/MyWebService.wsdl;);
 ws.addEventListener(FaultEvent.FAULT, faultHandler);
 ws.addEventListener(ResultEvent.RESULT, resultHandler);
 }

 public function resultHandler(event:ResultEvent):void
 {
 Alert.show(event.result as String);
 }
 public function faultHandler(event:FaultEvent):void
 {
 Alert.show(event.fault.faultString);
 }

 public function doSubmit():void
 {
 searchcriteria.title = title.text;
 searchcriteria.item = item.text;
 searchcriteria.criteria = criteria.text;

 ws.getSearchDetails(searchcriteria);
 }
 ]]
 /mx:Script
 mx:Form
 mx:FormItem label=Title: fontWeight=bold
 mx:TextInput id=title width=300/
 /mx:FormItem
 mx:FormItem label=Item: fontWeight=bold
 mx:TextInput id=item width=300/
 /mx:FormItem
 mx:FormItem label=Criteria: fontWeight=bold
 mx:TextInput id=criteria width=300/
 /mx:FormItem
 /mx:Form
 mx:Button label=Submit click=doSubmit()/
/mx:Application



--- In flexcoders@yahoogroups.com, thibodeau.alain
thibodeau.al...@... wrote:

 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
 = criterialistsearchcriteriatitlestring/titleitemstring/it
 emcriteriastring/criteria/searchcriteria/criterialist;

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

 mx:WebService id=webService wsdl=myservice
   mx:operation name=SearchParams
 result=getSearchDetails_result(event) fault=getSearchDetails_fault
 (event)
 mx:request xmlns=schema
 !-- This has to be dynamic depending
 on how many search params were given by user--
 criterialist
searchcriteria
  titlestring/title
  itemstring/item
  criteriastring/criteria
/searchcriteria
/criterialist
 !
  /mx:request
 /mx:operation
  /mx:WebService

 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] Re: WebService returning results, but event.result is null

2009-01-19 Thread Jeff Tapper
Interestingly enough, setting the resultFormat to e4x does indeed properly
populate the event.result.  I'm guessing this has got to be some sort of
parsing error in the WebService classes attempts to marshal the results as
objects.  Has anyone else run across this issue?  

 

 

 



Jeff Tapper Senior Consultant

digital primates IT Consulting Group R

Phone: 847.824.7800, x222 | Fax: 847.655.2867

jtap...@digitalprimates.net

 

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Tracy Spratt
Sent: Friday, January 16, 2009 5:59 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: WebService returning results, but event.result
is null

 

Something like:

proxy.find.resultFormat = e4x;

 

Tracy Spratt 
Lariat Services 

Flex development bandwidth available 

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Jeff Tapper
Sent: Friday, January 16, 2009 5:49 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: WebService returning results, but event.result
is null

 

Ok,so, given  im making a call like this:

 

 

public function getMediaItems(eventId:Number):AsyncToken{

  var req:Object = new Object();

  req['event-id'] = eventId;

  var token:AsyncToken = proxy.find(req);

  token.addResponder(responder);

  return token;

}

 

How do I get a handle on the operation? (in this case, it's the find method
of my service, proxy.

 



Jeff Tapper Senior Consultant

digital primates IT Consulting Group R

Phone: 847.824.7800, x222 | Fax: 847.655.2867

jtap...@digitalprimates.net

 

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Tracy Spratt
Sent: Friday, January 16, 2009 5:31 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: WebService returning results, but event.result
is null

 

Well, actually it is at the operation/method level.  The default is
object, which converts your soap xml into a tree of dynamic objects, and
this has some issues.

 

Change it to e4x, which will preserve the xml, to see if the behavior
changes.

 

Tracy Spratt 
Lariat Services 

Flex development bandwidth available 

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Jeff Tapper
Sent: Friday, January 16, 2009 5:20 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: WebService returning results, but event.result
is null

 

I don't believe the mx.rpc.soap.WebService class has a resultFormat
property, but, if it does, im using its default.  I've only seen that
property on HTTPService, not  WebService

 



Jeff Tapper Senior Consultant

digital primates IT Consulting Group R

Phone: 847.824.7800, x222 | Fax: 847.655.2867

jtap...@digitalprimates.net

 

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Tracy Spratt
Sent: Friday, January 16, 2009 3:41 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: WebService returning results, but event.result
is null

 

And what is your resultFormat?

 

Tracy Spratt 
Lariat Services 

Flex development bandwidth available 

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of valdhor
Sent: Friday, January 16, 2009 3:18 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: WebService returning results, but event.result is
null

 

HmCould you post the Soap response.

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ,
Jeff Tapper j...@... wrote:

 Oddly enough, I'm getting a ResultEvent, no faults at all.
 
 
 
 
 
 Jeff Tapper Senior Consultant
 
 digital primates IT Consulting Group R
 
 Phone: 847.824.7800, x222 | Fax: 847.655.2867
 
 jtap...@...
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ]
On
 Behalf Of valdhor
 Sent: Friday, January 16, 2009 2:00 PM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] Re: WebService returning results, but
event.result is
 null
 
 
 
 Are you getting a faultevent or a SoapFault?
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
mailto:flexcoders%40yahoogroups.com ,
 Jeff Tapper jeff@ wrote:
 
  Has anyone dealt with situations where a webservice call is indeed
  completing properly, and the results can be seen in service capture,
 and the
  raw SOAP can be seen in event.message.body, but yet the
event.result is
  coming through null?
  
  
  
  I'm battling that very issue now. Any advice or words of wisdom?


 



RE: [flexcoders] Re: WebService returning results, but event.result is null

2009-01-19 Thread Tracy Spratt
Not specifically.  But the default object conversion is the source of
*many* problems.  It is a quick way to display data, but that is about
all.  I don't see how, even theoretically, that a single algorithm could
handle any arbitrary XML input and produce a reliable, predicatable
object tree.  And dynamic objects can have poor access performance, and
the object tree does not provide e4x expressions for manipulation.  Ease
of use is its only benefit.

 

I steer folks away from it any chance I get.

Tracy Spratt 
Lariat Services 

Flex development bandwidth available 



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Jeff Tapper
Sent: Monday, January 19, 2009 12:51 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: WebService returning results, but
event.result is null

 

Interestingly enough, setting the resultFormat to e4x does indeed
properly populate the event.result.  I'm guessing this has got to be
some sort of parsing error in the WebService classes attempts to marshal
the results as objects.  Has anyone else run across this issue?  

 

 

 



Jeff Tapper Senior Consultant

digital primates IT Consulting Group (r)

Phone: 847.824.7800, x222 | Fax: 847.655.2867

jtap...@digitalprimates.net

 

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Tracy Spratt
Sent: Friday, January 16, 2009 5:59 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: WebService returning results, but
event.result is null

 

Something like:

proxy.find.resultFormat = e4x;

 

Tracy Spratt 
Lariat Services 

Flex development bandwidth available 



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Jeff Tapper
Sent: Friday, January 16, 2009 5:49 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: WebService returning results, but
event.result is null

 

Ok,so, given  im making a call like this:

 

 

public function getMediaItems(eventId:Number):AsyncToken{

  var req:Object = new Object();

  req['event-id'] = eventId;

  var token:AsyncToken = proxy.find(req);

  token.addResponder(responder);

  return token;

}

 

How do I get a handle on the operation? (in this case, it's the find
method of my service, proxy.

 



Jeff Tapper Senior Consultant

digital primates IT Consulting Group (r)

Phone: 847.824.7800, x222 | Fax: 847.655.2867

jtap...@digitalprimates.net

 

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Tracy Spratt
Sent: Friday, January 16, 2009 5:31 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: WebService returning results, but
event.result is null

 

Well, actually it is at the operation/method level.  The default is
object, which converts your soap xml into a tree of dynamic objects,
and this has some issues.

 

Change it to e4x, which will preserve the xml, to see if the behavior
changes.

 

Tracy Spratt 
Lariat Services 

Flex development bandwidth available 



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Jeff Tapper
Sent: Friday, January 16, 2009 5:20 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: WebService returning results, but
event.result is null

 

I don't believe the mx.rpc.soap.WebService class has a resultFormat
property, but, if it does, im using its default.  I've only seen that
property on HTTPService, not  WebService

 



Jeff Tapper Senior Consultant

digital primates IT Consulting Group (r)

Phone: 847.824.7800, x222 | Fax: 847.655.2867

jtap...@digitalprimates.net

 

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Tracy Spratt
Sent: Friday, January 16, 2009 3:41 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: WebService returning results, but
event.result is null

 

And what is your resultFormat?

 

Tracy Spratt 
Lariat Services 

Flex development bandwidth available 



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of valdhor
Sent: Friday, January 16, 2009 3:18 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: WebService returning results, but event.result
is null

 

HmCould you post the Soap response.

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, Jeff Tapper j...@... wrote:

 Oddly enough, I'm getting a ResultEvent, no faults at all.
 
 
 
 
 
 Jeff Tapper Senior Consultant
 
 digital primates IT Consulting Group R
 
 Phone: 847.824.7800, x222 | Fax: 847.655.2867
 
 jtap...@...
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders

[flexcoders] Re: WebService returning results, but event.result is null

2009-01-16 Thread valdhor
Are you getting a faultevent or a SoapFault?


--- In flexcoders@yahoogroups.com, Jeff Tapper j...@... wrote:

 Has anyone dealt with situations where a webservice call is indeed
 completing properly, and the results can be seen in service capture,
and the
 raw SOAP can be seen in event.message.body, but yet the event.result is
 coming through null?
 
  
 
 I'm battling that very issue now.  Any advice or words of wisdom?




RE: [flexcoders] Re: WebService returning results, but event.result is null

2009-01-16 Thread Jeff Tapper
Oddly enough, I'm getting a ResultEvent, no faults at all.

 



Jeff Tapper Senior Consultant

digital primates IT Consulting Group R

Phone: 847.824.7800, x222 | Fax: 847.655.2867

jtap...@digitalprimates.net

 

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of valdhor
Sent: Friday, January 16, 2009 2:00 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: WebService returning results, but event.result is
null

 

Are you getting a faultevent or a SoapFault?

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ,
Jeff Tapper j...@... wrote:

 Has anyone dealt with situations where a webservice call is indeed
 completing properly, and the results can be seen in service capture,
and the
 raw SOAP can be seen in event.message.body, but yet the event.result is
 coming through null?
 
 
 
 I'm battling that very issue now. Any advice or words of wisdom?

 



[flexcoders] Re: WebService returning results, but event.result is null

2009-01-16 Thread valdhor
HmCould you post the Soap response.


--- In flexcoders@yahoogroups.com, Jeff Tapper j...@... wrote:

 Oddly enough, I'm getting a ResultEvent, no faults at all.
 
  
 
 
 
 Jeff Tapper Senior Consultant
 
 digital primates IT Consulting Group R
 
 Phone: 847.824.7800, x222 | Fax: 847.655.2867
 
 jtap...@...
 
  
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
 Behalf Of valdhor
 Sent: Friday, January 16, 2009 2:00 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: WebService returning results, but
event.result is
 null
 
  
 
 Are you getting a faultevent or a SoapFault?
 
 --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com ,
 Jeff Tapper jeff@ wrote:
 
  Has anyone dealt with situations where a webservice call is indeed
  completing properly, and the results can be seen in service capture,
 and the
  raw SOAP can be seen in event.message.body, but yet the
event.result is
  coming through null?
  
  
  
  I'm battling that very issue now. Any advice or words of wisdom?





RE: [flexcoders] Re: WebService returning results, but event.result is null

2009-01-16 Thread Tracy Spratt
And what is your resultFormat?

 

Tracy Spratt 
Lariat Services 

Flex development bandwidth available 



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of valdhor
Sent: Friday, January 16, 2009 3:18 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: WebService returning results, but event.result
is null

 

HmCould you post the Soap response.

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, Jeff Tapper j...@... wrote:

 Oddly enough, I'm getting a ResultEvent, no faults at all.
 
 
 
 
 
 Jeff Tapper Senior Consultant
 
 digital primates IT Consulting Group R
 
 Phone: 847.824.7800, x222 | Fax: 847.655.2867
 
 jtap...@...
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] On
 Behalf Of valdhor
 Sent: Friday, January 16, 2009 2:00 PM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] Re: WebService returning results, but
event.result is
 null
 
 
 
 Are you getting a faultevent or a SoapFault?
 
 --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
mailto:flexcoders%40yahoogroups.com ,
 Jeff Tapper jeff@ wrote:
 
  Has anyone dealt with situations where a webservice call is indeed
  completing properly, and the results can be seen in service capture,
 and the
  raw SOAP can be seen in event.message.body, but yet the
event.result is
  coming through null?
  
  
  
  I'm battling that very issue now. Any advice or words of wisdom?


 



RE: [flexcoders] Re: WebService returning results, but event.result is null

2009-01-16 Thread Jeff Tapper
I don't believe the mx.rpc.soap.WebService class has a resultFormat
property, but, if it does, im using its default.  I've only seen that
property on HTTPService, not  WebService

 



Jeff Tapper Senior Consultant

digital primates IT Consulting Group R

Phone: 847.824.7800, x222 | Fax: 847.655.2867

jtap...@digitalprimates.net

 

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Tracy Spratt
Sent: Friday, January 16, 2009 3:41 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: WebService returning results, but event.result
is null

 

And what is your resultFormat?

 

Tracy Spratt 
Lariat Services 

Flex development bandwidth available 

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of valdhor
Sent: Friday, January 16, 2009 3:18 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: WebService returning results, but event.result is
null

 

HmCould you post the Soap response.

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ,
Jeff Tapper j...@... wrote:

 Oddly enough, I'm getting a ResultEvent, no faults at all.
 
 
 
 
 
 Jeff Tapper Senior Consultant
 
 digital primates IT Consulting Group R
 
 Phone: 847.824.7800, x222 | Fax: 847.655.2867
 
 jtap...@...
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ]
On
 Behalf Of valdhor
 Sent: Friday, January 16, 2009 2:00 PM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] Re: WebService returning results, but
event.result is
 null
 
 
 
 Are you getting a faultevent or a SoapFault?
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
mailto:flexcoders%40yahoogroups.com ,
 Jeff Tapper jeff@ wrote:
 
  Has anyone dealt with situations where a webservice call is indeed
  completing properly, and the results can be seen in service capture,
 and the
  raw SOAP can be seen in event.message.body, but yet the
event.result is
  coming through null?
  
  
  
  I'm battling that very issue now. Any advice or words of wisdom?


 



RE: [flexcoders] Re: WebService returning results, but event.result is null

2009-01-16 Thread Tracy Spratt
Well, actually it is at the operation/method level.  The default is
object, which converts your soap xml into a tree of dynamic objects,
and this has some issues.

 

Change it to e4x, which will preserve the xml, to see if the behavior
changes.

 

Tracy Spratt 
Lariat Services 

Flex development bandwidth available 



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Jeff Tapper
Sent: Friday, January 16, 2009 5:20 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: WebService returning results, but
event.result is null

 

I don't believe the mx.rpc.soap.WebService class has a resultFormat
property, but, if it does, im using its default.  I've only seen that
property on HTTPService, not  WebService

 



Jeff Tapper Senior Consultant

digital primates IT Consulting Group (r)

Phone: 847.824.7800, x222 | Fax: 847.655.2867

jtap...@digitalprimates.net

 

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Tracy Spratt
Sent: Friday, January 16, 2009 3:41 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: WebService returning results, but
event.result is null

 

And what is your resultFormat?

 

Tracy Spratt 
Lariat Services 

Flex development bandwidth available 



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of valdhor
Sent: Friday, January 16, 2009 3:18 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: WebService returning results, but event.result
is null

 

HmCould you post the Soap response.

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, Jeff Tapper j...@... wrote:

 Oddly enough, I'm getting a ResultEvent, no faults at all.
 
 
 
 
 
 Jeff Tapper Senior Consultant
 
 digital primates IT Consulting Group R
 
 Phone: 847.824.7800, x222 | Fax: 847.655.2867
 
 jtap...@...
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] On
 Behalf Of valdhor
 Sent: Friday, January 16, 2009 2:00 PM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] Re: WebService returning results, but
event.result is
 null
 
 
 
 Are you getting a faultevent or a SoapFault?
 
 --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
mailto:flexcoders%40yahoogroups.com ,
 Jeff Tapper jeff@ wrote:
 
  Has anyone dealt with situations where a webservice call is indeed
  completing properly, and the results can be seen in service capture,
 and the
  raw SOAP can be seen in event.message.body, but yet the
event.result is
  coming through null?
  
  
  
  I'm battling that very issue now. Any advice or words of wisdom?


 



[flexcoders] Re: WebService returning results, but event.result is null

2009-01-16 Thread valdhor
The operation does and I believe it defaults to object.

It has to be something simple. Have you checked the parameter on the
resultEvent function? Maybe you have E and are calling e.result?

I'm grasping at straws here. I have never seen event.result as null.
Does WebService have an event.lastresult?


--- In flexcoders@yahoogroups.com, Jeff Tapper j...@... wrote:

 I don't believe the mx.rpc.soap.WebService class has a resultFormat
 property, but, if it does, im using its default.  I've only seen that
 property on HTTPService, not  WebService
 
  
 
 
 
 Jeff Tapper Senior Consultant
 
 digital primates IT Consulting Group R
 
 Phone: 847.824.7800, x222 | Fax: 847.655.2867
 
 jtap...@...
 
  
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
 Behalf Of Tracy Spratt
 Sent: Friday, January 16, 2009 3:41 PM
 To: flexcoders@yahoogroups.com
 Subject: RE: [flexcoders] Re: WebService returning results, but
event.result
 is null
 
  
 
 And what is your resultFormat?
 
  
 
 Tracy Spratt 
 Lariat Services 
 
 Flex development bandwidth available 
 
   _  
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
 Behalf Of valdhor
 Sent: Friday, January 16, 2009 3:18 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: WebService returning results, but
event.result is
 null
 
  
 
 HmCould you post the Soap response.
 
 --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com ,
 Jeff Tapper jeff@ wrote:
 
  Oddly enough, I'm getting a ResultEvent, no faults at all.
  
  
  
  
  
  Jeff Tapper Senior Consultant
  
  digital primates IT Consulting Group R
  
  Phone: 847.824.7800, x222 | Fax: 847.655.2867
  
  jtapper@
  
  
  
  From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 [mailto:flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com ]
 On
  Behalf Of valdhor
  Sent: Friday, January 16, 2009 2:00 PM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
  Subject: [flexcoders] Re: WebService returning results, but
 event.result is
  null
  
  
  
  Are you getting a faultevent or a SoapFault?
  
  --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
 mailto:flexcoders%40yahoogroups.com ,
  Jeff Tapper jeff@ wrote:
  
   Has anyone dealt with situations where a webservice call is indeed
   completing properly, and the results can be seen in service capture,
  and the
   raw SOAP can be seen in event.message.body, but yet the
 event.result is
   coming through null?
   
   
   
   I'm battling that very issue now. Any advice or words of wisdom?
 





RE: [flexcoders] Re: WebService returning results, but event.result is null

2009-01-16 Thread Jeff Tapper
Nothing so simple as that,  god, I wish it was that easy.

 



Jeff Tapper Senior Consultant

digital primates IT Consulting Group R

Phone: 847.824.7800, x222 | Fax: 847.655.2867

jtap...@digitalprimates.net

 

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of valdhor
Sent: Friday, January 16, 2009 5:32 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: WebService returning results, but event.result is
null

 

The operation does and I believe it defaults to object.

It has to be something simple. Have you checked the parameter on the
resultEvent function? Maybe you have E and are calling e.result?

I'm grasping at straws here. I have never seen event.result as null.
Does WebService have an event.lastresult?

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ,
Jeff Tapper j...@... wrote:

 I don't believe the mx.rpc.soap.WebService class has a resultFormat
 property, but, if it does, im using its default. I've only seen that
 property on HTTPService, not WebService
 
 
 
 
 
 Jeff Tapper Senior Consultant
 
 digital primates IT Consulting Group R
 
 Phone: 847.824.7800, x222 | Fax: 847.655.2867
 
 jtap...@...
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ]
On
 Behalf Of Tracy Spratt
 Sent: Friday, January 16, 2009 3:41 PM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: RE: [flexcoders] Re: WebService returning results, but
event.result
 is null
 
 
 
 And what is your resultFormat?
 
 
 
 Tracy Spratt 
 Lariat Services 
 
 Flex development bandwidth available 
 
 _ 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ]
On
 Behalf Of valdhor
 Sent: Friday, January 16, 2009 3:18 PM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] Re: WebService returning results, but
event.result is
 null
 
 
 
 HmCould you post the Soap response.
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
mailto:flexcoders%40yahoogroups.com ,
 Jeff Tapper jeff@ wrote:
 
  Oddly enough, I'm getting a ResultEvent, no faults at all.
  
  
  
  
  
  Jeff Tapper Senior Consultant
  
  digital primates IT Consulting Group R
  
  Phone: 847.824.7800, x222 | Fax: 847.655.2867
  
  jtapper@
  
  
  
  From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com
 [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
mailto:flexcoders%40yahoogroups.com ]
 On
  Behalf Of valdhor
  Sent: Friday, January 16, 2009 2:00 PM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
  Subject: [flexcoders] Re: WebService returning results, but
 event.result is
  null
  
  
  
  Are you getting a faultevent or a SoapFault?
  
  --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
mailto:flexcoders%40yahoogroups.com 
 mailto:flexcoders%40yahoogroups.com ,
  Jeff Tapper jeff@ wrote:
  
   Has anyone dealt with situations where a webservice call is indeed
   completing properly, and the results can be seen in service capture,
  and the
   raw SOAP can be seen in event.message.body, but yet the
 event.result is
   coming through null?
   
   
   
   I'm battling that very issue now. Any advice or words of wisdom?
 


 



RE: [flexcoders] Re: WebService returning results, but event.result is null

2009-01-16 Thread Jeff Tapper
Ok,so, given  im making a call like this:

 

 

public function getMediaItems(eventId:Number):AsyncToken{

  var req:Object = new Object();

  req['event-id'] = eventId;

  var token:AsyncToken = proxy.find(req);

  token.addResponder(responder);

  return token;

}

 

How do I get a handle on the operation? (in this case, it's the find method
of my service, proxy.

 



Jeff Tapper Senior Consultant

digital primates IT Consulting Group R

Phone: 847.824.7800, x222 | Fax: 847.655.2867

jtap...@digitalprimates.net

 

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Tracy Spratt
Sent: Friday, January 16, 2009 5:31 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: WebService returning results, but event.result
is null

 

Well, actually it is at the operation/method level.  The default is
object, which converts your soap xml into a tree of dynamic objects, and
this has some issues.

 

Change it to e4x, which will preserve the xml, to see if the behavior
changes.

 

Tracy Spratt 
Lariat Services 

Flex development bandwidth available 

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Jeff Tapper
Sent: Friday, January 16, 2009 5:20 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: WebService returning results, but event.result
is null

 

I don't believe the mx.rpc.soap.WebService class has a resultFormat
property, but, if it does, im using its default.  I've only seen that
property on HTTPService, not  WebService

 



Jeff Tapper Senior Consultant

digital primates IT Consulting Group R

Phone: 847.824.7800, x222 | Fax: 847.655.2867

jtap...@digitalprimates.net

 

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Tracy Spratt
Sent: Friday, January 16, 2009 3:41 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: WebService returning results, but event.result
is null

 

And what is your resultFormat?

 

Tracy Spratt 
Lariat Services 

Flex development bandwidth available 

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of valdhor
Sent: Friday, January 16, 2009 3:18 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: WebService returning results, but event.result is
null

 

HmCould you post the Soap response.

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ,
Jeff Tapper j...@... wrote:

 Oddly enough, I'm getting a ResultEvent, no faults at all.
 
 
 
 
 
 Jeff Tapper Senior Consultant
 
 digital primates IT Consulting Group R
 
 Phone: 847.824.7800, x222 | Fax: 847.655.2867
 
 jtap...@...
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ]
On
 Behalf Of valdhor
 Sent: Friday, January 16, 2009 2:00 PM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] Re: WebService returning results, but
event.result is
 null
 
 
 
 Are you getting a faultevent or a SoapFault?
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
mailto:flexcoders%40yahoogroups.com ,
 Jeff Tapper jeff@ wrote:
 
  Has anyone dealt with situations where a webservice call is indeed
  completing properly, and the results can be seen in service capture,
 and the
  raw SOAP can be seen in event.message.body, but yet the
event.result is
  coming through null?
  
  
  
  I'm battling that very issue now. Any advice or words of wisdom?


 



RE: [flexcoders] Re: WebService returning results, but event.result is null

2009-01-16 Thread Tracy Spratt
Something like:

proxy.find.resultFormat = e4x;

 

Tracy Spratt 
Lariat Services 

Flex development bandwidth available 



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Jeff Tapper
Sent: Friday, January 16, 2009 5:49 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: WebService returning results, but
event.result is null

 

Ok,so, given  im making a call like this:

 

 

public function getMediaItems(eventId:Number):AsyncToken{

  var req:Object = new Object();

  req['event-id'] = eventId;

  var token:AsyncToken = proxy.find(req);

  token.addResponder(responder);

  return token;

}

 

How do I get a handle on the operation? (in this case, it's the find
method of my service, proxy.

 



Jeff Tapper Senior Consultant

digital primates IT Consulting Group (r)

Phone: 847.824.7800, x222 | Fax: 847.655.2867

jtap...@digitalprimates.net

 

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Tracy Spratt
Sent: Friday, January 16, 2009 5:31 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: WebService returning results, but
event.result is null

 

Well, actually it is at the operation/method level.  The default is
object, which converts your soap xml into a tree of dynamic objects,
and this has some issues.

 

Change it to e4x, which will preserve the xml, to see if the behavior
changes.

 

Tracy Spratt 
Lariat Services 

Flex development bandwidth available 



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Jeff Tapper
Sent: Friday, January 16, 2009 5:20 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: WebService returning results, but
event.result is null

 

I don't believe the mx.rpc.soap.WebService class has a resultFormat
property, but, if it does, im using its default.  I've only seen that
property on HTTPService, not  WebService

 



Jeff Tapper Senior Consultant

digital primates IT Consulting Group (r)

Phone: 847.824.7800, x222 | Fax: 847.655.2867

jtap...@digitalprimates.net

 

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Tracy Spratt
Sent: Friday, January 16, 2009 3:41 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: WebService returning results, but
event.result is null

 

And what is your resultFormat?

 

Tracy Spratt 
Lariat Services 

Flex development bandwidth available 



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of valdhor
Sent: Friday, January 16, 2009 3:18 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: WebService returning results, but event.result
is null

 

HmCould you post the Soap response.

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, Jeff Tapper j...@... wrote:

 Oddly enough, I'm getting a ResultEvent, no faults at all.
 
 
 
 
 
 Jeff Tapper Senior Consultant
 
 digital primates IT Consulting Group R
 
 Phone: 847.824.7800, x222 | Fax: 847.655.2867
 
 jtap...@...
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] On
 Behalf Of valdhor
 Sent: Friday, January 16, 2009 2:00 PM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] Re: WebService returning results, but
event.result is
 null
 
 
 
 Are you getting a faultevent or a SoapFault?
 
 --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
mailto:flexcoders%40yahoogroups.com ,
 Jeff Tapper jeff@ wrote:
 
  Has anyone dealt with situations where a webservice call is indeed
  completing properly, and the results can be seen in service capture,
 and the
  raw SOAP can be seen in event.message.body, but yet the
event.result is
  coming through null?
  
  
  
  I'm battling that very issue now. Any advice or words of wisdom?


 



[flexcoders] Re: WebService using a bindable hostname

2008-12-04 Thread fishburn_david
I managed to get this working finally.

I couldn't manage to change it with any of the options I listed.

But what did work was using the FlexBuilder 3 interface and importing
the WebService.  Then using the code it called.

Fairly significant work around, but it did work.






[flexcoders] Re: WebService operation faults propigating up to WebService fault handler.

2008-10-20 Thread Todd
This is a good idea and exactly what I'm going to try now.  This will
cover about 98% of my commands, and will have the advantage of both
faults coming from the operations and the service level to have the
same handler.

I guess at this point, I really want to understand the AsyncToken
stuff in relation to Cairngorm design, so I think I'll post over to
the cairngorm list.  It's probably really a best practices that I'm
looking for.

Thanks Tracy for the suggestinos.

--- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote:

 So can you leave the fault handler on the service and not user the ones
 on the operations?  Or point those to some dummy handler?
 
 Tracy
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Todd
 Sent: Thursday, October 16, 2008 3:25 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: WebService operation faults propigating up to
 WebService fault handler.
 
  
 
 Hmmm...interesting.
 
 I got into the Responders/AsyncTokens because that's how all the
 Cairngorm samples were setup. 
 
 But with what you say, it's very consistent with all the samples using
 MXML WebServices...putting a fault on the operation. But with faults
 on the operation, what happens when Flex can't even call the operation
 because of a SOAPEncoder error?
 
 Originally, all was fine with using Responders, but then I noticed
 that errors from the SOAPEncoder were getting swallowed, and when Flex
 tried building a SOAP message, but couldn't because of some improper
 format, nothing would happen. It would sit there. Adding an error
 handler to the actual service solved that. 
 
 Now, however, I'm stuck with Responder's handling faults, and the
 actual WebService handling faults. I'd like to at least not have the
 Web Service fault trigger if the responder handled it.
 
 I'm about 12 Web Services, 140+ calls into this thing. I don't think
 it'll be possible for me to get rid of my Responder cairngorm
 infrastructure...but I'd like to at least get a handle on how/where
 the faults are raised from.
 
 Had I done this again, I'd probably take your approach of having a
 single handler, use that as the master that subs things out depending
 upon the type of response. This would have the benefit of a single
 point in dealing with the Flex services layer...
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 , Tracy Spratt tspratt@ wrote:
 
  Do you need the fault handler on the operation? I typically a single
  fault handler for all operations. I also use a single handler for all
  results as well, actually. I don't like using responders.
  
  
  
  Tracy
  
  
  
  
  
  From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 ] On
  Behalf Of Todd
  Sent: Thursday, October 16, 2008 12:37 PM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
  Subject: [flexcoders] Re: WebService operation faults propigating up
 to
  WebService fault handler.
  
  
  
  I'll bounce this back up as it's hard to find any source code samples
  using the Actionscript version of WebService, and properly handling
  all the different errors, etc...
  
  Thanks,
  
  --- In flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
  , Todd tprekaski@ wrote:
  
   Hello All,
   I have a problem that I can't figure out. With WebService faults,
   and operations that return SOAPFaults...read on for the detais.
   
   1) I've created my WebService through ActionScript (not the MXML
   Component).
   var ws:WebService = new WebService();
   
   2) I've attached a fault listener to it. I had to do this because
   it seems that SOAPEncoder errors were never being caught otherwise.
   ws.addEventListener(FaultEvent.FAULT, onServiceFault)
   
   3) I'm using a Cairngorm Command/ServiceDelegate calling scheme. 
   For example, to call getInvoices, I have a command that calls into
 the
   appropriate method on the ServiceDelegate called getInvoices, which
   looks like:
   public function getInvoices(params:Object):void{ 
   Operation(ws.SearchInvoices).encoder.strictNillability = true;
   var token:AsyncToken = ws.SearchInvoices(params);
   token.addResponder(this.responder);
   }
   
   As you can see, I'm using the AsyncToken, and adding the Commmand as
   the responder. The Command has both fault and result handlers as
   defined by the IResponder interface.
   
   4) The this.responder is set during the contstructor of the
   Service Delegate, like so:
   public function ServiceDelegate(responder:IResponder)
   {
   this.responder = responder;
   }
   
   So, now my problem is, that when a SOAPFault is raised in the call
 to
   the SearchInvoices WebService operation, both the FAULT on my
 Command
   (which is the responder), AND the fault (onServiceFault

[flexcoders] Re: WebService operation faults propigating up to WebService fault handler.

2008-10-16 Thread Todd
I'll bounce this back up as it's hard to find any source code samples
using the Actionscript version of WebService, and properly handling
all the different errors, etc...

Thanks,


--- In flexcoders@yahoogroups.com, Todd [EMAIL PROTECTED] wrote:

 Hello All,
   I have a problem that I can't figure out.  With WebService faults,
 and operations that return SOAPFaults...read on for the detais.
 
   1)  I've created my WebService through ActionScript (not the MXML
 Component).
  var ws:WebService = new WebService();
 
   2)   I've attached a fault listener to it.  I had to do this because
 it seems that SOAPEncoder errors were never being caught otherwise.
  ws.addEventListener(FaultEvent.FAULT, onServiceFault)
 
   3)  I'm using a Cairngorm Command/ServiceDelegate calling scheme. 
 For example, to call getInvoices, I have a command that calls into the
 appropriate method on the ServiceDelegate called getInvoices, which
 looks like:
   public function getInvoices(params:Object):void{
   Operation(ws.SearchInvoices).encoder.strictNillability = true;
   var token:AsyncToken = ws.SearchInvoices(params);
   token.addResponder(this.responder);
   }
 
 As you can see, I'm using the AsyncToken, and adding the Commmand as
 the responder.  The Command has both fault and result handlers as
 defined by the IResponder interface.
 
4)  The this.responder is set during the contstructor of the
 Service Delegate, like so:
 public function ServiceDelegate(responder:IResponder)
 {
  this.responder = responder;
 }
 
 So, now my problem is, that when a SOAPFault is raised in the call to
 the SearchInvoices WebService operation, both the FAULT on my Command
 (which is the responder), AND  the fault (onServiceFault ) for the
 WebService definition.
 
 I'd really rather not have this happen, but can't really figure out
 exactly what's going on.  ALSO, I had to add the fault handler to the
 WebService because we were having all sorts of SOAPEncoder errors that
 were never being raised.
 
 What's someone to do?  Is it that since I'm using the AsyncResponder
 to handle for the result/fault, that the WebService is never notified
 that the Fault has already been handled?  What's the proper design
 around this?  Is there a way to set the status that the Fault's been
 handled?  It almost seems like the fault is being raised twice.
 
 Thanks,
 Todd





RE: [flexcoders] Re: WebService operation faults propigating up to WebService fault handler.

2008-10-16 Thread Tracy Spratt
Do you need the fault handler on the operation?  I typically a single
fault handler for all operations.  I also use a single handler for all
results as well, actually.  I don't like using responders.

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Todd
Sent: Thursday, October 16, 2008 12:37 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: WebService operation faults propigating up to
WebService fault handler.

 

I'll bounce this back up as it's hard to find any source code samples
using the Actionscript version of WebService, and properly handling
all the different errors, etc...

Thanks,

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, Todd [EMAIL PROTECTED] wrote:

 Hello All,
 I have a problem that I can't figure out. With WebService faults,
 and operations that return SOAPFaults...read on for the detais.
 
 1) I've created my WebService through ActionScript (not the MXML
 Component).
 var ws:WebService = new WebService();
 
 2) I've attached a fault listener to it. I had to do this because
 it seems that SOAPEncoder errors were never being caught otherwise.
 ws.addEventListener(FaultEvent.FAULT, onServiceFault)
 
 3) I'm using a Cairngorm Command/ServiceDelegate calling scheme. 
 For example, to call getInvoices, I have a command that calls into the
 appropriate method on the ServiceDelegate called getInvoices, which
 looks like:
 public function getInvoices(params:Object):void{ 
 Operation(ws.SearchInvoices).encoder.strictNillability = true;
 var token:AsyncToken = ws.SearchInvoices(params);
 token.addResponder(this.responder);
 }
 
 As you can see, I'm using the AsyncToken, and adding the Commmand as
 the responder. The Command has both fault and result handlers as
 defined by the IResponder interface.
 
 4) The this.responder is set during the contstructor of the
 Service Delegate, like so:
 public function ServiceDelegate(responder:IResponder)
 {
 this.responder = responder;
 }
 
 So, now my problem is, that when a SOAPFault is raised in the call to
 the SearchInvoices WebService operation, both the FAULT on my Command
 (which is the responder), AND the fault (onServiceFault ) for the
 WebService definition.
 
 I'd really rather not have this happen, but can't really figure out
 exactly what's going on. ALSO, I had to add the fault handler to the
 WebService because we were having all sorts of SOAPEncoder errors that
 were never being raised.
 
 What's someone to do? Is it that since I'm using the AsyncResponder
 to handle for the result/fault, that the WebService is never notified
 that the Fault has already been handled? What's the proper design
 around this? Is there a way to set the status that the Fault's been
 handled? It almost seems like the fault is being raised twice.
 
 Thanks,
 Todd


 



[flexcoders] Re: WebService operation faults propigating up to WebService fault handler.

2008-10-16 Thread Todd
Hmmm...interesting.

I got into the Responders/AsyncTokens because that's how all the
Cairngorm samples were setup.  

But with what you say, it's very consistent with all the samples using
MXML WebServices...putting a fault on the operation.  But with faults
on the operation, what happens when Flex can't even call the operation
because of a SOAPEncoder error?

Originally, all was fine with using Responders, but then I noticed
that errors from the SOAPEncoder were getting swallowed, and when Flex
tried building a SOAP message, but couldn't because of some improper
format, nothing would happen.  It would sit there.  Adding an error
handler to the actual service solved that.  

Now, however, I'm stuck with Responder's handling faults, and the
actual WebService handling faults.  I'd like to at least not have the
Web Service fault trigger if the responder handled it.

I'm about 12 Web Services, 140+ calls into this thing.  I don't think
it'll be possible for me to get rid of my Responder cairngorm
infrastructure...but I'd like to at least get a handle on how/where
the faults are raised from.

Had  I done this again, I'd probably take your approach of having a
single handler, use that as the master that subs things out depending
upon the type of response.  This would have the benefit of a single
point in dealing with the Flex services layer...

--- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote:

 Do you need the fault handler on the operation?  I typically a single
 fault handler for all operations.  I also use a single handler for all
 results as well, actually.  I don't like using responders.
 
  
 
 Tracy
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Todd
 Sent: Thursday, October 16, 2008 12:37 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: WebService operation faults propigating up to
 WebService fault handler.
 
  
 
 I'll bounce this back up as it's hard to find any source code samples
 using the Actionscript version of WebService, and properly handling
 all the different errors, etc...
 
 Thanks,
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 , Todd tprekaski@ wrote:
 
  Hello All,
  I have a problem that I can't figure out. With WebService faults,
  and operations that return SOAPFaults...read on for the detais.
  
  1) I've created my WebService through ActionScript (not the MXML
  Component).
  var ws:WebService = new WebService();
  
  2) I've attached a fault listener to it. I had to do this because
  it seems that SOAPEncoder errors were never being caught otherwise.
  ws.addEventListener(FaultEvent.FAULT, onServiceFault)
  
  3) I'm using a Cairngorm Command/ServiceDelegate calling scheme. 
  For example, to call getInvoices, I have a command that calls into the
  appropriate method on the ServiceDelegate called getInvoices, which
  looks like:
  public function getInvoices(params:Object):void{ 
  Operation(ws.SearchInvoices).encoder.strictNillability = true;
  var token:AsyncToken = ws.SearchInvoices(params);
  token.addResponder(this.responder);
  }
  
  As you can see, I'm using the AsyncToken, and adding the Commmand as
  the responder. The Command has both fault and result handlers as
  defined by the IResponder interface.
  
  4) The this.responder is set during the contstructor of the
  Service Delegate, like so:
  public function ServiceDelegate(responder:IResponder)
  {
  this.responder = responder;
  }
  
  So, now my problem is, that when a SOAPFault is raised in the call to
  the SearchInvoices WebService operation, both the FAULT on my Command
  (which is the responder), AND the fault (onServiceFault ) for the
  WebService definition.
  
  I'd really rather not have this happen, but can't really figure out
  exactly what's going on. ALSO, I had to add the fault handler to the
  WebService because we were having all sorts of SOAPEncoder errors that
  were never being raised.
  
  What's someone to do? Is it that since I'm using the AsyncResponder
  to handle for the result/fault, that the WebService is never notified
  that the Fault has already been handled? What's the proper design
  around this? Is there a way to set the status that the Fault's been
  handled? It almost seems like the fault is being raised twice.
  
  Thanks,
  Todd
 





RE: [flexcoders] Re: WebService operation faults propigating up to WebService fault handler.

2008-10-16 Thread Tracy Spratt
So can you leave the fault handler on the service and not user the ones
on the operations?  Or point those to some dummy handler?

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Todd
Sent: Thursday, October 16, 2008 3:25 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: WebService operation faults propigating up to
WebService fault handler.

 

Hmmm...interesting.

I got into the Responders/AsyncTokens because that's how all the
Cairngorm samples were setup. 

But with what you say, it's very consistent with all the samples using
MXML WebServices...putting a fault on the operation. But with faults
on the operation, what happens when Flex can't even call the operation
because of a SOAPEncoder error?

Originally, all was fine with using Responders, but then I noticed
that errors from the SOAPEncoder were getting swallowed, and when Flex
tried building a SOAP message, but couldn't because of some improper
format, nothing would happen. It would sit there. Adding an error
handler to the actual service solved that. 

Now, however, I'm stuck with Responder's handling faults, and the
actual WebService handling faults. I'd like to at least not have the
Web Service fault trigger if the responder handled it.

I'm about 12 Web Services, 140+ calls into this thing. I don't think
it'll be possible for me to get rid of my Responder cairngorm
infrastructure...but I'd like to at least get a handle on how/where
the faults are raised from.

Had I done this again, I'd probably take your approach of having a
single handler, use that as the master that subs things out depending
upon the type of response. This would have the benefit of a single
point in dealing with the Flex services layer...

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, Tracy Spratt [EMAIL PROTECTED] wrote:

 Do you need the fault handler on the operation? I typically a single
 fault handler for all operations. I also use a single handler for all
 results as well, actually. I don't like using responders.
 
 
 
 Tracy
 
 
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] On
 Behalf Of Todd
 Sent: Thursday, October 16, 2008 12:37 PM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] Re: WebService operation faults propigating up
to
 WebService fault handler.
 
 
 
 I'll bounce this back up as it's hard to find any source code samples
 using the Actionscript version of WebService, and properly handling
 all the different errors, etc...
 
 Thanks,
 
 --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com
 , Todd tprekaski@ wrote:
 
  Hello All,
  I have a problem that I can't figure out. With WebService faults,
  and operations that return SOAPFaults...read on for the detais.
  
  1) I've created my WebService through ActionScript (not the MXML
  Component).
  var ws:WebService = new WebService();
  
  2) I've attached a fault listener to it. I had to do this because
  it seems that SOAPEncoder errors were never being caught otherwise.
  ws.addEventListener(FaultEvent.FAULT, onServiceFault)
  
  3) I'm using a Cairngorm Command/ServiceDelegate calling scheme. 
  For example, to call getInvoices, I have a command that calls into
the
  appropriate method on the ServiceDelegate called getInvoices, which
  looks like:
  public function getInvoices(params:Object):void{ 
  Operation(ws.SearchInvoices).encoder.strictNillability = true;
  var token:AsyncToken = ws.SearchInvoices(params);
  token.addResponder(this.responder);
  }
  
  As you can see, I'm using the AsyncToken, and adding the Commmand as
  the responder. The Command has both fault and result handlers as
  defined by the IResponder interface.
  
  4) The this.responder is set during the contstructor of the
  Service Delegate, like so:
  public function ServiceDelegate(responder:IResponder)
  {
  this.responder = responder;
  }
  
  So, now my problem is, that when a SOAPFault is raised in the call
to
  the SearchInvoices WebService operation, both the FAULT on my
Command
  (which is the responder), AND the fault (onServiceFault ) for the
  WebService definition.
  
  I'd really rather not have this happen, but can't really figure out
  exactly what's going on. ALSO, I had to add the fault handler to the
  WebService because we were having all sorts of SOAPEncoder errors
that
  were never being raised.
  
  What's someone to do? Is it that since I'm using the AsyncResponder
  to handle for the result/fault, that the WebService is never
notified
  that the Fault has already been handled? What's the proper design
  around this? Is there a way to set the status that the Fault's been
  handled? It almost seems like the fault is being raised twice.
  
  Thanks,
  Todd
 


 



[flexcoders] Re: WebService call with more than one argument in call

2008-06-30 Thread dsb1971
Thank you for your hint. Your syntax led me to:

myService.myOperation.arguments = { param0 { parm1: value1, parm2: 
value2 } };

which is running like a charm. 
I misinterpreted the WSDL-Document defining the input-argument-
structure.

Daniel Schlichtholz

--- In flexcoders@yahoogroups.com, Josh McDonald [EMAIL PROTECTED] wrote:

 You want:
 
 myService.myOperation.arguments = { parm1: value1, parm2: value2 };
 myService.myOperation.send();
 
 -Josh
 
 On Mon, Jun 30, 2008 at 5:39 PM, dsb1971 [EMAIL PROTECTED]
 wrote:
 
  Hello group,
 
  I am new to Flex and try to play around with WebServcies. 
Everything
  is ok when I only have one paramter as an argument for the 
service.
  But when I try to use more than one parameter to hand over to the
  service-operation, the value of the first argument overwrites the
  second argument. I do call the Service in this way:
 
  webService.myoperation('D','990');
 
  I did some traffic-sniffing using fiddler and the sent request 
looks
  like this:
 
  SOAP-ENV:Envelope xmlns:SOAP-
  ENV=http://schemas.xmlsoap.org/soap/envelope/;
  xmlns:xs=http://www.w3.org/2001/XMLSchema;
  xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
   SOAP-ENV:Body
 ns0:myoperation xmlns:ns0=http://sv.wsbeans.iseries/xsd;
   ns0:param0
 ns0:_IARTNRD/ns0:_IARTNR
 ns0:_IFIRMAD/ns0:_IFIRMA
   /ns0:param0
 /ns0:myoperation
   /SOAP-ENV:Body
  /SOAP-ENV:Envelope
  Whereas it should look like this:
  ...
 ns0:_IARTNRD/ns0:_IARTNR
 ns0:_IFIRMA990/ns0:_IFIRMA
  ...
  Am I doing something wrong or is this a bug in Flex when dealing 
with
  more than one parameter in the service call? I couldn't find an
  example where a webservice uses more than one argument but my 
call is
  just the way it is described in the manual. Does anybody have a 
link
  to a working example that uses webservices with more than one
  argument?
 
  Btw.: up to now I do use the trial version of Flex Builder 3 - 
maybe
  this is a limitation of the trial version?
 
  Thanks in advance for any hint,
 
  Daniel Schlichtholz
 
 
  
 
  --
  Flexcoders Mailing List
  FAQ: 
http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
  Search Archives:
  http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! 
Groups
  Links
 
 
 
 
 
 
 -- 
 Therefore, send not to know For whom the bell tolls. It tolls for 
thee.
 
 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: [EMAIL PROTECTED]





[flexcoders] Re: Webservice implementation switched to e4x after Flex 2.0.1 hotfix 2

2008-06-05 Thread mgrayfmr
--- In flexcoders@yahoogroups.com, mgrayfmr [EMAIL PROTECTED] wrote:

 Hi there:
 
 We've run into some webservice issues here when switching from Flex 
 2.0.1 (not the hotfix version) to Flex 3. We are retrieving data 
from 
 a .NET backend using a SOAP/wsdl format. When we switched to Flex 
 3.0, the structures returned on the repsonse were sometimes a 
little 
 different. 
 
 For example, we had a data structure returned that was like this: 
 data.result.UserProfileResponse.snapshots.Calendars
 Where Calendars was an ArrayCollection.
 
 Now the struture comes back without the Calendars part, and the 
data 
 is in an ArrayCollection under the 
 data.result.UserProfileResponse.snapshots structure.
 
 The wsdl loks like this:
 ![CDATA[
 
 s:complexType name=UserProfileResponse
   s:sequence
 s:element minOccurs=0 maxOccurs=1 name=userProfileDAO 
 type=tns:UserProfileDAO /
 s:element minOccurs=0 maxOccurs=1 name=snapshots 
 type=tns:ArrayOfCalendars /
   /s:sequence
 /s:complexType
 
 s:complexType name=ArrayOfCalendars
   s:sequence
 s:element minOccurs=0 maxOccurs=unbounded name=Calendars 
 nillable=true type=tns:Calendar /
   /s:sequence
 /s:complexType
 ]]
 
 Is this a result of the changes to implement e4x on webservices?
 Has anyone else run into this issue?
 
 Thanks in advance,
 Mike

It seems this is a knonw bug with Adobe in Flex 3.
If there are nested Arrays, Flex will not handle them properly.
Flex 3.0 also will drop data if the structure of the data is not 
ordered exactly as the WSDL dictates. This all wokred fine in Flex 
2.0.1. A seriously bad mistake by Adobe to let these bugs slip 
through.

So it turns out that switching our Webservice to handle SOAP 
responses from 'object' to 'e4x' seems to have solved the problem.
We then used this to set the data back to objects to match the 
structure that our Cairngorm responders were expecting:
protected function parseXMLData(xmlData:String) : 
Object
{
var xmlDoc:XMLDocument = new XMLDocument(xmlData);
var decoder:SimpleXMLDecoder = new 
SimpleXMLDecoder(true);
var obj:Object = decoder.decodeXML(xmlDoc);

var data:Object = new Object;

for(var i:int = 0; i  2; i++)
{
for each(var tempObj:Object in obj)
{
obj = tempObj;
}
}
data.result = obj

return data;

}




Re: [flexcoders] Re: Webservice, SOAP, SSL and BasicAuthentication

2008-01-24 Thread Christoph Guse

Hi,

thanks for your replies.

eipref1.kingmedia.de is a non-public server running in a virtual machine 
for developing purposes only. The WSDL file is accessible.


I did some more investigation and the solution is at the moment the Flex 
SOAP webservice functionality is not useable.
The DataServiceManagement in FB3 creates a lot of Classes and methods. I 
used them in combination with the remote proxy. Flex was able to load 
the WSDL but failed to use it ( checked with in console logging ).


For me the solution is to write SOAP clients in Java - all other 
solutions are not feasible in my project.


Hey, adobe guys, please test your product with Webservices generated 
with JAX-WS!


Regards,
Christoph

valdhor schrieb:


I have not used SOAP with Flex as yet but have built a number of SOAP
servers and clients as well as WSDL's.

Your error message is:

Unable to load WSDL. If currently online, please verify the URI and/or
format of the WSDL (null)

Are you sure you have the location of the WSDL correct? If I try to
look at the WSDL at
https://eipref1.kingmedia.de/ws/getDataElements?wsdl 
https://eipref1.kingmedia.de/ws/getDataElements?wsdl I get a server

not found error.

 


[flexcoders] Re: Webservice, SOAP, SSL and BasicAuthentication

2008-01-23 Thread gregariousgregmi
I had a similar experience, not sure if this will solve your problem.
I had imported a WSDL in flex 3.0 beta 2.  While working with the 
action script code it generated, specificially adding any code 
related to SOAP, the import statements would change automatically, 
leaving out several libraries including the following two;
 
import mx.messaging.ChannelSet;
import mx.messaging.channels.DirectHTTPChannel;

I reimported the WSDL and saved a copy of the libraries.  The was 
getting was a compile-time error.



--- In flexcoders@yahoogroups.com, Christoph Guse [EMAIL PROTECTED] wrote:

 Hi List,
 
 I try to configure the flex webservice proxy in proxy-config.xml 
and it 
 drives me crazy. I'm not able to load the WSDL from a Webservice 
which 
 is secured by SSL ( self signed Certificate ) and 
BasicAuthentication. I 
 searched the docs but I was not abel to find a complete example. 
Even 
 the description in the lcds development guide doesn't help.
 
 *Destination in proxy-config.xml*
 destination id=dataElements
 adapter ref=soap-proxy /
 channels
 channel ref=my-secure-http /
 /channels
 properties
 
 wsdlhttps://eipref1.kingmedia.de/ws/getDataElements?wsdl/wsdl
 
soaphttps://eipref1.kingmedia.de/ws/getDataElements/soap
 remote-usernameJohn Doe/remote-username
 remote-passworddoe/remote-password
 /properties
 /destination
 
 *Webservice declaration in mxml*
 mx:WebService id=dataElementService 
destination=dataElements 
 useProxy=true showBusyCursor=true
 mx:operation name=getDataElements concurrency=multiple 
 resultFormat=e4x /
 /mx:WebService
 
 *WS call in method*
 dataElementService.getDataElements([ws specific argument]);
 
 *Error message in application*
 [RPC Fault faultString=[MessagingError message='Destination 
 'dataElements' has no channels defined and the application does not 
 define any default channels.'] faultCode=InvokeFailed 
 faultDetail=Unable to load WSDL. If currently online, please 
verify the 
 URI and/or format of the WSDL (null)]
 at 
 mx.rpc.wsdl::WSDLLoader/faultHandler()
[E:\dev\flex_201_borneo\sdk\frameworks\mx\rpc\wsdl\WSDLLoader.as:76]
 at flash.events::EventDispatcher/dispatchEventFunction()
 at flash.events::EventDispatcher/dispatchEvent()
 at 
 
mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::di
spatchRpcEvent()
[E:\dev\flex_201_borneo\sdk\frameworks\mx\rpc\AbstractInvoker.as:146]
 at Function/http://adobe.com/AS3/2006/builtin::apply()
 at 
 mx.rpc::AsyncDispatcher/timerEventHandler()
[E:\dev\flex_201_borneo\sdk\frameworks\mx\rpc\AsyncDispatcher.as:57]
 at flash.utils::Timer/_timerDispatch()
 at flash.utils::Timer/tick()
 
 I'm using LCDS 2.5 ES and the Flex 2.0.1 Hotfix 3 compilter 
delivered 
 with FB Beta3.
 
 I tried to use Ethereal to see which information is send to the WS 
but 
 that wasn't successfull.
 
 The webservice itself is created with JAX-WS 2.1 and works like a 
charm, 
 tested with SoapUI 2.0.
 
 At the moment I have no idea why I can't call my webservice. Can 
 somebody help me, please?
 
 Regards,
 Christoph





[flexcoders] Re: Webservice, SOAP, SSL and BasicAuthentication

2008-01-23 Thread valdhor
I have not used SOAP with Flex as yet but have built a number of SOAP
servers and clients as well as WSDL's.

Your error message is:

Unable to load WSDL. If currently online, please verify the URI and/or
format of the WSDL (null)

Are you sure you have the location of the WSDL correct? If I try to
look at the WSDL at
https://eipref1.kingmedia.de/ws/getDataElements?wsdl I get a server
not found error.




[flexcoders] Re: Webservice-WSDL not loaded in FireFox

2007-12-04 Thread brunot985
--- In flexcoders@yahoogroups.com, brunot985 [EMAIL PROTECTED]
wrote:

 Adobe Support classified this problem as bug: JIRA issue SDK-11519
 (currently not public). The responsible engineer stated that no Flex
 fix is planned, he announced that it will be fixed with the next major
 Flash update.



The problem is now fixed using Update 3 / Version 9,0,115,0.



[flexcoders] Re: webservice inheritance problem

2007-10-25 Thread forums.eyelock
--- In flexcoders@yahoogroups.com, Hans [EMAIL PROTECTED] wrote:

 Hi list,
 
 I use a webservice method that needs a collection of a certain type.
 This type is an abstract class of which 2 implementations exist. If I
 call this method and pass in an arraycollection with 2 instances (one
 for each implementation), it occurs that the SOAP request being
 created ignores the fact that it concerns a subclass. In other words
 the only thing included in the webservice request are the fields from
 the abstract class, and none of the fields of the subclass.
 There is nothing wrong with the wsdl because when I test the same
 thing with a java client, everything works perfectly (!)
 
 Here's an extract of the wsdl:
 

You need to make a concrete class for ChangeableIntervalParameter that
implements the IXMLSchemaInstance interface.  That will allow you to
hint to the SOAPEncoder the exact xsi:type you want.  

Then make a ChangeableSelectionParameter class that extends the
ChangeableIntervalParameter and has get/set for each of the
properties of the actual type you are trying to create.

When you make up the parameters to pass into the web service,
instantiate the ChangeableSelectionParameter class (along with a
QName) and populate with
the arguments and pass that into the web service.  

Since you have implemented the IXMLSchemaInstance, the SOAPEncoder
will be able to correctly work out the type of the arguments and it
will work.

You need Flex 2.0.1 Hotfix 1 to do this, you can use the docs for Flex
3 to reference -
http://livedocs.adobe.com/labs/flex3/langref/mx/rpc/xml/IXMLSchemaInstance.html

Hehe, someone else helped me out with this just last week!

Cheers

-- 
dacf



[flexcoders] Re: webservice inheritance problem

2007-10-25 Thread forums.eyelock
 This type is an abstract class of which 2 implementations exist. If I
 call this method and pass in an arraycollection with 2 instances (one
 for each implementation), it occurs that the SOAP request being
 created ignores the fact that it concerns a subclass. In other words
 the only thing included in the webservice request are the fields from

You need at least Flex 2.0.1 Hotfix 2.

The you need to create concrete classes for each of your types that
extend the abstract webservice types.

These classes need to implement the mx.rpc.xml.IXMLSchemaInstance
Interface.  This allows you to set the xsi:type that will allow your
web service call.

An example showing roughly how to do it:

 ChangeableParameter.as 
package classes.types
{
import mx.rpc.xml.IXMLSchemaInstance;

public class ChangeableParameterimplements IXMLSchemaInstance
{
private var _xsiType:QName;

public function ChangeableParameter() {
}   

public function get xsiType():QName {
return _xsiType;
}

public function set xsiType(value:QName):void {
_xsiType = value;
return;
}
}
}



 ChangeableIntervalParameter.as 
package classes.types
{
import mx.rpc.xml.IXMLSchemaInstance;

public class Point extends ChangeableParameter implements
IXMLSchemaInstance
{
private var _minimum:Number;


public function ChangeableIntervalParameter() {
}


public function get minimum():Number {
return _minimum;
}

public function set minimum(value:Number):void {
_minimum = value;
return;
}   

.
}
}



 WebService.as 
... 

private function loadHandler(event:LoadEvent):void {


// SearchShape - since this is an abstract type, we 
need to force
to the concrete PointN type using AS objects
var ChangeableIntervalParameterNS:Namespace = new
Namespace(ns1, http://whereever/;);  
var params:ChangeableIntervalParameter = new
ChangeableIntervalParameter();
params.xsiType = new 
QName(ChangeableIntervalParameterNS,
ChangeableIntervalParameter);
params.minimum = _Number(20);

//Now call the web service with the args
var operation:AbstractOperation =
web.getOperation(NameOfWebServiceMethod);
operation.arguments = params;
operation.send();

...



Might have ran into this problem a few days ago and got help off
others with it!  That should get you started I think.

Cheers

-- 
dacf



[flexcoders] Re: WebService performance with large XML

2007-10-23 Thread ben.clinkinbeard
Can you post some code showing how you're making the call?

Ben


--- In flexcoders@yahoogroups.com, M@ Sheppard [EMAIL PROTECTED] wrote:

 The application we're developing requires me to return a block of XML
 from the database, and we're doing this with a webservice.  We have a
 current version of the application written in Flash which returns and
 consumes the same webservice call in under a second.  The same
 webservice call made from Flex takes upwards of 10 seconds.  
 
 I'm theorizing it's because the e4x engine is taking a very long time
 parsing the returned XML.  I have the timestamp directly before the
 webservice.methodName call and again as the first line in the result
 handling function - so it's none of my code involved in the
measurement. 
 
 I'm looking for some more details on how Flex is making this
 webservice call and specifically how it's dealing with the results,
 and if there's an opportunity for me to alter how it processes the
 results.
 
 I'm thinking about making this one call use another data connectivity
 technique, like fluorine or web orb.
 
 M@





[flexcoders] Re: WebService performance with large XML

2007-10-23 Thread M@ Sheppard
I might have found a solution to my own problem.  Here is the current
code:

service = new WebService();
service.GetProject.resultFormat = e4x;  //Increases speed of return
10 fold
service.useProxy=false;
service.wsdl = OurModelLocator.getInstance()[EMAIL PROTECTED];
service.addEventListener(result, responder.result);
service.addEventListener(FaultEvent.FAULT, faultHandler);
service.loadWSDL();

A colleague suggested the resultFormat change, which has made all the
difference.  Now, however, I must rewrite all of my parsing code.  

M@



RE: [flexcoders] Re: WebService performance with large XML

2007-10-23 Thread Alex Harui
Yeah, the XMLDecoder takes time when it runs (when resultFormat is not
e4x).  One of these days I hope to poke at writing a decoder that works
in the background (off timers) or on demand (via a custom collection).

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of M@ Sheppard
Sent: Tuesday, October 23, 2007 11:54 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: WebService performance with large XML

 

I might have found a solution to my own problem. Here is the current
code:

service = new WebService();
service.GetProject.resultFormat = e4x; //Increases speed of return
10 fold
service.useProxy=false;
service.wsdl = OurModelLocator.getInstance()[EMAIL PROTECTED];
service.addEventListener(result, responder.result);
service.addEventListener(FaultEvent.FAULT, faultHandler);
service.loadWSDL();

A colleague suggested the resultFormat change, which has made all the
difference. Now, however, I must rewrite all of my parsing code. 

M@

 



[flexcoders] Re: WebService performance with large XML

2007-10-23 Thread ben.clinkinbeard
Yep, I was going to suggest the same. The best approach I've found
(and recommended by Adobe) is to use resultFormat=e4x and convert to
classes by way of xml-accepting constructors and/or factories.

Ben


--- In flexcoders@yahoogroups.com, M@ Sheppard [EMAIL PROTECTED] wrote:

 I might have found a solution to my own problem.  Here is the current
 code:
 
 service = new WebService();
 service.GetProject.resultFormat = e4x;  //Increases speed of return
 10 fold
 service.useProxy=false;
 service.wsdl = OurModelLocator.getInstance()[EMAIL PROTECTED];
 service.addEventListener(result, responder.result);
 service.addEventListener(FaultEvent.FAULT, faultHandler);
 service.loadWSDL();
 
 A colleague suggested the resultFormat change, which has made all the
 difference.  Now, however, I must rewrite all of my parsing code.  
 
 M@





[flexcoders] Re: WebService problem

2007-09-14 Thread Paul DeCoursey
I have an update on this.  There is no problem with extending string
unless there are more than one of the same element, I'm not sure if
it's the unbounded max that causes it.  I think that the hotfix 3 had
something in it about this.  I will have to explore that option.

--- In flexcoders@yahoogroups.com, Paul deCoursey [EMAIL PROTECTED] wrote:

 I have this issue when calling a WebService operation.  If I have in
the 
 schema an object that extends string the operation will fail and crash 
 teh browser.  The idea is to send an object like this (represented
in xml):
 collection uuid=1481091239084023r
 metadata name=TitleThis is the title/meatadata
 ...
 /collection
 
 If I send the object with everything except the metadata it works
fine.  
 If I add the metadata it fails.  This works from other clients without 
 any issues.  I have tried the flex hotfix 3, but that has other issues, 
 it fails to load imported schema references correctly.  Has anyone had 
 experience with something like this?
 
 I am working on building a simple example that I can post that includes 
 the WSDL, the flex client that fails and a java war that provides the 
 soap service.  Once I have that done I will post it, but I'd like to 
 know before hand if anyone has experienced this.  Or if there is anyone 
 that has a complexType that extends string but does not fail, I'd be 
 interested in comparing notes there as well.
 
 Thanks
 
 Paul





[flexcoders] Re: WebService Basic Authentication over HTTPS?

2007-08-28 Thread chuyler1

 I'd do some research to see what most .NET people are doing for
 authentication and WebServices.

That's what I'm trying to do now :)

It looks like most are using SOAP headers instead of Basic
Authentication.  I started a thread with our back-end group in charge
of all the .NET stuff.  We do not want any sort of browser
authentication window to appear so I guess basic auth is out of the
question.  

It would be nice if Adobe could support it out of the box.  I see lots
of people running into the same problem and there is already an
enhancement request on the bug tracker site.



[flexcoders] Re: WebService Basic Authentication over HTTPS?

2007-08-27 Thread chuyler1
Will the method of using SOAP headers still allow for basic session
management by the .NET WebService?

The server-side guys are really pushing the use of Basic
Authentication but it sounds like this approach will mean coding
specific authentication functions within the WebService, correct?



RE: [flexcoders] Re: WebService Basic Authentication over HTTPS?

2007-08-27 Thread Peter Farland
I'd guess that if you lock down a WebService's soap address location URL
to cause an HTTP Basic Authentication challenge then it won't matter
what SOAP headers a particular operation is capable of processing as the
POST won't get far enough to be able to see the SOAP data.

While it is technically possible to pre-authenticate by sending the
right HTTP headers from Flash, it's not a viable solution if the wrong
credentials are ever sent as you will then receive a challenge dialog no
matter what.

I'd do some research to see what most .NET people are doing for
authentication and WebServices.



-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of chuyler1
Sent: Monday, August 27, 2007 3:22 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: WebService Basic Authentication over HTTPS?

Will the method of using SOAP headers still allow for basic session
management by the .NET WebService?

The server-side guys are really pushing the use of Basic Authentication
but it sounds like this approach will mean coding specific
authentication functions within the WebService, correct?



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links





[flexcoders] Re: WebService request serialization : XML attributes

2007-05-24 Thread ecpmaz
 Flex SDK 2.0.1 Hotfix 2 contains a new WebService implementation that
 should handle attributes in addition to elements... this hotfix should
 be out very soon.

very soon... like within the next 3 days ? :S

{Maz}

 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of ecpmaz
 Sent: Tuesday, May 22, 2007 10:29 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: WebService request serialization : XML
 attributes
 
 
 
 Nobody has any webservice with attributes required in the request ???
 :(
 
 {Maz}
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 , ecpmaz ecpmaz@ wrote:
 
  Hi, 
  
  I have a soap method described like that :
  
  ===
  s:complexType base=s0:Credential
  s:sequence/
  s:attribute name=Login type=s:string use=required/
  s:attribute name=Password type=s:string use=optional/
  ...
  /s:complexType
  
  s:element name=login
  s:complexType
  s:sequence
  s:element name=credential type=s0:Credential/
  /s:sequence
  /s:complexType
  /s:element
  
  message name=loginSoapIn
  part element=s0:login name=parameters/
  /message
  
  operation name=login
  input message=s0:loginSoapIn/
  ...
  /operation
  ===
  
  Here you see that credential has Login and Password as *xml
  attributes*, not nested xml elements... So how should I call this
 method ?
  
  It seems that whatever I do, the request is serialized like that :
  || credential
  || Login.../Login
  || Password.../Password
  || /credential
  
  Instead of :
  || credential Login=... Password=... /
  
  
  Any help ? :s
  
  {Maz}
 





[flexcoders] Re: WebService request serialization : XML attributes

2007-05-22 Thread ecpmaz
Nobody has any webservice with attributes required in the request ???
:(

{Maz}

--- In flexcoders@yahoogroups.com, ecpmaz [EMAIL PROTECTED] wrote:

 Hi, 
 
 I have a soap method described like that :
 
 ===
 s:complexType base=s0:Credential
  s:sequence/
  s:attribute name=Login type=s:string use=required/
  s:attribute name=Password type=s:string use=optional/
  ...
 /s:complexType
 
 s:element name=login
  s:complexType
   s:sequence
s:element name=credential type=s0:Credential/
   /s:sequence
  /s:complexType
 /s:element
 
 message name=loginSoapIn
  part element=s0:login name=parameters/
 /message
 
 operation name=login
  input message=s0:loginSoapIn/
  ...
 /operation
 ===
 
 Here you see that credential has Login and Password as *xml
 attributes*, not nested xml elements... So how should I call this
method ?
 
 It seems that whatever I do, the request is serialized like that :
 || credential
 ||  Login.../Login
 ||  Password.../Password
 || /credential
 
 Instead of :
 || credential Login=... Password=... /
 
 
 Any help ? :s
 
 {Maz}





RE: [flexcoders] Re: WebService request serialization : XML attributes

2007-05-22 Thread Peter Farland
Flex SDK 2.0.1 Hotfix 2 contains a new WebService implementation that
should handle attributes in addition to elements... this hotfix should
be out very soon.



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of ecpmaz
Sent: Tuesday, May 22, 2007 10:29 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: WebService request serialization : XML
attributes



Nobody has any webservice with attributes required in the request ???
:(

{Maz}

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, ecpmaz [EMAIL PROTECTED] wrote:

 Hi, 
 
 I have a soap method described like that :
 
 ===
 s:complexType base=s0:Credential
 s:sequence/
 s:attribute name=Login type=s:string use=required/
 s:attribute name=Password type=s:string use=optional/
 ...
 /s:complexType
 
 s:element name=login
 s:complexType
 s:sequence
 s:element name=credential type=s0:Credential/
 /s:sequence
 /s:complexType
 /s:element
 
 message name=loginSoapIn
 part element=s0:login name=parameters/
 /message
 
 operation name=login
 input message=s0:loginSoapIn/
 ...
 /operation
 ===
 
 Here you see that credential has Login and Password as *xml
 attributes*, not nested xml elements... So how should I call this
method ?
 
 It seems that whatever I do, the request is serialized like that :
 || credential
 || Login.../Login
 || Password.../Password
 || /credential
 
 Instead of :
 || credential Login=... Password=... /
 
 
 Any help ? :s
 
 {Maz}




 


[flexcoders] Re: WebService in AS

2007-05-20 Thread hugocorept
Oh i get it, the error has in :

   public function readyHelloWorld():void{
   // call web service function Is Ready   
   webService.HelloWorld(myInput.text); 
   }


correct to :


   public function readyHelloWorld(ready:LoadEvent):void{
   // call web service function Is Ready   
   webService.HelloWorld(myInput.text); 
   }

Seems going every just fine..
Thanks...



[flexcoders] Re: WebService in AS

2007-05-20 Thread hugocorept
Here's the complete code if anyone is interest, if anyone disagree
with anything reply me ;)

[Bindable] 
public var webService:WebService;

public function wsHelloWorld():void{

// initialization that only needs to be called 
once
webService = new WebService();
webService.wsdl = myWsdl.text;
webService.loadWSDL();  
webService.addEventListener(LoadEvent.LOAD, 
readyHelloWorld);
webService.addEventListener(ResultEvent.RESULT, 
resultListener);
}
public function readyHelloWorld(ready:LoadEvent):void{
// call web service function Is Ready   
webService.HelloWorld(myInput.text); 
}

public function resultListener(event:ResultEvent):void {
// handle result of webservice
   trace(event.result);
}   


--- In flexcoders@yahoogroups.com, hugocorept [EMAIL PROTECTED] wrote:

 Hey thanks for the Help, that really light me!
 So, i write something like this..
 
   [Bindable] 
   public var webService:WebService;
   
   public function wsHelloWorld():void{
 
   
   // initialization that only needs to be called 
 once
   if (!webService) {
   webService = new WebService();
   webService.wsdl = myWsdl.text;
   webService.loadWSDL();  
   
 webService.addEventListener(LoadEvent.LOAD, readyHelloWorld);
   
 webService.addEventListener(ResultEvent.RESULT, resultListener);
   }   
   
   }
   
   public function readyHelloWorld():void{
   // call web service function Is Ready   
   webService.HelloWorld(myInput.text); 
   }
   
   public function resultListener(event:ResultEvent):void {
   // handle result of webservice
  trace(event.result);
   }   
 
 This is giving me: Argument count mismatch on main/readyHelloWorld().
 Expected 0, got 1.
 
 
 :s hum...
 Grate for the help, Core
 
 --- In flexcoders@yahoogroups.com, Daniel Freiman FreimanCQ@ wrote:
 
  Actually, I may have screwed this up because loadWSDL is also
 asynchronous.
  Remove the first line of wsHelloWorld (initHelloWorld()) and just
 make sure
  to call initHelloWorld well before you call wsHelloWorld.  Really
 you should
  add an eventListener to webService for LoadEvent.LOAD and not call
  helloworld until that LOAD has been received once.  Unfortunately, I
 have to
  go do something right now so I can't write that up.  Sorry for the
 confusion
  
  Dan Freiman
  nondocs http://nondocs.blogspot.com
  
  
  On 5/18/07, Daniel Freiman freimancq@ wrote:
  
   Hello world is an asynchronous call so the trace function will be
 called
   before HelloWorld is completed.  Instead try this:
  
   [Bindable]
   public var webService:WebService;
  
   public function wsHelloWorld():void{
 initHelloWorld();
 webService.HelloWorld(myInput.text); // call web service function
   }
  
   public function initHelloWorld():void{
   // initialization that only needs to be called once
   if (!webService) {
   webService = new WebService();
   webService.wsdl = myWsdl.text;
   webService.loadWSDL();
   webService.addEventListener(ResultEvent.RESULT, resultListener);
   }
   }
  
   public function resultListener(event:ResultEvent):void {
   // handle result of webservice
  trace(event.result );
   }
  
   Dan Freiman
   nondocs http://nondocs.blogspot.com
  
  
   On 5/18/07, hugocorept hugocore@  wrote:
   
  Hello you flexers
   
Well, i have created an WebService in AS, because in the mxml
 tag way,
the WSDL derived from an TextInput does NOT WORK.. :( sad... so i
create this simple AS but i cant get the lastResult successful,
 Always
give me null in the beginning, click again, and then the
result, and
for last [Object Object], can you light me :P ?
   
[Bindable] public var webService:WebService = new WebService;
   
public function wsHelloWorld():void{

[flexcoders] Re: WebService sending dynamic XML - problem

2007-05-19 Thread discipl4
Nate,

Thanks again for the reply.  I was AFK a few days myself, I see you
are afk too, hopefully doing something cool!

Its not so much that I want to pass N number of people..  I actually
only want to pass 1 person at a time with each call.  Its actually
that a person might have N number of tags underneath it.  A person
might have 2, 3, 6, or 9 attributes.

Your suggestion might still work for my scenario though, I will try it
out and let you know what kind of success I have!!!

Thanks again - all the best!

- - Dan



--- In flexcoders@yahoogroups.com, Nate Pearson [EMAIL PROTECTED] wrote:

 Ah, i gotcha.  Totally possible.  I do the same thing except backwards
 from .NET to Flex.
 
 So you want to pass N number of People.  
 People is an object that contains fields like first name, last name,
 phone, ect...
 
 I would create a class called person with these fields in it.  I would
 add N number of people to an array Collection.  Then in my WS call i
 would go ws.sendPeople(myPersonArrayCollection())
 
 On the back end side have the web service accept a generic array of
 objects.  I like to type them the same after I get them; so in .NET I
 would have a duplicate person class.  Stepping through the Generic
 array is not hard to do in .NET; just a few lines of code. I'm not
 sure what language you are using though.
 
 I have this written in a few applications.  If you need me to whip up
 a full example with a .NET backend just say so.  I have taken much
 more than I have given on this forum.  It's time to pay it forward :).
  I will be AFK until Tuesday so if you want an example try to respond
 before 5pm or so tonight.
 
 -Nate 
 
 
 --- In flexcoders@yahoogroups.com, discipl4 discipl4@ wrote:
 
  Nate,
  
  Thank you for the quick response!! :)
  
  I did not know you could implement a WS call the way you do, very
  cool, although unless Im understanding it improperly, I dont think it
  will work for me.  Please correct me if I am misinterpreting how your
  way works.
  
  You do ws.getMyFunction(firstName, lastName, city) .. for instance,
  and your webservice gets the data in an expected size and format,
  right?  It goes, param1 is the firstname, param2 is the lastname, and
  param3 is the city.  No definition involved but it is still finite.  
  
  What I need to do is have a flexible structure in my xml to have an
  infinite amount tags inside certain blocks. 
  
  So sometimes I might pass and xml that looks like this:
  
  person
  tag2FirstName/tag2
  tag3LastName/tag3
  tag4San Diego/tag4
  /person
  
  
  and sometimes I need to send this:
  
  person
  tag2FirstName/tag2
  tag3LastName/tag3
  tag4San Diego/tag4
  tag5Chicago/tag5
  tag6New York/tag6
  /person
  
  If I pass in the parameters as you have, I have no way to denote the
  beginning and end of that section that contains 'n' number of
elements.
  
  Does that make sense?  I know it's hairy :)  I really want to keep the
  XML structure.  I think if I did it your way, I could pass in a ton of
  parameters as key/value pairs and build the xml on the other side...
  like.. ws.getMyFunction(firstname, Bill, lastname, Smith, city1,
  Chicago) ...  but man, then I have to dissect the nice XML object that
  Flex gives you to work with.
  
  Thanks again for your time in hashing this out with me!!
  
  Best,
  
  - - Dan
  
  
  --- In flexcoders@yahoogroups.com, Nate Pearson napearson99@
wrote:
  
   This is how I do it:
   mx:WebService id=ws wsdl=http://myurl/service.asmx?WSDL; 
  useProxy=false  showBusyCursor=true
   mx:operation name=getMyFunction
 result=projectsHandler(event)/
   
   /mx:WebService
   
   Then in action script I go ws.getMyFunction(param1, param2, param3).
   
   You don't have to define your parameters in MXML.  If you don't,
Flex
   will let you send as many or as little parameters as you want. 
I only
   get an error if the amount of parameters that I send don't match the
   type and number on the server side.
   
   Hope this helps,
   
   Nate
   
   --- In flexcoders@yahoogroups.com, discipl4 discipl4@ wrote:
   
Hi friends - I have been wrestling with a problem that I was
hoping
you could help me out with :)

I understand the premise of defining a WebService in Flex, with
parameters and data, and sending the data over the wire to my
WSDL. 
However, I have a unique situation where I want to assemble a
 dynamic
XML file and send it over a WebService.  Unless you define a 1
to 1
mapping of parameters in Flex to a WSDL, I cant find any way
to make
this work.

Example:  This works just fine as an operation on a webservice - 

mx:operation name=SaveAction
 mx:request
  mx:myParameter{someStringVariable}/mx:myParameter
 /mx:request
/mx:operation

This is a 1 to 1 mapping of a parameter in Flex to my WSDL, which
expects 1 value called myParameter.

However, if I pass in an XML object, SOAP will change all of my
  and
 

[flexcoders] Re: WebService in AS

2007-05-19 Thread hugocorept
Hey thanks for the Help, that really light me!
So, i write something like this..

[Bindable] 
public var webService:WebService;

public function wsHelloWorld():void{


// initialization that only needs to be called 
once
if (!webService) {
webService = new WebService();
webService.wsdl = myWsdl.text;
webService.loadWSDL();  

webService.addEventListener(LoadEvent.LOAD, readyHelloWorld);

webService.addEventListener(ResultEvent.RESULT, resultListener);
}   

}

public function readyHelloWorld():void{
// call web service function Is Ready   
webService.HelloWorld(myInput.text); 
}

public function resultListener(event:ResultEvent):void {
// handle result of webservice
   trace(event.result);
}   

This is giving me: Argument count mismatch on main/readyHelloWorld().
Expected 0, got 1.


:s hum...
Grate for the help, Core

--- In flexcoders@yahoogroups.com, Daniel Freiman [EMAIL PROTECTED] wrote:

 Actually, I may have screwed this up because loadWSDL is also
asynchronous.
 Remove the first line of wsHelloWorld (initHelloWorld()) and just
make sure
 to call initHelloWorld well before you call wsHelloWorld.  Really
you should
 add an eventListener to webService for LoadEvent.LOAD and not call
 helloworld until that LOAD has been received once.  Unfortunately, I
have to
 go do something right now so I can't write that up.  Sorry for the
confusion
 
 Dan Freiman
 nondocs http://nondocs.blogspot.com
 
 
 On 5/18/07, Daniel Freiman [EMAIL PROTECTED] wrote:
 
  Hello world is an asynchronous call so the trace function will be
called
  before HelloWorld is completed.  Instead try this:
 
  [Bindable]
  public var webService:WebService;
 
  public function wsHelloWorld():void{
initHelloWorld();
webService.HelloWorld(myInput.text); // call web service function
  }
 
  public function initHelloWorld():void{
  // initialization that only needs to be called once
  if (!webService) {
  webService = new WebService();
  webService.wsdl = myWsdl.text;
  webService.loadWSDL();
  webService.addEventListener(ResultEvent.RESULT, resultListener);
  }
  }
 
  public function resultListener(event:ResultEvent):void {
  // handle result of webservice
 trace(event.result );
  }
 
  Dan Freiman
  nondocs http://nondocs.blogspot.com
 
 
  On 5/18/07, hugocorept [EMAIL PROTECTED]  wrote:
  
 Hello you flexers
  
   Well, i have created an WebService in AS, because in the mxml
tag way,
   the WSDL derived from an TextInput does NOT WORK.. :( sad... so i
   create this simple AS but i cant get the lastResult successful,
Always
   give me null in the beginning, click again, and then the result, and
   for last [Object Object], can you light me :P ?
  
   [Bindable] public var webService:WebService = new WebService;
  
   public function wsHelloWorld():void{
   webService.wsdl = myWsdl.text;
   webService.loadWSDL();
   webService.HelloWorld(myInput.text);
   trace(webService.HelloWorld.lastResult);
  
   }
  
   null
   Hello, testee (-- This is the THING!!)
   [object Object] (-- This enter in HelloWorldResponse Object, ??)
  
   Hope you can help on this,
   Grate for all the help!
  

  
 
 





[flexcoders] Re: WebService sending dynamic XML - problem

2007-05-18 Thread discipl4
It just doesn't seem 'right' to do that, you know?  :)  With all of
the great XML constructs in Flex, to have to do a sloppy translation
of gt; into  on the webservice side.. I cant sleep at night :)  It
seems like such a hack hehehe.


- - Dan



--- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote:

 Ah, rats.
 
  
 
 And you don't want to manually encode/decode the strings?
 
 Tracy
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of discipl4
 Sent: Wednesday, May 16, 2007 7:13 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: WebService sending dynamic XML - problem
 
  
 
 Tracy,
 
 Thanks for the reply :) If you pass it like that, it gets encoded :(
 The XML tags get turned into gt and lt because the SOAP wrapper
 thinks you were sending string data inside of 1 XML tag.. which you
 are really.
 
 That is my problem exactly.
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 , Tracy Spratt tspratt@ wrote:
 
  What happens if you sen the xml as a string explicitly, and then parse
  it into a dom on the server?
  
  mx:operation name=SaveAction
  mx:request
  mx:myParameter{myXMLObject.toXMLString()}/mx:myParameter
  /mx:request
  /mx:operation
  
  
  
  Tracy
  
  
  
  
  
  From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 ] On
  Behalf Of discipl4
  Sent: Wednesday, May 16, 2007 6:39 PM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
  Subject: [flexcoders] Re: WebService sending dynamic XML - problem
  
  
  
  Nate,
  
  Thank you for the quick response!! :)
  
  I did not know you could implement a WS call the way you do, very
  cool, although unless Im understanding it improperly, I dont think it
  will work for me. Please correct me if I am misinterpreting how your
  way works.
  
  You do ws.getMyFunction(firstName, lastName, city) .. for instance,
  and your webservice gets the data in an expected size and format,
  right? It goes, param1 is the firstname, param2 is the lastname, and
  param3 is the city. No definition involved but it is still finite. 
  
  What I need to do is have a flexible structure in my xml to have an
  infinite amount tags inside certain blocks. 
  
  So sometimes I might pass and xml that looks like this:
  
  person
  tag2FirstName/tag2
  tag3LastName/tag3
  tag4San Diego/tag4
  /person
  
  and sometimes I need to send this:
  
  person
  tag2FirstName/tag2
  tag3LastName/tag3
  tag4San Diego/tag4
  tag5Chicago/tag5
  tag6New York/tag6
  /person
  
  If I pass in the parameters as you have, I have no way to denote the
  beginning and end of that section that contains 'n' number of
 elements.
  
  Does that make sense? I know it's hairy :) I really want to keep the
  XML structure. I think if I did it your way, I could pass in a ton of
  parameters as key/value pairs and build the xml on the other side...
  like.. ws.getMyFunction(firstname, Bill, lastname, Smith, city1,
  Chicago) ... but man, then I have to dissect the nice XML object that
  Flex gives you to work with.
  
  Thanks again for your time in hashing this out with me!!
  
  Best,
  
  - - Dan
  
  --- In flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
  , Nate Pearson napearson99@ wrote:
  
   This is how I do it:
   mx:WebService id=ws wsdl=http://myurl/service.asmx?WSDL
 http://myurl/service.asmx?WSDL 
  http://myurl/service.asmx?WSDL http://myurl/service.asmx?WSDL   
   useProxy=false showBusyCursor=true
   mx:operation name=getMyFunction result=projectsHandler(event)/
   
   /mx:WebService
   
   Then in action script I go ws.getMyFunction(param1, param2, param3).
   
   You don't have to define your parameters in MXML. If you don't, Flex
   will let you send as many or as little parameters as you want. I
 only
   get an error if the amount of parameters that I send don't match the
   type and number on the server side.
   
   Hope this helps,
   
   Nate
   
   --- In flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com 
  mailto:flexcoders%40yahoogroups.com , discipl4 discipl4@ wrote:
   
Hi friends - I have been wrestling with a problem that I was
 hoping
you could help me out with :)

I understand the premise of defining a WebService in Flex, with
parameters and data, and sending the data over the wire to my
 WSDL. 
However, I have a unique situation where I want to assemble a
  dynamic
XML file and send it over a WebService. Unless you define a 1 to 1
mapping of parameters in Flex to a WSDL, I cant find any way to
 make
this work.

Example: This works just fine as an operation on a webservice - 

mx:operation name=SaveAction
mx:request
mx:myParameter{someStringVariable}/mx:myParameter
/mx:request

[flexcoders] Re: WebService sending dynamic XML - problem

2007-05-17 Thread Nate Pearson
Ah, i gotcha.  Totally possible.  I do the same thing except backwards
from .NET to Flex.

So you want to pass N number of People.  
People is an object that contains fields like first name, last name,
phone, ect...

I would create a class called person with these fields in it.  I would
add N number of people to an array Collection.  Then in my WS call i
would go ws.sendPeople(myPersonArrayCollection())

On the back end side have the web service accept a generic array of
objects.  I like to type them the same after I get them; so in .NET I
would have a duplicate person class.  Stepping through the Generic
array is not hard to do in .NET; just a few lines of code. I'm not
sure what language you are using though.

I have this written in a few applications.  If you need me to whip up
a full example with a .NET backend just say so.  I have taken much
more than I have given on this forum.  It's time to pay it forward :).
 I will be AFK until Tuesday so if you want an example try to respond
before 5pm or so tonight.

-Nate 


--- In flexcoders@yahoogroups.com, discipl4 [EMAIL PROTECTED] wrote:

 Nate,
 
 Thank you for the quick response!! :)
 
 I did not know you could implement a WS call the way you do, very
 cool, although unless Im understanding it improperly, I dont think it
 will work for me.  Please correct me if I am misinterpreting how your
 way works.
 
 You do ws.getMyFunction(firstName, lastName, city) .. for instance,
 and your webservice gets the data in an expected size and format,
 right?  It goes, param1 is the firstname, param2 is the lastname, and
 param3 is the city.  No definition involved but it is still finite.  
 
 What I need to do is have a flexible structure in my xml to have an
 infinite amount tags inside certain blocks. 
 
 So sometimes I might pass and xml that looks like this:
 
 person
 tag2FirstName/tag2
 tag3LastName/tag3
 tag4San Diego/tag4
 /person
 
 
 and sometimes I need to send this:
 
 person
 tag2FirstName/tag2
 tag3LastName/tag3
 tag4San Diego/tag4
 tag5Chicago/tag5
 tag6New York/tag6
 /person
 
 If I pass in the parameters as you have, I have no way to denote the
 beginning and end of that section that contains 'n' number of elements.
 
 Does that make sense?  I know it's hairy :)  I really want to keep the
 XML structure.  I think if I did it your way, I could pass in a ton of
 parameters as key/value pairs and build the xml on the other side...
 like.. ws.getMyFunction(firstname, Bill, lastname, Smith, city1,
 Chicago) ...  but man, then I have to dissect the nice XML object that
 Flex gives you to work with.
 
 Thanks again for your time in hashing this out with me!!
 
 Best,
 
 - - Dan
 
 
 --- In flexcoders@yahoogroups.com, Nate Pearson napearson99@ wrote:
 
  This is how I do it:
  mx:WebService id=ws wsdl=http://myurl/service.asmx?WSDL; 
 useProxy=false  showBusyCursor=true
  mx:operation name=getMyFunction
result=projectsHandler(event)/
  
  /mx:WebService
  
  Then in action script I go ws.getMyFunction(param1, param2, param3).
  
  You don't have to define your parameters in MXML.  If you don't, Flex
  will let you send as many or as little parameters as you want.  I only
  get an error if the amount of parameters that I send don't match the
  type and number on the server side.
  
  Hope this helps,
  
  Nate
  
  --- In flexcoders@yahoogroups.com, discipl4 discipl4@ wrote:
  
   Hi friends - I have been wrestling with a problem that I was hoping
   you could help me out with :)
   
   I understand the premise of defining a WebService in Flex, with
   parameters and data, and sending the data over the wire to my WSDL. 
   However, I have a unique situation where I want to assemble a
dynamic
   XML file and send it over a WebService.  Unless you define a 1 to 1
   mapping of parameters in Flex to a WSDL, I cant find any way to make
   this work.
   
   Example:  This works just fine as an operation on a webservice - 
   
   mx:operation name=SaveAction
mx:request
 mx:myParameter{someStringVariable}/mx:myParameter
/mx:request
   /mx:operation
   
   This is a 1 to 1 mapping of a parameter in Flex to my WSDL, which
   expects 1 value called myParameter.
   
   However, if I pass in an XML object, SOAP will change all of my
 and
to lt; and gt; to avoid breaking the SOAP envelope.  I
understand
   the need to do this, but I just cant find a way around it.
   
   Example:
   
   var myXMLObject:XML = tag1tag2/tag1/tag2
   
   mx:operation name=SaveAction
mx:request
 mx:myParameter{myXMLObject}/mx:myParameter
/mx:request
   /mx:operation
   
   The resulting packet across the wire will be one
   parameter(myparameter), with my XML as a string and all of the 
and 
   encoded to gt...etc.  I have tried every hack I can think of and I
   cant get this to work.  Has anyone else had experience using a
   dynamically sized XML as the model for a webservice?
   
   Any help is MUCH appreciated :)
   
   Best Regards,
   
   - - Dan
   

[flexcoders] Re: WebService sending dynamic XML - problem

2007-05-16 Thread Nate Pearson
This is how I do it:
mx:WebService id=ws wsdl=http://myurl/service.asmx?WSDL; 
   useProxy=false  showBusyCursor=true
mx:operation name=getMyFunction result=projectsHandler(event)/

/mx:WebService

Then in action script I go ws.getMyFunction(param1, param2, param3).

You don't have to define your parameters in MXML.  If you don't, Flex
will let you send as many or as little parameters as you want.  I only
get an error if the amount of parameters that I send don't match the
type and number on the server side.

Hope this helps,

Nate

--- In flexcoders@yahoogroups.com, discipl4 [EMAIL PROTECTED] wrote:

 Hi friends - I have been wrestling with a problem that I was hoping
 you could help me out with :)
 
 I understand the premise of defining a WebService in Flex, with
 parameters and data, and sending the data over the wire to my WSDL. 
 However, I have a unique situation where I want to assemble a dynamic
 XML file and send it over a WebService.  Unless you define a 1 to 1
 mapping of parameters in Flex to a WSDL, I cant find any way to make
 this work.
 
 Example:  This works just fine as an operation on a webservice - 
 
 mx:operation name=SaveAction
  mx:request
   mx:myParameter{someStringVariable}/mx:myParameter
  /mx:request
 /mx:operation
 
 This is a 1 to 1 mapping of a parameter in Flex to my WSDL, which
 expects 1 value called myParameter.
 
 However, if I pass in an XML object, SOAP will change all of my  and
  to lt; and gt; to avoid breaking the SOAP envelope.  I understand
 the need to do this, but I just cant find a way around it.
 
 Example:
 
 var myXMLObject:XML = tag1tag2/tag1/tag2
 
 mx:operation name=SaveAction
  mx:request
   mx:myParameter{myXMLObject}/mx:myParameter
  /mx:request
 /mx:operation
 
 The resulting packet across the wire will be one
 parameter(myparameter), with my XML as a string and all of the  and 
 encoded to gt...etc.  I have tried every hack I can think of and I
 cant get this to work.  Has anyone else had experience using a
 dynamically sized XML as the model for a webservice?
 
 Any help is MUCH appreciated :)
 
 Best Regards,
 
 - - Dan
 
 p.s. - I have come up with ways around this.. such as sending as an
 HTTPService with contentType=application/xml.. or decoding the gt,
 lt on the webservice side.  Both of those work, but neither of those
 fit within the webservice standards we currently apply here.  Thanks
 again.





[flexcoders] Re: WebService sending dynamic XML - problem

2007-05-16 Thread discipl4
Nate,

Thank you for the quick response!! :)

I did not know you could implement a WS call the way you do, very
cool, although unless Im understanding it improperly, I dont think it
will work for me.  Please correct me if I am misinterpreting how your
way works.

You do ws.getMyFunction(firstName, lastName, city) .. for instance,
and your webservice gets the data in an expected size and format,
right?  It goes, param1 is the firstname, param2 is the lastname, and
param3 is the city.  No definition involved but it is still finite.  

What I need to do is have a flexible structure in my xml to have an
infinite amount tags inside certain blocks. 

So sometimes I might pass and xml that looks like this:

person
tag2FirstName/tag2
tag3LastName/tag3
tag4San Diego/tag4
/person


and sometimes I need to send this:

person
tag2FirstName/tag2
tag3LastName/tag3
tag4San Diego/tag4
tag5Chicago/tag5
tag6New York/tag6
/person

If I pass in the parameters as you have, I have no way to denote the
beginning and end of that section that contains 'n' number of elements.

Does that make sense?  I know it's hairy :)  I really want to keep the
XML structure.  I think if I did it your way, I could pass in a ton of
parameters as key/value pairs and build the xml on the other side...
like.. ws.getMyFunction(firstname, Bill, lastname, Smith, city1,
Chicago) ...  but man, then I have to dissect the nice XML object that
Flex gives you to work with.

Thanks again for your time in hashing this out with me!!

Best,

- - Dan


--- In flexcoders@yahoogroups.com, Nate Pearson [EMAIL PROTECTED] wrote:

 This is how I do it:
 mx:WebService id=ws wsdl=http://myurl/service.asmx?WSDL; 
useProxy=false  showBusyCursor=true
 mx:operation name=getMyFunction result=projectsHandler(event)/
 
 /mx:WebService
 
 Then in action script I go ws.getMyFunction(param1, param2, param3).
 
 You don't have to define your parameters in MXML.  If you don't, Flex
 will let you send as many or as little parameters as you want.  I only
 get an error if the amount of parameters that I send don't match the
 type and number on the server side.
 
 Hope this helps,
 
 Nate
 
 --- In flexcoders@yahoogroups.com, discipl4 discipl4@ wrote:
 
  Hi friends - I have been wrestling with a problem that I was hoping
  you could help me out with :)
  
  I understand the premise of defining a WebService in Flex, with
  parameters and data, and sending the data over the wire to my WSDL. 
  However, I have a unique situation where I want to assemble a dynamic
  XML file and send it over a WebService.  Unless you define a 1 to 1
  mapping of parameters in Flex to a WSDL, I cant find any way to make
  this work.
  
  Example:  This works just fine as an operation on a webservice - 
  
  mx:operation name=SaveAction
   mx:request
mx:myParameter{someStringVariable}/mx:myParameter
   /mx:request
  /mx:operation
  
  This is a 1 to 1 mapping of a parameter in Flex to my WSDL, which
  expects 1 value called myParameter.
  
  However, if I pass in an XML object, SOAP will change all of my  and
   to lt; and gt; to avoid breaking the SOAP envelope.  I understand
  the need to do this, but I just cant find a way around it.
  
  Example:
  
  var myXMLObject:XML = tag1tag2/tag1/tag2
  
  mx:operation name=SaveAction
   mx:request
mx:myParameter{myXMLObject}/mx:myParameter
   /mx:request
  /mx:operation
  
  The resulting packet across the wire will be one
  parameter(myparameter), with my XML as a string and all of the  and 
  encoded to gt...etc.  I have tried every hack I can think of and I
  cant get this to work.  Has anyone else had experience using a
  dynamically sized XML as the model for a webservice?
  
  Any help is MUCH appreciated :)
  
  Best Regards,
  
  - - Dan
  
  p.s. - I have come up with ways around this.. such as sending as an
  HTTPService with contentType=application/xml.. or decoding the gt,
  lt on the webservice side.  Both of those work, but neither of those
  fit within the webservice standards we currently apply here.  Thanks
  again.
 





RE: [flexcoders] Re: WebService sending dynamic XML - problem

2007-05-16 Thread Tracy Spratt
What happens if you sen the xml as a string explicitly, and then parse
it into a dom on the server?

mx:operation name=SaveAction
mx:request
mx:myParameter{myXMLObject.toXMLString()}/mx:myParameter
/mx:request
/mx:operation

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of discipl4
Sent: Wednesday, May 16, 2007 6:39 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: WebService sending dynamic XML - problem

 

Nate,

Thank you for the quick response!! :)

I did not know you could implement a WS call the way you do, very
cool, although unless Im understanding it improperly, I dont think it
will work for me. Please correct me if I am misinterpreting how your
way works.

You do ws.getMyFunction(firstName, lastName, city) .. for instance,
and your webservice gets the data in an expected size and format,
right? It goes, param1 is the firstname, param2 is the lastname, and
param3 is the city. No definition involved but it is still finite. 

What I need to do is have a flexible structure in my xml to have an
infinite amount tags inside certain blocks. 

So sometimes I might pass and xml that looks like this:

person
tag2FirstName/tag2
tag3LastName/tag3
tag4San Diego/tag4
/person

and sometimes I need to send this:

person
tag2FirstName/tag2
tag3LastName/tag3
tag4San Diego/tag4
tag5Chicago/tag5
tag6New York/tag6
/person

If I pass in the parameters as you have, I have no way to denote the
beginning and end of that section that contains 'n' number of elements.

Does that make sense? I know it's hairy :) I really want to keep the
XML structure. I think if I did it your way, I could pass in a ton of
parameters as key/value pairs and build the xml on the other side...
like.. ws.getMyFunction(firstname, Bill, lastname, Smith, city1,
Chicago) ... but man, then I have to dissect the nice XML object that
Flex gives you to work with.

Thanks again for your time in hashing this out with me!!

Best,

- - Dan

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, Nate Pearson [EMAIL PROTECTED] wrote:

 This is how I do it:
 mx:WebService id=ws wsdl=http://myurl/service.asmx?WSDL
http://myurl/service.asmx?WSDL  
 useProxy=false showBusyCursor=true
 mx:operation name=getMyFunction result=projectsHandler(event)/
 
 /mx:WebService
 
 Then in action script I go ws.getMyFunction(param1, param2, param3).
 
 You don't have to define your parameters in MXML. If you don't, Flex
 will let you send as many or as little parameters as you want. I only
 get an error if the amount of parameters that I send don't match the
 type and number on the server side.
 
 Hope this helps,
 
 Nate
 
 --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com , discipl4 discipl4@ wrote:
 
  Hi friends - I have been wrestling with a problem that I was hoping
  you could help me out with :)
  
  I understand the premise of defining a WebService in Flex, with
  parameters and data, and sending the data over the wire to my WSDL. 
  However, I have a unique situation where I want to assemble a
dynamic
  XML file and send it over a WebService. Unless you define a 1 to 1
  mapping of parameters in Flex to a WSDL, I cant find any way to make
  this work.
  
  Example: This works just fine as an operation on a webservice - 
  
  mx:operation name=SaveAction
  mx:request
  mx:myParameter{someStringVariable}/mx:myParameter
  /mx:request
  /mx:operation
  
  This is a 1 to 1 mapping of a parameter in Flex to my WSDL, which
  expects 1 value called myParameter.
  
  However, if I pass in an XML object, SOAP will change all of my 
and
   to lt; and gt; to avoid breaking the SOAP envelope. I understand
  the need to do this, but I just cant find a way around it.
  
  Example:
  
  var myXMLObject:XML = tag1tag2/tag1/tag2
  
  mx:operation name=SaveAction
  mx:request
  mx:myParameter{myXMLObject}/mx:myParameter
  /mx:request
  /mx:operation
  
  The resulting packet across the wire will be one
  parameter(myparameter), with my XML as a string and all of the  and

  encoded to gt...etc. I have tried every hack I can think of and I
  cant get this to work. Has anyone else had experience using a
  dynamically sized XML as the model for a webservice?
  
  Any help is MUCH appreciated :)
  
  Best Regards,
  
  - - Dan
  
  p.s. - I have come up with ways around this.. such as sending as an
  HTTPService with contentType=application/xml.. or decoding the
gt,
  lt on the webservice side. Both of those work, but neither of those
  fit within the webservice standards we currently apply here. Thanks
  again.
 


 



[flexcoders] Re: WebService sending dynamic XML - problem

2007-05-16 Thread discipl4
Tracy,

Thanks for the reply :)  If you pass it like that, it gets encoded :(
 The XML tags get turned into gt and lt because the SOAP wrapper
thinks you were sending string data inside of 1 XML tag.. which you
are really.

That is my problem exactly.



--- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote:

 What happens if you sen the xml as a string explicitly, and then parse
 it into a dom on the server?
 
 mx:operation name=SaveAction
 mx:request
 mx:myParameter{myXMLObject.toXMLString()}/mx:myParameter
 /mx:request
 /mx:operation
 
  
 
 Tracy
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of discipl4
 Sent: Wednesday, May 16, 2007 6:39 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: WebService sending dynamic XML - problem
 
  
 
 Nate,
 
 Thank you for the quick response!! :)
 
 I did not know you could implement a WS call the way you do, very
 cool, although unless Im understanding it improperly, I dont think it
 will work for me. Please correct me if I am misinterpreting how your
 way works.
 
 You do ws.getMyFunction(firstName, lastName, city) .. for instance,
 and your webservice gets the data in an expected size and format,
 right? It goes, param1 is the firstname, param2 is the lastname, and
 param3 is the city. No definition involved but it is still finite. 
 
 What I need to do is have a flexible structure in my xml to have an
 infinite amount tags inside certain blocks. 
 
 So sometimes I might pass and xml that looks like this:
 
 person
 tag2FirstName/tag2
 tag3LastName/tag3
 tag4San Diego/tag4
 /person
 
 and sometimes I need to send this:
 
 person
 tag2FirstName/tag2
 tag3LastName/tag3
 tag4San Diego/tag4
 tag5Chicago/tag5
 tag6New York/tag6
 /person
 
 If I pass in the parameters as you have, I have no way to denote the
 beginning and end of that section that contains 'n' number of elements.
 
 Does that make sense? I know it's hairy :) I really want to keep the
 XML structure. I think if I did it your way, I could pass in a ton of
 parameters as key/value pairs and build the xml on the other side...
 like.. ws.getMyFunction(firstname, Bill, lastname, Smith, city1,
 Chicago) ... but man, then I have to dissect the nice XML object that
 Flex gives you to work with.
 
 Thanks again for your time in hashing this out with me!!
 
 Best,
 
 - - Dan
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 , Nate Pearson napearson99@ wrote:
 
  This is how I do it:
  mx:WebService id=ws wsdl=http://myurl/service.asmx?WSDL
 http://myurl/service.asmx?WSDL  
  useProxy=false showBusyCursor=true
  mx:operation name=getMyFunction result=projectsHandler(event)/
  
  /mx:WebService
  
  Then in action script I go ws.getMyFunction(param1, param2, param3).
  
  You don't have to define your parameters in MXML. If you don't, Flex
  will let you send as many or as little parameters as you want. I only
  get an error if the amount of parameters that I send don't match the
  type and number on the server side.
  
  Hope this helps,
  
  Nate
  
  --- In flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com , discipl4 discipl4@ wrote:
  
   Hi friends - I have been wrestling with a problem that I was hoping
   you could help me out with :)
   
   I understand the premise of defining a WebService in Flex, with
   parameters and data, and sending the data over the wire to my WSDL. 
   However, I have a unique situation where I want to assemble a
 dynamic
   XML file and send it over a WebService. Unless you define a 1 to 1
   mapping of parameters in Flex to a WSDL, I cant find any way to make
   this work.
   
   Example: This works just fine as an operation on a webservice - 
   
   mx:operation name=SaveAction
   mx:request
   mx:myParameter{someStringVariable}/mx:myParameter
   /mx:request
   /mx:operation
   
   This is a 1 to 1 mapping of a parameter in Flex to my WSDL, which
   expects 1 value called myParameter.
   
   However, if I pass in an XML object, SOAP will change all of my 
 and
to lt; and gt; to avoid breaking the SOAP envelope. I understand
   the need to do this, but I just cant find a way around it.
   
   Example:
   
   var myXMLObject:XML = tag1tag2/tag1/tag2
   
   mx:operation name=SaveAction
   mx:request
   mx:myParameter{myXMLObject}/mx:myParameter
   /mx:request
   /mx:operation
   
   The resulting packet across the wire will be one
   parameter(myparameter), with my XML as a string and all of the  and
 
   encoded to gt...etc. I have tried every hack I can think of and I
   cant get this to work. Has anyone else had experience using a
   dynamically sized XML as the model for a webservice?
   
   Any help is MUCH appreciated :)
   
   Best Regards,
   
   - - Dan
   
   p.s. - I have come up with ways around this.. such as sending as an
   HTTPService with contentType=application/xml.. or decoding the
 gt,
   lt on the webservice side. Both

RE: [flexcoders] Re: WebService sending dynamic XML - problem

2007-05-16 Thread Tracy Spratt
Ah, rats.

 

And you don't want to manually encode/decode the strings?

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of discipl4
Sent: Wednesday, May 16, 2007 7:13 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: WebService sending dynamic XML - problem

 

Tracy,

Thanks for the reply :) If you pass it like that, it gets encoded :(
The XML tags get turned into gt and lt because the SOAP wrapper
thinks you were sending string data inside of 1 XML tag.. which you
are really.

That is my problem exactly.

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, Tracy Spratt [EMAIL PROTECTED] wrote:

 What happens if you sen the xml as a string explicitly, and then parse
 it into a dom on the server?
 
 mx:operation name=SaveAction
 mx:request
 mx:myParameter{myXMLObject.toXMLString()}/mx:myParameter
 /mx:request
 /mx:operation
 
 
 
 Tracy
 
 
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] On
 Behalf Of discipl4
 Sent: Wednesday, May 16, 2007 6:39 PM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] Re: WebService sending dynamic XML - problem
 
 
 
 Nate,
 
 Thank you for the quick response!! :)
 
 I did not know you could implement a WS call the way you do, very
 cool, although unless Im understanding it improperly, I dont think it
 will work for me. Please correct me if I am misinterpreting how your
 way works.
 
 You do ws.getMyFunction(firstName, lastName, city) .. for instance,
 and your webservice gets the data in an expected size and format,
 right? It goes, param1 is the firstname, param2 is the lastname, and
 param3 is the city. No definition involved but it is still finite. 
 
 What I need to do is have a flexible structure in my xml to have an
 infinite amount tags inside certain blocks. 
 
 So sometimes I might pass and xml that looks like this:
 
 person
 tag2FirstName/tag2
 tag3LastName/tag3
 tag4San Diego/tag4
 /person
 
 and sometimes I need to send this:
 
 person
 tag2FirstName/tag2
 tag3LastName/tag3
 tag4San Diego/tag4
 tag5Chicago/tag5
 tag6New York/tag6
 /person
 
 If I pass in the parameters as you have, I have no way to denote the
 beginning and end of that section that contains 'n' number of
elements.
 
 Does that make sense? I know it's hairy :) I really want to keep the
 XML structure. I think if I did it your way, I could pass in a ton of
 parameters as key/value pairs and build the xml on the other side...
 like.. ws.getMyFunction(firstname, Bill, lastname, Smith, city1,
 Chicago) ... but man, then I have to dissect the nice XML object that
 Flex gives you to work with.
 
 Thanks again for your time in hashing this out with me!!
 
 Best,
 
 - - Dan
 
 --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com
 , Nate Pearson napearson99@ wrote:
 
  This is how I do it:
  mx:WebService id=ws wsdl=http://myurl/service.asmx?WSDL
http://myurl/service.asmx?WSDL 
 http://myurl/service.asmx?WSDL http://myurl/service.asmx?WSDL   
  useProxy=false showBusyCursor=true
  mx:operation name=getMyFunction result=projectsHandler(event)/
  
  /mx:WebService
  
  Then in action script I go ws.getMyFunction(param1, param2, param3).
  
  You don't have to define your parameters in MXML. If you don't, Flex
  will let you send as many or as little parameters as you want. I
only
  get an error if the amount of parameters that I send don't match the
  type and number on the server side.
  
  Hope this helps,
  
  Nate
  
  --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
 mailto:flexcoders%40yahoogroups.com , discipl4 discipl4@ wrote:
  
   Hi friends - I have been wrestling with a problem that I was
hoping
   you could help me out with :)
   
   I understand the premise of defining a WebService in Flex, with
   parameters and data, and sending the data over the wire to my
WSDL. 
   However, I have a unique situation where I want to assemble a
 dynamic
   XML file and send it over a WebService. Unless you define a 1 to 1
   mapping of parameters in Flex to a WSDL, I cant find any way to
make
   this work.
   
   Example: This works just fine as an operation on a webservice - 
   
   mx:operation name=SaveAction
   mx:request
   mx:myParameter{someStringVariable}/mx:myParameter
   /mx:request
   /mx:operation
   
   This is a 1 to 1 mapping of a parameter in Flex to my WSDL, which
   expects 1 value called myParameter.
   
   However, if I pass in an XML object, SOAP will change all of my 
 and
to lt; and gt; to avoid breaking the SOAP envelope. I
understand
   the need to do this, but I just cant find a way around it.
   
   Example:
   
   var myXMLObject:XML = tag1tag2/tag1/tag2
   
   mx:operation name=SaveAction
   mx:request
   mx:myParameter{myXMLObject

[flexcoders] Re: WebService Fault Handling - Flash Player 9 Update

2007-03-21 Thread Paul DeCoursey
How are sockets implemented then?  Also I have never seen the Flash
Player include the browsers cookies in requests.  This has been a big
complaint of mine for a very long time.  They only way I could get a
session shared with the browser was to pass in the session id using
External Interfaces.

And why can't you give us a workaround? Like a stack we can include in
our projects that isn't part of the player.  This issue almost made
Flex/Flash irrelevant to my current project.  I had to fight for weeks
to be able to use it.  In the end I made some false promises that I
had hoped adobe would get it fixed soon.

If I had the time and resources I'd fix it myself.

--- In flexcoders@yahoogroups.com, Matt Chotin [EMAIL PROTECTED] wrote:

 Well, the Player uses the browser's network stack so that it can be in
 sync with what the browser is doing (cookies) as well as reduce the
 amount of code we have to include in the runtime (size is critical as
 you know).  In Apollo we need to use the system network layer so we
 actually hope to have more access to the information you're looking for,
 but for the plugins we rely on the browser.  Were we to write our own
 network layer in AS we would lose the browser integration that is often
 important.
 
  
 
 Matt
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Paul DeCoursey
 Sent: Tuesday, March 20, 2007 10:45 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: WebService Fault Handling - Flash Player 9
 Update
 
  
 
 I find it hard to believe that we can create our own implementation
 that would support this using sockets but the built in method requires
 browser vendor help.
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 , Matt Chotin mchotin@ wrote:
 
  Unfortunately we cannot fix this without support from the browser
  vendors. We are in discussions with them to try to have the right
  information accessible to plugins in some of their next versions.
  
  Matt
  
  
  
  From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 ] On
  Behalf Of paulwelling
  Sent: Tuesday, March 20, 2007 8:59 AM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
  Subject: [flexcoders] WebService Fault Handling - Flash Player 9
 Update
  
  
  
  Hello,
  
  I just examined the latest FP9 Update Fixed Issues web page, and see
  no mention of the WebService Fault Handling Issue (fault body not
  passed to player) that has been discussed many times here...
  
  This is a really big issue for people not using a proxy, and I'm
  surprised that more of us haven't asked Adobe for this to be a
  priority fix, or at least come up with a real work around.
  
  Can someone tell me when this will be addressed..?
  
  Thanks,
  Paul
 





RE: [flexcoders] Re: WebService Fault Handling - Flash Player 9 Update

2007-03-21 Thread Matt Chotin
Sockets go through the OS network layer.  I'm sorry you haven't seen the
Player sending cookies, in most of my scenarios using a Player that runs
in an HTML page I've seen the headers being sent across.

 

I'm also sorry that there isn't a published workaround for you right
now, but I don't think we consider it the best use of our time to
rewrite an HTTP stack in AS3 for this issue when we've been working with
vendors to find solutions.  I know you think that as a big company we
have infinite resources but we simply don't, and this is one of the
issues where we've had to make some tough decisions.  Believe me, I ran
meetings for multiple weeks on this issue alone to see if we could find
a better way.

 

Matt

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Paul DeCoursey
Sent: Wednesday, March 21, 2007 6:50 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: WebService Fault Handling - Flash Player 9
Update

 

How are sockets implemented then? Also I have never seen the Flash
Player include the browsers cookies in requests. This has been a big
complaint of mine for a very long time. They only way I could get a
session shared with the browser was to pass in the session id using
External Interfaces.

And why can't you give us a workaround? Like a stack we can include in
our projects that isn't part of the player. This issue almost made
Flex/Flash irrelevant to my current project. I had to fight for weeks
to be able to use it. In the end I made some false promises that I
had hoped adobe would get it fixed soon.

If I had the time and resources I'd fix it myself.

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, Matt Chotin [EMAIL PROTECTED] wrote:

 Well, the Player uses the browser's network stack so that it can be in
 sync with what the browser is doing (cookies) as well as reduce the
 amount of code we have to include in the runtime (size is critical as
 you know). In Apollo we need to use the system network layer so we
 actually hope to have more access to the information you're looking
for,
 but for the plugins we rely on the browser. Were we to write our own
 network layer in AS we would lose the browser integration that is
often
 important.
 
 
 
 Matt
 
 
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] On
 Behalf Of Paul DeCoursey
 Sent: Tuesday, March 20, 2007 10:45 AM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] Re: WebService Fault Handling - Flash Player 9
 Update
 
 
 
 I find it hard to believe that we can create our own implementation
 that would support this using sockets but the built in method requires
 browser vendor help.
 
 --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com
 , Matt Chotin mchotin@ wrote:
 
  Unfortunately we cannot fix this without support from the browser
  vendors. We are in discussions with them to try to have the right
  information accessible to plugins in some of their next versions.
  
  Matt
  
  
  
  From: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com
 [mailto:flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com
 ] On
  Behalf Of paulwelling
  Sent: Tuesday, March 20, 2007 8:59 AM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
  Subject: [flexcoders] WebService Fault Handling - Flash Player 9
 Update
  
  
  
  Hello,
  
  I just examined the latest FP9 Update Fixed Issues web page, and see
  no mention of the WebService Fault Handling Issue (fault body not
  passed to player) that has been discussed many times here...
  
  This is a really big issue for people not using a proxy, and I'm
  surprised that more of us haven't asked Adobe for this to be a
  priority fix, or at least come up with a real work around.
  
  Can someone tell me when this will be addressed..?
  
  Thanks,
  Paul
 


 



[flexcoders] Re: WebService Fault Handling - Flash Player 9 Update

2007-03-20 Thread Paul DeCoursey
I find it hard to believe that we can create our own implementation
that would support this using sockets but the built in method requires
browser vendor help.

--- In flexcoders@yahoogroups.com, Matt Chotin [EMAIL PROTECTED] wrote:

 Unfortunately we cannot fix this without support from the browser
 vendors.  We are in discussions with them to try to have the right
 information accessible to plugins in some of their next versions.
  
 Matt
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of paulwelling
 Sent: Tuesday, March 20, 2007 8:59 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] WebService Fault Handling - Flash Player 9 Update
 
 
 
 Hello,
 
 I just examined the latest FP9 Update Fixed Issues web page, and see
 no mention of the WebService Fault Handling Issue (fault body not
 passed to player) that has been discussed many times here...
 
 This is a really big issue for people not using a proxy, and I'm
 surprised that more of us haven't asked Adobe for this to be a
 priority fix, or at least come up with a real work around.
 
 Can someone tell me when this will be addressed..?
 
 Thanks,
 Paul





[flexcoders] Re: WebService Fault Handling - Flash Player 9 Update

2007-03-20 Thread paulwelling
Hello,

Thank you for the response.


A malformed WSDL string set in the WebService will cause a 404 with
the following error, that does get passed to the FlashPlayer:

Unable to load WSDL. If currently online, please verify the URI and/or
format of the WSDL.

Is it only Faults - 500, that won't get passed to the FlashPlayer when
run without a proxy?

Is it realistic to expect that this issue will get addressed in the
short-term?

Thank you,
Paul



--- In flexcoders@yahoogroups.com, Matt Chotin [EMAIL PROTECTED] wrote:

 Unfortunately we cannot fix this without support from the browser
 vendors.  We are in discussions with them to try to have the right
 information accessible to plugins in some of their next versions.
  
 Matt
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of paulwelling
 Sent: Tuesday, March 20, 2007 8:59 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] WebService Fault Handling - Flash Player 9 Update
 
 
 
 Hello,
 
 I just examined the latest FP9 Update Fixed Issues web page, and see
 no mention of the WebService Fault Handling Issue (fault body not
 passed to player) that has been discussed many times here...
 
 This is a really big issue for people not using a proxy, and I'm
 surprised that more of us haven't asked Adobe for this to be a
 priority fix, or at least come up with a real work around.
 
 Can someone tell me when this will be addressed..?
 
 Thanks,
 Paul





RE: [flexcoders] Re: WebService Fault Handling - Flash Player 9 Update

2007-03-20 Thread Matt Chotin
Well, the Player uses the browser's network stack so that it can be in
sync with what the browser is doing (cookies) as well as reduce the
amount of code we have to include in the runtime (size is critical as
you know).  In Apollo we need to use the system network layer so we
actually hope to have more access to the information you're looking for,
but for the plugins we rely on the browser.  Were we to write our own
network layer in AS we would lose the browser integration that is often
important.

 

Matt

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Paul DeCoursey
Sent: Tuesday, March 20, 2007 10:45 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: WebService Fault Handling - Flash Player 9
Update

 

I find it hard to believe that we can create our own implementation
that would support this using sockets but the built in method requires
browser vendor help.

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, Matt Chotin [EMAIL PROTECTED] wrote:

 Unfortunately we cannot fix this without support from the browser
 vendors. We are in discussions with them to try to have the right
 information accessible to plugins in some of their next versions.
 
 Matt
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] On
 Behalf Of paulwelling
 Sent: Tuesday, March 20, 2007 8:59 AM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] WebService Fault Handling - Flash Player 9
Update
 
 
 
 Hello,
 
 I just examined the latest FP9 Update Fixed Issues web page, and see
 no mention of the WebService Fault Handling Issue (fault body not
 passed to player) that has been discussed many times here...
 
 This is a really big issue for people not using a proxy, and I'm
 surprised that more of us haven't asked Adobe for this to be a
 priority fix, or at least come up with a real work around.
 
 Can someone tell me when this will be addressed..?
 
 Thanks,
 Paul


 



RE: [flexcoders] Re: WebService Fault Handling - Flash Player 9 Update

2007-03-20 Thread Matt Chotin
IE will tell us the status code (404 or 500) but it won't give us the
body of the HTTP packets which would include the details.  Mozilla
doesn't give us either.  Until the browser can provide us with this info
it won't be addressed, though we are trying to push for it in the
timeframe of the next major Player release.

 

Matt

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of paulwelling
Sent: Tuesday, March 20, 2007 1:09 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: WebService Fault Handling - Flash Player 9
Update

 

Hello,

Thank you for the response.

A malformed WSDL string set in the WebService will cause a 404 with
the following error, that does get passed to the FlashPlayer:

Unable to load WSDL. If currently online, please verify the URI and/or
format of the WSDL.

Is it only Faults - 500, that won't get passed to the FlashPlayer when
run without a proxy?

Is it realistic to expect that this issue will get addressed in the
short-term?

Thank you,
Paul

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, Matt Chotin [EMAIL PROTECTED] wrote:

 Unfortunately we cannot fix this without support from the browser
 vendors. We are in discussions with them to try to have the right
 information accessible to plugins in some of their next versions.
 
 Matt
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] On
 Behalf Of paulwelling
 Sent: Tuesday, March 20, 2007 8:59 AM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] WebService Fault Handling - Flash Player 9
Update
 
 
 
 Hello,
 
 I just examined the latest FP9 Update Fixed Issues web page, and see
 no mention of the WebService Fault Handling Issue (fault body not
 passed to player) that has been discussed many times here...
 
 This is a really big issue for people not using a proxy, and I'm
 surprised that more of us haven't asked Adobe for this to be a
 priority fix, or at least come up with a real work around.
 
 Can someone tell me when this will be addressed..?
 
 Thanks,
 Paul


 



[flexcoders] Re: Webservice null values?

2007-02-22 Thread wayne_badu_johnson
Anyone?


--- In flexcoders@yahoogroups.com, wayne_badu_johnson 
[EMAIL PROTECTED] wrote:

 
 Hi
 
 How can I send through a null value via a WS call , given the 
 following wsdl settings:
 xsd:element minOccurs=0 name=expiry nillable=true 
 type=string/
 
 'expiry' is an optional field where a null value indicates that no 
 specific expiry is set, that is, I'd like to stream the following:
 expiry xsi:type=nil/
 
 Thus far in my WS send I have tried NOT setting a value , in other 
 words not sending 'expiry' through at all and it doesn't get 
posted. 
 If I explictly set it to 'null' and send it through it also 
doesn't 
 get posted. 
 
 How can I make 'expiry' with a null value be posted?
 
 Cheers
 Wayne





[flexcoders] Re: WebService base64Binary

2007-02-21 Thread fritzdimmel
Has anybody been able to do this?
I need exacte the same thing!

Thanks
Fritz

--- In flexcoders@yahoogroups.com, John Starfire [EMAIL PROTECTED] wrote:

 I don't really know how to deal with an image, encoded with
 base62Binary, that I receive from a webservice (e.g.
 http://www.webservicex.net/barcode.asmx).
 
 Is there a chance that I can decode it using Actionscript?
 
 Thanks for your help!
 //Jo





[flexcoders] Re: WebService base64Binary

2007-02-21 Thread Cato Paus
Hi have you been on this page http://www.bytearray.org
they are talking about some Base64.as ...

hope it helps


Cato Paus

--- In flexcoders@yahoogroups.com, John Starfire [EMAIL PROTECTED] wrote:

 I don't really know how to deal with an image, encoded with
 base62Binary, that I receive from a webservice (e.g.
 http://www.webservicex.net/barcode.asmx).
 
 Is there a chance that I can decode it using Actionscript?
 
 Thanks for your help!
 //Jo





AW: [flexcoders] Re: WebService base64Binary

2007-02-21 Thread Harald Dehn
We extended the ByteArray Class with a base64 decoder and encoder.

 

Harald

 

  _  

Von: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Im
Auftrag von Cato Paus
Gesendet: Mittwoch, 21. Februar 2007 17:11
An: flexcoders@yahoogroups.com
Betreff: [flexcoders] Re: WebService  base64Binary

 

Hi have you been on this page http://www.bytearra http://www.bytearray.org
y.org
they are talking about some Base64.as ...

hope it helps

Cato Paus

--- In [EMAIL PROTECTED] mailto:flexcoders%40yahoogroups.com ups.com,
John Starfire [EMAIL PROTECTED] wrote:

 I don't really know how to deal with an image, encoded with
 base62Binary, that I receive from a webservice (e.g.
 http://www.webservi http://www.webservicex.net/barcode.asmx
cex.net/barcode.asmx).
 
 Is there a chance that I can decode it using Actionscript?
 
 Thanks for your help!
 //Jo


 



ByteArrayEx.as
Description: Binary data


AW: [flexcoders] Re: WebService base64Binary

2007-02-21 Thread Harald Dehn
Sorry I forgot an example:

 

function base64encode(text:String):String {

var ba:ByteArrayEx = new ByteArrayEx();

ba.writeUTFBytes(text);  // Fill ByteArray with
text

ba.base64encode();

ba.position = 0;

return ba.readUTFBytes(ba.length);

}

 

Harald

 

 

  _  

Von: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Im
Auftrag von Harald Dehn
Gesendet: Mittwoch, 21. Februar 2007 22:06
An: flexcoders@yahoogroups.com
Betreff: AW: [flexcoders] Re: WebService  base64Binary

 

We extended the ByteArray Class with a base64 decoder and encoder.

 

Harald

 

  _  

Von: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Im
Auftrag von Cato Paus
Gesendet: Mittwoch, 21. Februar 2007 17:11
An: flexcoders@yahoogroups.com
Betreff: [flexcoders] Re: WebService  base64Binary

 

Hi have you been on this page http://www.bytearra http://www.bytearray.org
y.org
they are talking about some Base64.as ...

hope it helps

Cato Paus

--- In [EMAIL PROTECTED] mailto:flexcoders%40yahoogroups.com ups.com,
John Starfire [EMAIL PROTECTED] wrote:

 I don't really know how to deal with an image, encoded with
 base62Binary, that I receive from a webservice (e.g.
 http://www.webservi http://www.webservicex.net/barcode.asmx
cex.net/barcode.asmx).
 
 Is there a chance that I can decode it using Actionscript?
 
 Thanks for your help!
 //Jo


 



RE: [flexcoders] Re: WebService base64Binary

2007-02-21 Thread Andrew Trice
There are also the Base64Encoder and Base64Decoder classes that are
native to Flex.

 

import mx.utils.Base64Encoder;

import mx.utils.Base64Decoder;

 

private function base64Encode( data : ByteArray ) : String

{

var encoder : Base64Encoder = new Base64Encoder();

encoder.encodeBytes( data );

return encoder.flush();

}

 

private function base64Decide( string : String ) : ByteArray

{

var decoder : Base64Decoder = new Base64Decoder();

decoder.decode( string );

return decoder.flush();

}

 

 

_

Andrew Trice

Cynergy Systems, Inc.

http://www.cynergysystems.com

 

Blog: http://www.cynergysystems.com/blogs/page/andrewtrice

Email: [EMAIL PROTECTED]

Office: 866-CYNERGY 

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Harald Dehn
Sent: Wednesday, February 21, 2007 4:11 PM
To: flexcoders@yahoogroups.com
Subject: AW: [flexcoders] Re: WebService  base64Binary

 

Sorry I forgot an example:

 

function base64encode(text:String):String {

var ba:ByteArrayEx = new ByteArrayEx();

ba.writeUTFBytes(text);  // Fill ByteArray
with text

ba.base64encode();

ba.position = 0;

return ba.readUTFBytes(ba.length);

}

 

Harald

 

 



Von: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Im
Auftrag von Harald Dehn
Gesendet: Mittwoch, 21. Februar 2007 22:06
An: flexcoders@yahoogroups.com
Betreff: AW: [flexcoders] Re: WebService  base64Binary

 

We extended the ByteArray Class with a base64 decoder and encoder.

 

Harald

 



Von: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Im
Auftrag von Cato Paus
Gesendet: Mittwoch, 21. Februar 2007 17:11
An: flexcoders@yahoogroups.com
Betreff: [flexcoders] Re: WebService  base64Binary

 

Hi have you been on this page http://www.bytearray.org
http://www.bytearray.org 
they are talking about some Base64.as ...

hope it helps

Cato Paus

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, John Starfire [EMAIL PROTECTED] wrote:

 I don't really know how to deal with an image, encoded with
 base62Binary, that I receive from a webservice (e.g.
 http://www.webservicex.net/barcode.asmx
http://www.webservicex.net/barcode.asmx ).
 
 Is there a chance that I can decode it using Actionscript?
 
 Thanks for your help!
 //Jo


 



[flexcoders] Re: WebService, destination, Basic Auth

2007-02-17 Thread ecpmaz
Does anybody have any example for that ?

{Maz}

 I've been struggling for hours to understand what is said in the
 livedoc but I do not manage to figure out how to do that !!! Adobe
 surely have to improve their data acess and interconnectivity help
 part !
 
 So, I want to access a WebService which requires to be authentified by
 a Basic Anthentication process. How would you that ?
 
 Apparently I have to define a so-called destination, in config
 files... here's what i dended up with (not working obviously) :
 
 -- services-config.xml --
 
 ?xml version=1.0 encoding=UTF-8?
 services-config
   services
   !-- PROXY SERVICE --
   service-include file-path=proxy-config.xml/
   /services
 /services-config
 
 -- proxy-config.xml --
 
 ?xml version=1.0 encoding=UTF-8?
 destination id=bmDestination
   adapter ref=soap-proxy /
   properties
   

wsdlhttp://localhost:/BubbleMindServer/services/bubblemind?wsdl/wsdl
   
soaphttp://localhost:/BubbleMindServer/services/bubblemind/soap
   /properties
 /destination
 
 -- and in my mxml --
 
 mx:WebService
 id=bmSoapService
   destination=bmDestination
   useProxy=true
 showBusyCursor=false
 /
 
 Any help please ?
 
 {Maz}





[flexcoders] Re: WebService woes - faultCode: EncodingError - faultString: Unknown Property

2007-01-25 Thread gustavo.saume
Hello yall,

we had the same problem and realize that when you define in your 
server side that a WebService receive an ArrayList (Java) of an 
specific type of content you can´t pass an empty ArrayCollection from 
Flex to the Server. You must at least add an empty Item of the 
speficed type to the ArrayCollection and it´ll solve the problem

HTH
Gustavo Saume
CINet Consultores
+58412.224.17.58
Caracas-Venezuela

--- In flexcoders@yahoogroups.com, Paul Spitzer [EMAIL PROTECTED] wrote:

 Turns out this was caused by the images property which was an empty 
 ArrayCollection. The operation succeeds if I pass null for the 
images. I 
 have no idea why the error was reporting what it was.
 
 
 
 Paul Spitzer wrote:
  Hi all,
 
  Hoping someone can help me out here. We've recently switched our 
Web 
  Services implementation on the server from Axis to XFire. With 
the 
  switch one of the existing working operations is now failing. The 
  failure happens somewhere in the Flex Web Service classes when 
the 
  request to call the service operation occurs. The request never 
makes it 
  to the server as Flex stops it and throws a fault. Here's some 
  (simplified) code..
 
  ---
  // AbstractWebServiceRequest class
 
  // constructor
  this.service = new WebService();
  this.service.makeObjectsBindable = false;
  this.service.wsdl = this.getWsdlPath();
  this.service.addEventListener(ResultEvent.RESULT, 
this.handleResult);
  this.service.addEventListener(FaultEvent.FAULT, this.handleFault);
  this.service.loadWSDL();
 
  ...
 
  // execute method
  var args: Array = this.getOperationArguments();
  var operationName: String = this.getOperationName();
  var operation: Operation = this.service.getOperation
(operationName) as 
  Operation;
  operation.send.apply(this, args);
  ---
 
  Everything is fine up to the point that the request is sent via 
the 
  operation's send method. The request is never actually sent to 
the 
  server. Instead the handleFault handler is called. The Fault 
object in 
  the FaultEvent reports..
 
  faultCode:EncodingError
  faultString:'Unknown Property: 'creationDate'.'
  faultDetail:'null'
 
  The object that is sent as an argument to the operation has the 
  following schema..
 
  xsd:complexType name=TheObject
xsd:sequence
  xsd:element minOccurs=0 name=creationDate 
type=xsd:dateTime/
  xsd:element minOccurs=0 name=customerId type=xsd:long/
  xsd:element minOccurs=0 name=height type=xsd:int/
  xsd:element minOccurs=0 name=id type=xsd:long/
  xsd:element minOccurs=0 name=images nillable=true 
  type=ns1:ArrayOfScrollerImage/
  xsd:element minOccurs=0 name=modificationDate 
type=xsd:dateTime/
  xsd:element minOccurs=0 name=name nillable=true 
  type=xsd:string/
  xsd:element minOccurs=0 name=version type=xsd:long/
  xsd:element minOccurs=0 name=width type=xsd:int/
/xsd:sequence
  /xsd:complexType
 
  The actual object looks like (including the creationDate)..
 
  object = TheObject (@ee5f8b1)
 creationDate = Date (@f0695b1)
 date = 17 [0x11]
 dateUTC = 17 [0x11]
 day = 5 [0x5]
 dayUTC = 5 [0x5]
 fullYear = 2006 [0x7d6]
 fullYearUTC = 2006 [0x7d6]
 hours = 10 [0xa]
 hoursUTC = 17 [0x11]
 milliseconds = 234 [0xea]
 millisecondsUTC = 234 [0xea]
 minutes = 1 [0x1]
 minutesUTC = 1 [0x1]
 month = 10 [0xa]
 monthUTC = 10 [0xa]
 seconds = 23 [0x17]
 secondsUTC = 23 [0x17]
 time = 1163782883234 [0x10ef6dd87a2]
 timezoneOffset = 420 [0x1a4]
 customerId = 117 [0x75]
 height = 160 [0xa0]
 id = -1 [0x]
 images = mx.collections.ArrayCollection (@32dd551)
 imagesLength = 0 [0x0]
 imagesXmlString = images/images
 modificationDate = Date (@f069881)
 name = TheObjectName
 template = TheObjectTemplate (@eee6b31)
 templateId = 1 [0x1]
 version = -1 [0x]
 width = 266 [0x10a]
 
 
  Anyone have any ideas what's causing the fault?
 
  thanks,
 
  Paul
 
   
 
 





[flexcoders] Re: WebService bug?

2007-01-12 Thread herrodius
Hi Ben,

We are using the 2.0.1 version.

I have just discovered that this problem only occurs when using
collections of objects that are typed to a superclass of the objects.

For instance, I have a class MediaItem. My 2 concrete subclasses are
CD and DVD. A CD has a Tracks property and a DVD has a Actors
property. When I send over a MediaItem array, it is correctly
converted to an ArrayCollection but the Tracks and the Actors
collections in the subclasses of MediaItem are ObjectProxy instances.

To solve this, let's move the Tracks property of the CD class to the
MediaItem superclass. The Tracks property is then also converted to an
ArrayCollection.

Seems like a bug in the deserialisation of the data, what do you and
others think? Should I file a bug and where?

regards,
Christophe

--- In flexcoders@yahoogroups.com, ben.clinkinbeard
[EMAIL PROTECTED] wrote:

 Are you using 2.0.1? There were a handful of WebService
 serialization/deserialization issues resolved, some of which were
 specific to .NET services.
 
 You might also want to check out Darron Schall's ObjectTranslator
 class: http://www.darronschall.com/weblog/archives/000247.cfm.
 
 HTH,
 Ben
 
 
 --- In flexcoders@yahoogroups.com, herrodius lists@ wrote:
 
  Hi all,
  
  we are currently creating a series of webservices to talk to our .Net
  backend system. We are sending over nested value objects which
  sometimes contain nested arrays of objects. When we receive an array
  in Flex, it is mapped to an ArrayCollection. We then have to do the
  actual object mapping manually, which is the way to go I suppose.
  
  But when we send over nested arrays, the first array is converted to
  an ArrayCollection successfully but every other (deeper) array is
  converted to an ObjectProxy in which there is an ArrayCollection that
  contains the actual data of the Array. There seems to be an extra
  object/level that gets created.
  
  An example (debugger output):
  
  result (ObjectProxy)
  - Components (ArrayCollection)
  -- [0] (ObjectProxy)
  -- [1] (ObjectProxy)
  --- Answers (ObjectProxy, should be ArrayCollection)
   GapAnswer (ArrayCollection, does not exist in the original object
  and should not be here)
  - [0]
  - [1]
  
  As you can see there is an Answers property in the second item of
  the Components ArrayCollection. This should be an ArrayCollection
  instead of an ObjectProxy and the GapAnswer property in it should
  not even exist. (GapAnswer is the type of the .Net Answers array -
  GapAnswer[] Answers)
  
  Has anyone run into this before? Could this be a bug in the
  deserialization of the objects?
  
  regards,
  Christophe
 





[flexcoders] Re: WebService bug?

2007-01-11 Thread ben.clinkinbeard
Are you using 2.0.1? There were a handful of WebService
serialization/deserialization issues resolved, some of which were
specific to .NET services.

You might also want to check out Darron Schall's ObjectTranslator
class: http://www.darronschall.com/weblog/archives/000247.cfm.

HTH,
Ben


--- In flexcoders@yahoogroups.com, herrodius [EMAIL PROTECTED] wrote:

 Hi all,
 
 we are currently creating a series of webservices to talk to our .Net
 backend system. We are sending over nested value objects which
 sometimes contain nested arrays of objects. When we receive an array
 in Flex, it is mapped to an ArrayCollection. We then have to do the
 actual object mapping manually, which is the way to go I suppose.
 
 But when we send over nested arrays, the first array is converted to
 an ArrayCollection successfully but every other (deeper) array is
 converted to an ObjectProxy in which there is an ArrayCollection that
 contains the actual data of the Array. There seems to be an extra
 object/level that gets created.
 
 An example (debugger output):
 
 result (ObjectProxy)
 - Components (ArrayCollection)
 -- [0] (ObjectProxy)
 -- [1] (ObjectProxy)
 --- Answers (ObjectProxy, should be ArrayCollection)
  GapAnswer (ArrayCollection, does not exist in the original object
 and should not be here)
 - [0]
 - [1]
 
 As you can see there is an Answers property in the second item of
 the Components ArrayCollection. This should be an ArrayCollection
 instead of an ObjectProxy and the GapAnswer property in it should
 not even exist. (GapAnswer is the type of the .Net Answers array -
 GapAnswer[] Answers)
 
 Has anyone run into this before? Could this be a bug in the
 deserialization of the objects?
 
 regards,
 Christophe





[flexcoders] Re: webservice SOAP envelope

2007-01-10 Thread phipzkillah
I used this 3rd part app to view all http and soap headers.  Its free
and lite.  Check it out here:

https://wsmonitor.dev.java.net/

--- In flexcoders@yahoogroups.com, mrinal.wadhwa [EMAIL PROTECTED]
wrote:

 Is there a way to see the outgoing/incoming SOAP envelopes when I call
 an operation in a webservice from a flex app





[flexcoders] Re: webservice SOAP envelope

2007-01-10 Thread paulwelling
Hello mw,

There maybe others, but Charles works great:

http://xk72.com/charles/

Paul

--- In flexcoders@yahoogroups.com, mrinal.wadhwa [EMAIL PROTECTED]
wrote:

 Is there a way to see the outgoing/incoming SOAP envelopes when I call
 an operation in a webservice from a flex app





[flexcoders] Re: Webservice WSDL ActionScript authentication and operations - n00bie

2006-12-11 Thread phipzkillah
Ben,

What is the best way to go about handling the result from the
operations.send() call.  I'm sure you must have to add an event
listener on the operations call.  

I do not fully understand the Iresponder from your initial posting.


You can optionally capture the token created by the call and assign a
responder as well:

var call:ASyncToken = op.send();
call.addResponder(IResponder);
The IResponder interface defines a result and fault method that are
called when the operation returns. 

I tried to add that into my code and received the error:

1046: Type was not found or was not a compile-time constant: ASyncToken.

I believe I have all the proper classes imported:

import mx.rpc.soap.WebService;
import mx.rpc.soap.WSDL;
import mx.rpc.soap.*;
import mx.rpc.IResponder;
import mx.rpc.*;
import mx.rpc.events.ResultEvent;
import mx.rpc.AsyncToken;

Now even if I get the error eliminated, how do you add a resultHandler
function to capture the xml returned from the operations call?

Maybe you can briefly explain how the AsyncToken and Iresponder work?

Here is my current snippet of code:
private function init():void{
var ws:WebService = new WebService;
ws.wsdl = 
http://www.myservice.com/services/InventoryService?wsdl;;
ws.useProxy = false;

ws.loadWSDL(http://www.myservice.com/services/InventoryService?wsdl;);

var op:Operation = ws.getOperation(getPhones) as 
Operation;
op.arguments.projectId = 1;
op.resultFormat= e4x; 

//var call:ASyncToken = op.send(); //1046 error
//call.addResponder(IResponder);

op.send();
}

Thanks for all your help to far.  It has definitely helped!!

--Phil

--- In flexcoders@yahoogroups.com, ben.clinkinbeard
[EMAIL PROTECTED] wrote:

  is that the method we are trying to call through the web service?
 Yep.
 
 You know, I almost included the bit about e4x the first time but
 decided against it. For that you simply do op.resultFormat = e4x;
 
 Flex handles the serialization of your objects for you, so you just
 put the arguments your method requires onto the arguments property. So
 if your remote method's signature is: doCoolStuff(name:String,
 age:Number, hobbies:Array), you would use the following code in Flex:
 
 op.arguments.name = Bob Cratchett;
 op.arguments.age = 34;
 op.arguments.hobbies = new Array(working, playing with Tim, etc);
 
 HTH, let me know if you have additional questions.
 Ben
 
 
 --- In flexcoders@yahoogroups.com, phipzkillah pkrasko@ wrote:
 
  Thanks for your reply Ben.
  
  I have a few more questions, hopefully you can help.  The
  doCoolStuff, is that the method we are trying to call through the
  web service?  From your example it seems like you can specify
  operation arguments in either an object or array format.  I don't
  think I fully understand how the web service works interprets that...
  
  If a method requires certain parameters (ie: name:String, age:Number)
  how would you go about passing those in as arguments??
  
  op.arguments.objectArg = {name: John Doe, age: 26}  ??
  
  How do you specify the result format to be e4x?
  
  Help would be appreciated.
  
  -phil
  
  
  --- In flexcoders@yahoogroups.com, ben.clinkinbeard
  ben.clinkinbeard@ wrote:
  
   I've not dealt with authentication but here is how to call an
 operation.
   
   // getOperation() returns generic AbstractOperation by default
   // you want mx.rpc.Operation, not mx.rpc.mxml.Operation
   var op:Operation = ws.getOperation(doCoolStuff) as Operation;
   op.arguments.arrayArg = new Array(foo, bar);
   op.arguments.objectArg = {propA: tweedle, propB: dee};
   op.send();
   
   You can optionally capture the token created by the call and
assign a
   responder as well:
   
   var call:ASyncToken = op.send();
   call.addResponder(IResponder);
   
   The IResponder interface defines a result and fault method that are
   called when the operation returns.
   
   HTH,
   Ben
   
   
   
   --- In flexcoders@yahoogroups.com, phipzkillah pkrasko@ wrote:
   
Hi,

I am trying to create a web service in pure action script.  I
 need to
authenticate and then call the proper method from the web service.

I have not seen any good tutorials explaining how to do this...

This is my current snippet:

private function init():void{

 var ws:WebService = new WebService;

 ws.wsdl =
http://sc-vmx-03/clarusipc/services/InventoryService?wsdl;;
 ws.useProxy = false;


   
  
 

ws.loadWSDL(http://sc-vmx-03/clarusipc/services/InventoryService?wsdl;);

}

What is the format to add in 

[flexcoders] Re: Webservice WSDL ActionScript authentication and operations - n00bie

2006-12-11 Thread ben.clinkinbeard
Hey Phil,

Sure, let's go over ASyncToken and IResponder.

ASyncToken
(http://livedocs.macromedia.com/flex/2/langref/mx/rpc/AsyncToken.html)
From the docs: This class provides a place to set additional or
token-level data for asynchronous rpc operations. It also allows an
IResponder to be attached for an individual call. The AsyncToken can
be referenced in ResultEvent and FaultEvent from the token property.

So we capture the token/id of the remote call we're making by
assigning it to an ASyncToken instance, and then we can attach classes
that implement the IResponder interface as responders.

var call:ASyncToken = op.send();
call.addResponder(myResponderClass);

myResponderClass must be an instance of a class that implements the
IResponder interface
(http://livedocs.macromedia.com/flex/2/langref/mx/rpc/IResponder.html).
IResponder dictates that your class contains a result() method and a
fault() method. These methods (at least the appropriate one depending
on the success of your request) will be automatically called by the
ASyncToken when the remote call returns. The parameter for both
methods is of type object, but what is returned from a web service
call is either ResultEvent or FaultEvent, so you'll generally cast it
inside the method.

This approach allows you to have more than one object that will be
called when your service returns if you so choose.

HTH,
Ben


--- In flexcoders@yahoogroups.com, phipzkillah [EMAIL PROTECTED] wrote:

 Ben,
 
 What is the best way to go about handling the result from the
 operations.send() call.  I'm sure you must have to add an event
 listener on the operations call.  
 
 I do not fully understand the Iresponder from your initial posting.
 
 
 You can optionally capture the token created by the call and assign a
 responder as well:
 
 var call:ASyncToken = op.send();
 call.addResponder(IResponder);
 The IResponder interface defines a result and fault method that are
 called when the operation returns. 
 
 I tried to add that into my code and received the error:
 
 1046: Type was not found or was not a compile-time constant: ASyncToken.
 
 I believe I have all the proper classes imported:
 
 import mx.rpc.soap.WebService;
 import mx.rpc.soap.WSDL;
 import mx.rpc.soap.*;
 import mx.rpc.IResponder;
 import mx.rpc.*;
 import mx.rpc.events.ResultEvent;
 import mx.rpc.AsyncToken;
 
 Now even if I get the error eliminated, how do you add a resultHandler
 function to capture the xml returned from the operations call?
 
 Maybe you can briefly explain how the AsyncToken and Iresponder work?
 
 Here is my current snippet of code:
 private function init():void{
   var ws:WebService = new WebService;
   ws.wsdl = 
 http://www.myservice.com/services/InventoryService?wsdl;;
   ws.useProxy = false;
   
ws.loadWSDL(http://www.myservice.com/services/InventoryService?wsdl;);
   
   var op:Operation = ws.getOperation(getPhones) as 
 Operation;
   op.arguments.projectId = 1;
   op.resultFormat= e4x; 
   
   //var call:ASyncToken = op.send(); //1046 error
   //call.addResponder(IResponder);
   
   op.send();
   }
 
 Thanks for all your help to far.  It has definitely helped!!
 
 --Phil
 
 --- In flexcoders@yahoogroups.com, ben.clinkinbeard
 ben.clinkinbeard@ wrote:
 
   is that the method we are trying to call through the web service?
  Yep.
  
  You know, I almost included the bit about e4x the first time but
  decided against it. For that you simply do op.resultFormat = e4x;
  
  Flex handles the serialization of your objects for you, so you just
  put the arguments your method requires onto the arguments property. So
  if your remote method's signature is: doCoolStuff(name:String,
  age:Number, hobbies:Array), you would use the following code in Flex:
  
  op.arguments.name = Bob Cratchett;
  op.arguments.age = 34;
  op.arguments.hobbies = new Array(working, playing with Tim,
etc);
  
  HTH, let me know if you have additional questions.
  Ben
  
  
  --- In flexcoders@yahoogroups.com, phipzkillah pkrasko@ wrote:
  
   Thanks for your reply Ben.
   
   I have a few more questions, hopefully you can help.  The
   doCoolStuff, is that the method we are trying to call through the
   web service?  From your example it seems like you can specify
   operation arguments in either an object or array format.  I don't
   think I fully understand how the web service works interprets
that...
   
   If a method requires certain parameters (ie: name:String,
age:Number)
   how would you go about passing those in as arguments??
   
   op.arguments.objectArg = {name: John Doe, age: 26}  ??
   
   How do you specify the result format to be e4x?
   
   Help would be appreciated.
   
   -phil
   
   
   --- 

[flexcoders] Re: Webservice WSDL ActionScript authentication and operations - n00bie

2006-12-11 Thread phipzkillah
Ok, my 1046 error was from a typo, duh...

ASyncToken should have been AsyncToken


--- In flexcoders@yahoogroups.com, phipzkillah [EMAIL PROTECTED] wrote:

 Ben,
 
 What is the best way to go about handling the result from the
 operations.send() call.  I'm sure you must have to add an event
 listener on the operations call.  
 
 I do not fully understand the Iresponder from your initial posting.
 
 
 You can optionally capture the token created by the call and assign a
 responder as well:
 
 var call:ASyncToken = op.send();
 call.addResponder(IResponder);
 The IResponder interface defines a result and fault method that are
 called when the operation returns. 
 
 I tried to add that into my code and received the error:
 
 1046: Type was not found or was not a compile-time constant: ASyncToken.
 
 I believe I have all the proper classes imported:
 
 import mx.rpc.soap.WebService;
 import mx.rpc.soap.WSDL;
 import mx.rpc.soap.*;
 import mx.rpc.IResponder;
 import mx.rpc.*;
 import mx.rpc.events.ResultEvent;
 import mx.rpc.AsyncToken;
 
 Now even if I get the error eliminated, how do you add a resultHandler
 function to capture the xml returned from the operations call?
 
 Maybe you can briefly explain how the AsyncToken and Iresponder work?
 
 Here is my current snippet of code:
 private function init():void{
   var ws:WebService = new WebService;
   ws.wsdl = 
 http://www.myservice.com/services/InventoryService?wsdl;;
   ws.useProxy = false;
   
ws.loadWSDL(http://www.myservice.com/services/InventoryService?wsdl;);
   
   var op:Operation = ws.getOperation(getPhones) as 
 Operation;
   op.arguments.projectId = 1;
   op.resultFormat= e4x; 
   
   //var call:ASyncToken = op.send(); //1046 error
   //call.addResponder(IResponder);
   
   op.send();
   }
 
 Thanks for all your help to far.  It has definitely helped!!
 
 --Phil
 
 --- In flexcoders@yahoogroups.com, ben.clinkinbeard
 ben.clinkinbeard@ wrote:
 
   is that the method we are trying to call through the web service?
  Yep.
  
  You know, I almost included the bit about e4x the first time but
  decided against it. For that you simply do op.resultFormat = e4x;
  
  Flex handles the serialization of your objects for you, so you just
  put the arguments your method requires onto the arguments property. So
  if your remote method's signature is: doCoolStuff(name:String,
  age:Number, hobbies:Array), you would use the following code in Flex:
  
  op.arguments.name = Bob Cratchett;
  op.arguments.age = 34;
  op.arguments.hobbies = new Array(working, playing with Tim,
etc);
  
  HTH, let me know if you have additional questions.
  Ben
  
  
  --- In flexcoders@yahoogroups.com, phipzkillah pkrasko@ wrote:
  
   Thanks for your reply Ben.
   
   I have a few more questions, hopefully you can help.  The
   doCoolStuff, is that the method we are trying to call through the
   web service?  From your example it seems like you can specify
   operation arguments in either an object or array format.  I don't
   think I fully understand how the web service works interprets
that...
   
   If a method requires certain parameters (ie: name:String,
age:Number)
   how would you go about passing those in as arguments??
   
   op.arguments.objectArg = {name: John Doe, age: 26}  ??
   
   How do you specify the result format to be e4x?
   
   Help would be appreciated.
   
   -phil
   
   
   --- In flexcoders@yahoogroups.com, ben.clinkinbeard
   ben.clinkinbeard@ wrote:
   
I've not dealt with authentication but here is how to call an
  operation.

// getOperation() returns generic AbstractOperation by default
// you want mx.rpc.Operation, not mx.rpc.mxml.Operation
var op:Operation = ws.getOperation(doCoolStuff) as Operation;
op.arguments.arrayArg = new Array(foo, bar);
op.arguments.objectArg = {propA: tweedle, propB: dee};
op.send();

You can optionally capture the token created by the call and
 assign a
responder as well:

var call:ASyncToken = op.send();
call.addResponder(IResponder);

The IResponder interface defines a result and fault method
that are
called when the operation returns.

HTH,
Ben



--- In flexcoders@yahoogroups.com, phipzkillah pkrasko@ wrote:

 Hi,
 
 I am trying to create a web service in pure action script.  I
  need to
 authenticate and then call the proper method from the web
service.
 
 I have not seen any good tutorials explaining how to do this...
 
 This is my current snippet:
 
 private function init():void{
   
  var ws:WebService = new WebService;
   
 

[flexcoders] Re: Webservice WSDL ActionScript authentication and operations - n00bie

2006-12-09 Thread phipzkillah
Thanks for your reply Ben.

I have a few more questions, hopefully you can help.  The
doCoolStuff, is that the method we are trying to call through the
web service?  From your example it seems like you can specify
operation arguments in either an object or array format.  I don't
think I fully understand how the web service works interprets that...

If a method requires certain parameters (ie: name:String, age:Number)
how would you go about passing those in as arguments??

op.arguments.objectArg = {name: John Doe, age: 26}  ??

How do you specify the result format to be e4x?

Help would be appreciated.

-phil


--- In flexcoders@yahoogroups.com, ben.clinkinbeard
[EMAIL PROTECTED] wrote:

 I've not dealt with authentication but here is how to call an operation.
 
 // getOperation() returns generic AbstractOperation by default
 // you want mx.rpc.Operation, not mx.rpc.mxml.Operation
 var op:Operation = ws.getOperation(doCoolStuff) as Operation;
 op.arguments.arrayArg = new Array(foo, bar);
 op.arguments.objectArg = {propA: tweedle, propB: dee};
 op.send();
 
 You can optionally capture the token created by the call and assign a
 responder as well:
 
 var call:ASyncToken = op.send();
 call.addResponder(IResponder);
 
 The IResponder interface defines a result and fault method that are
 called when the operation returns.
 
 HTH,
 Ben
 
 
 
 --- In flexcoders@yahoogroups.com, phipzkillah pkrasko@ wrote:
 
  Hi,
  
  I am trying to create a web service in pure action script.  I need to
  authenticate and then call the proper method from the web service.
  
  I have not seen any good tutorials explaining how to do this...
  
  This is my current snippet:
  
  private function init():void{
  
   var ws:WebService = new WebService;
  
   ws.wsdl =
  http://sc-vmx-03/clarusipc/services/InventoryService?wsdl;;
   ws.useProxy = false;
  
  
 

ws.loadWSDL(http://sc-vmx-03/clarusipc/services/InventoryService?wsdl;);
  
  }
  
  What is the format to add in an operations object that will include
  the method and parameters that I'm going to call?
  
  How would I go about editing the http request to include a username
  and password to authenticate against?
  
  Any help would be greatly appreciated!!!  It's driving me nuts!
 





[flexcoders] Re: Webservice WSDL ActionScript authentication and operations - n00bie

2006-12-09 Thread ben.clinkinbeard
 is that the method we are trying to call through the web service?
Yep.

You know, I almost included the bit about e4x the first time but
decided against it. For that you simply do op.resultFormat = e4x;

Flex handles the serialization of your objects for you, so you just
put the arguments your method requires onto the arguments property. So
if your remote method's signature is: doCoolStuff(name:String,
age:Number, hobbies:Array), you would use the following code in Flex:

op.arguments.name = Bob Cratchett;
op.arguments.age = 34;
op.arguments.hobbies = new Array(working, playing with Tim, etc);

HTH, let me know if you have additional questions.
Ben


--- In flexcoders@yahoogroups.com, phipzkillah [EMAIL PROTECTED] wrote:

 Thanks for your reply Ben.
 
 I have a few more questions, hopefully you can help.  The
 doCoolStuff, is that the method we are trying to call through the
 web service?  From your example it seems like you can specify
 operation arguments in either an object or array format.  I don't
 think I fully understand how the web service works interprets that...
 
 If a method requires certain parameters (ie: name:String, age:Number)
 how would you go about passing those in as arguments??
 
 op.arguments.objectArg = {name: John Doe, age: 26}  ??
 
 How do you specify the result format to be e4x?
 
 Help would be appreciated.
 
 -phil
 
 
 --- In flexcoders@yahoogroups.com, ben.clinkinbeard
 ben.clinkinbeard@ wrote:
 
  I've not dealt with authentication but here is how to call an
operation.
  
  // getOperation() returns generic AbstractOperation by default
  // you want mx.rpc.Operation, not mx.rpc.mxml.Operation
  var op:Operation = ws.getOperation(doCoolStuff) as Operation;
  op.arguments.arrayArg = new Array(foo, bar);
  op.arguments.objectArg = {propA: tweedle, propB: dee};
  op.send();
  
  You can optionally capture the token created by the call and assign a
  responder as well:
  
  var call:ASyncToken = op.send();
  call.addResponder(IResponder);
  
  The IResponder interface defines a result and fault method that are
  called when the operation returns.
  
  HTH,
  Ben
  
  
  
  --- In flexcoders@yahoogroups.com, phipzkillah pkrasko@ wrote:
  
   Hi,
   
   I am trying to create a web service in pure action script.  I
need to
   authenticate and then call the proper method from the web service.
   
   I have not seen any good tutorials explaining how to do this...
   
   This is my current snippet:
   
   private function init():void{
 
var ws:WebService = new WebService;
 
ws.wsdl =
   http://sc-vmx-03/clarusipc/services/InventoryService?wsdl;;
ws.useProxy = false;
   
   
  
 

ws.loadWSDL(http://sc-vmx-03/clarusipc/services/InventoryService?wsdl;);
   
   }
   
   What is the format to add in an operations object that will include
   the method and parameters that I'm going to call?
   
   How would I go about editing the http request to include a username
   and password to authenticate against?
   
   Any help would be greatly appreciated!!!  It's driving me nuts!
  
 





[flexcoders] Re: Webservice WSDL ActionScript authentication and operations - n00bie

2006-12-08 Thread ben.clinkinbeard
I've not dealt with authentication but here is how to call an operation.

// getOperation() returns generic AbstractOperation by default
// you want mx.rpc.Operation, not mx.rpc.mxml.Operation
var op:Operation = ws.getOperation(doCoolStuff) as Operation;
op.arguments.arrayArg = new Array(foo, bar);
op.arguments.objectArg = {propA: tweedle, propB: dee};
op.send();

You can optionally capture the token created by the call and assign a
responder as well:

var call:ASyncToken = op.send();
call.addResponder(IResponder);

The IResponder interface defines a result and fault method that are
called when the operation returns.

HTH,
Ben



--- In flexcoders@yahoogroups.com, phipzkillah [EMAIL PROTECTED] wrote:

 Hi,
 
 I am trying to create a web service in pure action script.  I need to
 authenticate and then call the proper method from the web service.
 
 I have not seen any good tutorials explaining how to do this...
 
 This is my current snippet:
 
 private function init():void{
   
  var ws:WebService = new WebService;
   
  ws.wsdl =
 http://sc-vmx-03/clarusipc/services/InventoryService?wsdl;;
  ws.useProxy = false;
 
 

ws.loadWSDL(http://sc-vmx-03/clarusipc/services/InventoryService?wsdl;);
 
 }
 
 What is the format to add in an operations object that will include
 the method and parameters that I'm going to call?
 
 How would I go about editing the http request to include a username
 and password to authenticate against?
 
 Any help would be greatly appreciated!!!  It's driving me nuts!





[flexcoders] Re: Webservice Connector Component

2006-09-30 Thread Tim Hoff



Hello,
The Flash 8 and Flex 1.5 webservice connector wizardsare really nicetime-savers for developers.They validate the connection, automatically list the available operations and provide control binding options. All of these coding steps are completed in one trip to the wizard.
It would be nice if a future release of Flexhad a ported version of this type ofwizard. But, that's not a simple task; especially considering that many use an additional framework level, like Cairngorm, on top of Flex. Considering that Flex2 is a complete rewrite, it's very understandable why this feature didn't make the current release. You might want to add a feature request to Adobe's wishlist here:
http://www.adobe.com/go/wish
-TH--- In flexcoders@yahoogroups.com, "[sami]" [EMAIL PROTECTED] wrote: Hello, anyone made / seen a webservice connector component like in Flash 8 for Flex? Writing queries against WSDL by hand and catching their replys is a pain, or maybe I understood something very wrong...

__._,_.___





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com








   






  
  
SPONSORED LINKS
  
  
  

Software development tool
  
  
Software development
  
  
Software development services
  
  


Home design software
  
  
Software development company
  

   
  






  
  Your email settings: Individual Email|Traditional 
  Change settings via the Web (Yahoo! ID required) 
  Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured 
   
Visit Your Group 
   |
  
Yahoo! Groups Terms of Use
   |
  
   Unsubscribe 
   
 

  




__,_._,___



[flexcoders] Re: WebService vs RemoteObject

2006-09-12 Thread bill_sahlas
Yup, the improvements in AMF protocol from older versions of CF is
awesome - 7.02 supports the  AMF3 (ActionScript 3.0/Flex 2.0)  protocol
and is much much quicker.
--- In flexcoders@yahoogroups.com, Darren Houle [EMAIL PROTECTED] wrote:

 This was not designed as a controlled experiment, just something I
coded,
 noticed, and thought I'd pass on...

 I'm building a small Cairngorm application and one of it's functions
is to
 display two sets of network user accounts in two datagrids. Initially
I
 used a WebService to call a Coldfusion CFC that returns simple Query
objects
 pulled from an Oracle database. Datagrid 1 retrieves and displays
about 400
 accounts, and datagrid 2 about 3000 accounts.

 Using a WebService the retreival time appeared to be about 2-3 seconds
 (roughly based on the amount of time the showCursor clock was
spinning)
 before the result handler fired, and the render time to fit the data
into
 the grids was approximately another 6-7 seconds.

 I just converted all the RPC calls to RemoteObject calls and now the
total
 retrieval AND render time is well under 2 seconds total.

 Retrieval time is faster (the spinning cursor is almost non existent)
and
 the render time is insanely fast. I'm guessing that AMF and not
needing to
 parse thru the SOAP return payloadmade the difference. Pull back a
simple
 boolean with either type of RPC call, not so much, but pull back 3500
 records and you *definitely* see a difference with RemoteObject.

 Darren








--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





[flexcoders] Re: webservice in a ComboBox

2006-09-07 Thread omkarjoe
Hi Kristian,

I don't know much about the webservices but I'll try to help...

java.utils.list is basically an ArrayList object. ArryList is 
converted into Array type Actionscript object by Flex. Before 
attaching this Array as dataprovider to combobox u need to convert it 
to ArrayCollection. U can do so by providing it as source to Array 
Collection Object and then provide this arrayCollection as 
dataprovider to ComboBox.

I know this is so generick info but I can help u more if u can post 
some of ur java as well as flex code...

Cheers!!!

--- In flexcoders@yahoogroups.com, Kristian [EMAIL PROTECTED] wrote:

 Hi.Hope someone can help me. I need to put the result from a 
webservice in a ComboBox.The webservice method returns a 
java.util.List. Any one who can show me how please?
 _
 Try Live.com - din egen kjappe hjemmeside med alle tingene du bryr 
deg om, på ett sted.
 http://www.live.com/getstarted










 Yahoo! Groups Sponsor ~-- 
Something is new at Yahoo! Groups.  Check out the enhanced email design.
http://us.click.yahoo.com/TktRrD/gOaOAA/yQLSAA/nhFolB/TM
~- 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




RE: [flexcoders] Re: webservice in a ComboBox

2006-09-07 Thread Tracy Spratt












Set up a result handler function so that
you can inspect and manipulate the web service result data.



Tracy











From:
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of omkarjoe
Sent: Thursday, September 07, 2006
6:33 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re:
webservice in a ComboBox











Hi Kristian,

I don't know much about the webservices but I'll try to help...

java.utils.list is basically an ArrayList object. ArryList is 
converted into Array type Actionscript object by Flex. Before 
attaching this Array as dataprovider to combobox u need to convert it 
to ArrayCollection. U can do so by providing it as source to Array 
Collection Object and then provide this arrayCollection as 
dataprovider to ComboBox.

I know this is so generick info but I can help u more if u can post 
some of ur java
as well as flex code...

Cheers!!!

--- In flexcoders@yahoogroups.com,
Kristian [EMAIL PROTECTED] wrote:

 Hi.Hope someone can help me. I need to put the result from a 
webservice in a ComboBox.The webservice method returns a 
java.util.List. Any one who can show me how please?
 __
 Try Live.com - din egen kjappe hjemmeside med alle tingene du bryr 
deg om, på ett sted.
 http://www.live.com/getstarted




 




__._,_.___





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com








   






  
  
SPONSORED LINKS
  
  
  

Software development tool
  
  
Software development
  
  
Software development services
  
  


Home design software
  
  
Software development company
  

   
  






  
  Your email settings: Individual Email|Traditional 
  Change settings via the Web (Yahoo! ID required) 
  Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured 
   
Visit Your Group 
   |
  
Yahoo! Groups Terms of Use
   |
  
   Unsubscribe 
   
 

  




__,_._,___






[flexcoders] Re: webservice lastResult to a ComboBox

2006-09-05 Thread meteatamel
Can you more specific? It would be useful if you can post the code
that you have right now and we can see what we need to change to make
it work.



--- In flexcoders@yahoogroups.com, Kristian [EMAIL PROTECTED] wrote:

 Hi.
 Hope someone can help me. 
 I need to put the result from a webservice in a ComboBox.
 The webservice method returns a java.util.List.
  
 Any one who can show me how?
 _
 Try Live.com - din egen kjappe hjemmeside med alle tingene du bryr
deg om, på ett sted.
 http://www.live.com/getstarted








--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




RE: [flexcoders] Re: webservice lastResult to a ComboBox

2006-09-05 Thread Franck de Bruijn












Hi Kristian,



Presuming your webservice method returns a
list of Strings, the result from the webservice operation (ResultEvent.result) is
a dynamic object containing a Flex Array object. Probably if you pull this
Array object out you can assign it to the dataprovider property
of a combobox.



The Flex debugger is an excellent tool
here to investigate what Flex actually makes out of your webservice result.



Cheers,

Franck











From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of meteatamel
Sent: Tuesday, September 05, 2006
10:07 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re:
webservice lastResult to a ComboBox











Can you more specific? It would be useful if you can
post the code
that you have right now and we can see what we need to change to make
it work.

--- In [EMAIL PROTECTED]ups.com,
Kristian [EMAIL PROTECTED]. wrote:

 Hi.
 Hope someone can help me. 
 I need to put the result from a webservice in a ComboBox.
 The webservice method returns a java.util.List.
 
 Any one who can show me how?
 __
 Try Live.com - din egen kjappe hjemmeside med alle tingene du bryr
deg om, på ett sted.
 http://www.live.com/getstarted







__._,_.___





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com








   






  
  
SPONSORED LINKS
  
  
  

Software development tool
  
  
Software development
  
  
Software development services
  
  


Home design software
  
  
Software development company
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  






__,_._,___






[flexcoders] Re: Webservice Connector Component

2006-09-01 Thread ben.clinkinbeard
Its really not bad at all, and understanding how things really work
will pay off down the road. Here is a sample.

mx:WebService id=ws wsdl=http://www.site.com/MyWebService.asmx?WSDL;
   useProxy=false
   fault=getTrendsFault(event) result=getTrendsResult(event)
   mx:operation name=GetTrends resultFormat=e4x
   mx:request
   EnterpriseId/EnterpriseId
   DocumentTypeRPR-EBD/DocumentType
   ContainersToRetrieveIndustryTrends/ContainersToRetrieve
   /mx:request
   /mx:operation
/mx:WebService
//
ws.GetTrends.send();
//
private function getTrendsResult(event:ResultEvent):void
{
var resultXml:XML = new XML(event.result);
}
//
private function getTrendsFault(event:FaultEvent):void
{
trace(fault:  + event.fault.faultString);
}

HTH,
Ben
http://www.returnundefined.com/


--- In flexcoders@yahoogroups.com, [sami] [EMAIL PROTECTED] wrote:

 Hello,
 anyone made / seen a webservice connector component like in Flash 8 for
 Flex?
 Writing queries against WSDL by hand and catching their replys is a
pain, or
 maybe I understood something very wrong...








--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





[flexcoders] Re: Webservice and column name question.

2006-08-31 Thread dinger0007
No it gave me the actual data. But thanks allot for the response.

Here is what i have finally come up with:
for(var i in test){
   for(var j in test[i]){
  trace(j);
}}

My initial thought about flex and actionscript:
It is a hard road getting to the solution but once there it is such a
simple answer.

Thanks everybody! 

--- In flexcoders@yahoogroups.com, Doug Lowder [EMAIL PROTECTED] wrote:

 Does this give you what you want?
 
 for each(var item in test) {
   for each(var colname in item) {
 trace(colname); 
   }
 }
 
 
 --- In flexcoders@yahoogroups.com, dinger0007 scot.hershman@ wrote:
 
  I have a query result coming back from a webservice call and i want to
  pull the column names out of the results.
  
  I assumed that I can use the code below but can't figure how to
  pull the column names.
  
  If I do this, I get the data.
  test =  new ArrayCollection( event.result as Array);
  for each(var item in test) {
  trace(item.Node1); 
  }
  
  But how do I just get Node1 and not the data.
  
  Thanks in advance..
 








--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




[flexcoders] Re: Webservice and column name question.

2006-08-30 Thread dinger0007
Correct, the structure (column names) are dynamic based on the
webservice operations. Let see if I can be more specific.

This is what I have so far, it returns the actual data in the console
window. But want to display the column names in the console 

test =  new ArrayCollection( event.result as Array);
for each(var item in test) {
trace(item.Node1); 
}







--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




RE: [flexcoders] Re: Webservice and column name question.

2006-08-30 Thread Franck de Bruijn












Im not sure if I understand you.



What do you see in the console output? Do
you see the column names? If not, it seems youre not getting them from
the webservice.



Cheers,

Franck











From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of dinger0007
Sent: Wednesday, August 30, 2006
2:27 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re:
Webservice and column name question.











Correct, the structure (column names) are dynamic
based on the
webservice operations. Let see if I can be more specific.

This is what I have so far, it returns the actual data in the console
window. But want to display the column names in the console 

test = new ArrayCollection( event.result as Array);
for each(var item in test) {
trace(item.Node1); 
}






__._,_.___





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com








   






  
  
SPONSORED LINKS
  
  
  

Software development tool
  
  
Software development
  
  
Software development services
  
  


Home design software
  
  
Software development company
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  






__,_._,___






[flexcoders] Re: Webservice and column name question.

2006-08-30 Thread Doug Lowder
Does this give you what you want?

for each(var item in test) {
  for each(var colname in item) {
trace(colname); 
  }
}


--- In flexcoders@yahoogroups.com, dinger0007 [EMAIL PROTECTED] wrote:

 I have a query result coming back from a webservice call and i want to
 pull the column names out of the results.
 
 I assumed that I can use the code below but can't figure how to
 pull the column names.
 
 If I do this, I get the data.
 test =  new ArrayCollection( event.result as Array);
 for each(var item in test) {
   trace(item.Node1); 
 }
 
 But how do I just get Node1 and not the data.
 
 Thanks in advance..








--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





[flexcoders] Re: Webservice Destination with Basic Authentication

2006-08-24 Thread Tom Ruggles
Hi someguy,

Based on the traffic that you sent it appears that your WS app 
server is not blocking access at this point - the error is occuring 
in your Axis web service rather than at the web container level.  
And this error is complaining that there is no auth header.  Here's 
my series of educated guesses.

- assuming that the contraints are set up properly you may have 
successfully authenticated at some point as far as the web container 
is concerned.  Subsequently it sees your jsessionid and says, Hey, 
this guy is already logged in so no need to ask for credentials 
again.

- your web service is assuming that there will always be an auth 
header.  Not true - it will only be sent in response to a challenge 
from the server.  If the server recognizes the authenticated session 
then there will be no further challenge and therefore no auth header.

If you need to do user verification from the service you will need 
to do manual checking of user info then you'll need to use 
request.getUserPrincipal().

Tom Ruggles
FDS QA


--- In flexcoders@yahoogroups.com, Seth Hodgson [EMAIL PROTECTED] 
wrote:

 Hi,
 
 Have you verified that the server hosting your web service has 
basic auth configured correctly? Your code looks correct so perhaps 
when the FDS proxy makes the call against the remote server it isn't 
being challenged for basic auth credentials? Try requesting your 
WSDL in a browser and verify that the browser's challenge box pops 
up.
 
 Best,
 Seth
 
 
 From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of someguy7_7
 Sent: Wednesday, August 23, 2006 8:17 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Webservice Destination with Basic 
Authentication
 
 I cannot see the authorization header anywhere in the http dump. 
Here
 is some more information on how I am testing. I deployed the fds
 samples.war and placed my test mxml in the samples application. I
 added the following definition to samples/WEB-INF/flex/proxy-
config.xml.
 destination id=mytest
 adapter ref=soap-proxy /
 properties
 wsdlhttp://machine/app/webservice/wsdl/wsdl
 soaphttp://machine/app/services/myService/soap
 /properties
 /destination
 
 Do I need to add some security constraints to the destination 
definition?
 
 Here is a dump of the request and response.
 
 POST /myapp/services/myservice HTTP/1.1
 user-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
 rv:1.8.0.6) Gecko/20060728 Firefox/1.5.0.6
 accept:
 
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/p
lain;q=0.8,image/png,*/*;q=0.5
 accept-language: en-us,en;q=0.5
 accept-charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
 keep-alive: 300
 pragma: akamai-x-cache-on, akamai-x-cache-remote-on,
 akamai-x-check-cacheable, akamai-x-get-cache-key,
 akamai-x-get-extracted-values, akamai-x-get-nonces,
 akamai-x-get-ssl-client-session-id, akamai-x-serial-no
 referer: http://localhost:8080/samples/WSTest.mxml.swf
 SOAPAction: searchIt
 Content-Type: text/xml; charset=utf-8
 Host: mymachine
 Cookie: $Version=0; JSESSIONID=034C89B28DEB60ECC77ED6C10141E5A4
 Content-Length: 855
 
 ?xml version=1.0 encoding=utf-8?SOAP-ENV:Envelope
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
 xmlns:xsd=http://www.w3.org/2001/XMLSchema;
 xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/;SOAP-
ENV:Bodyns0:myParam
 
xmlns:ns0=http://www.server.com/myApi/xsd;ns0:handle1/ns0:handle
/ns0:myParam/SOAP-ENV:Body/SOAP-ENV:Envelope
 HTTP/1.1 500 Internal Server Error
 Server: Apache-Coyote/1.1
 Content-Type: text/xml;charset=utf-8
 Transfer-Encoding: chunked
 Date: Wed, 23 Aug 2006 15:05:01 GMT
 Connection: close
 
 ?xml version='1.0' encoding='utf-8'?soapenv:Envelope
 
xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;soapenv:He
ader
 /soapenv:Bodysoapenv:Fault
 xmlns:axis2=http://www.w3.org/2003/05/soap-
envelopefaultcodeaxis2:Sender/faultcode
 
faultstringUnauthorized/faultstringdetailExceptionorg.apache.
axis2.AxisFault:
 Unauthorized; nested exception is: 
 java.lang.Exception: Missing HTTP Basic authentication header#13;
 --- In flexcoders@yahoogroups.com, Tom Chiverton tom.chiverton@
 wrote:
 
  On Wednesday 23 August 2006 04:22, someguy7_7 wrote:
   I have figured out the destination issue and my request is 
making it
   to the webservice but the Authorization header is not being 
sent. I am
   calling setRemoteCredentials before setting any params and
 calling send.
  
  Hmm.
  You've dumped out the HTTP traffic to confirm this ?
  
  -- 
  Tom Chiverton
  Helping to globally envisioneer end-to-end models
  
  
  
  This email is sent for and on behalf of Halliwells LLP.
  
  Halliwells LLP is a limited liability partnership registered in
 England and Wales under registered number OC307980 whose registered
 office address is at St James's Court Brown Street Manchester M2 
2JF.
 A list of members is available for inspection at the registered

Re: [flexcoders] Re: Webservice Destination with Basic Authentication

2006-08-23 Thread Tom Chiverton
On Tuesday 22 August 2006 15:34, someguy7_7 wrote:
 I don't understand what you mean. Are you saying that the webservice I
 am trying to connect to has to have a services-config.xml? What
 information needs to be in the services-config.xml. I am connecting to
 a j2ee webservice.

Maybe you should post some code then, because I think the error is coming from 
a call to RemoteObject - it says 'RPC fault'.

-- 
Tom Chiverton
Helping to continually establish eligible appliances



This email is sent for and on behalf of Halliwells LLP.

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at St 
James's Court Brown Street Manchester M2 2JF.  A list of members is available 
for inspection at the registered office. Any reference to a partner in relation 
to Halliwells LLP means a member of Halliwells LLP. Regulated by the Law 
Society.

CONFIDENTIALITY

This email is intended only for the use of the addressee named above and may be 
confidential or legally privileged.  If you are not the addressee you must not 
read it and must not use any information contained in nor copy it nor inform 
any person other than Halliwells LLP or the addressee of its existence or 
contents.  If you have received this email in error please delete it and notify 
Halliwells LLP IT Department on 0870 365 8008.

For more information about Halliwells LLP visit www.halliwells.com.



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




[flexcoders] Re: Webservice Destination with Basic Authentication

2006-08-23 Thread someguy7_7
I have figured out the destination issue and my request is making it
to the webservice but the Authorization header is not being sent. I am
 calling setRemoteCredentials before setting any params and calling send.

Here is my webservice definition.
mx:WebService id=myService  destination=mytest useProxy=true 

Am I missing a step somewhere?
--- In flexcoders@yahoogroups.com, Tom Chiverton [EMAIL PROTECTED]
wrote:

 On Tuesday 22 August 2006 01:40, someguy7_7 wrote:
  faultString=[MessagingError message='Unknown destination 'mytest'.
  What do I need to do besides add the destination to the
  WEB-INF/flex/proxy-config.xml of my application so my app can find the
 
 It doesn't appear to be in the services-config.xml of the server you
are 
 connecting too.
 
 -- 
 Tom Chiverton
 Helping to centrally mesh fourth-generation m-commerce
 
 
 
 This email is sent for and on behalf of Halliwells LLP.
 
 Halliwells LLP is a limited liability partnership registered in
England and Wales under registered number OC307980 whose registered
office address is at St James's Court Brown Street Manchester M2 2JF.
 A list of members is available for inspection at the registered
office. Any reference to a partner in relation to Halliwells LLP means
a member of Halliwells LLP. Regulated by the Law Society.
 
 CONFIDENTIALITY
 
 This email is intended only for the use of the addressee named above
and may be confidential or legally privileged.  If you are not the
addressee you must not read it and must not use any information
contained in nor copy it nor inform any person other than Halliwells
LLP or the addressee of its existence or contents.  If you have
received this email in error please delete it and notify Halliwells
LLP IT Department on 0870 365 8008.
 
 For more information about Halliwells LLP visit www.halliwells.com.










--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





Re: [flexcoders] Re: Webservice Destination with Basic Authentication

2006-08-23 Thread Tom Chiverton
On Wednesday 23 August 2006 04:22, someguy7_7 wrote:
 I have figured out the destination issue and my request is making it
 to the webservice but the Authorization header is not being sent. I am
  calling setRemoteCredentials before setting any params and calling send.

Hmm.
You've dumped out the HTTP traffic to confirm this ?

-- 
Tom Chiverton
Helping to globally envisioneer end-to-end models



This email is sent for and on behalf of Halliwells LLP.

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at St 
James's Court Brown Street Manchester M2 2JF.  A list of members is available 
for inspection at the registered office. Any reference to a partner in relation 
to Halliwells LLP means a member of Halliwells LLP. Regulated by the Law 
Society.

CONFIDENTIALITY

This email is intended only for the use of the addressee named above and may be 
confidential or legally privileged.  If you are not the addressee you must not 
read it and must not use any information contained in nor copy it nor inform 
any person other than Halliwells LLP or the addressee of its existence or 
contents.  If you have received this email in error please delete it and notify 
Halliwells LLP IT Department on 0870 365 8008.

For more information about Halliwells LLP visit www.halliwells.com.



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





[flexcoders] Re: Webservice Destination with Basic Authentication

2006-08-23 Thread someguy7_7
I cannot see the authorization header anywhere in the http dump. Here
is some more information on how I am testing. I deployed the fds
samples.war and placed my test mxml in the samples application. I
added the following definition to samples/WEB-INF/flex/proxy-config.xml.
destination id=mytest
adapter ref=soap-proxy /
properties
wsdlhttp://machine/app/webservice/wsdl/wsdl
soaphttp://machine/app/services/myService/soap
/properties
/destination

Do I need to add some security constraints to the destination definition?


Here is a dump of the request and response.

POST /myapp/services/myservice HTTP/1.1
user-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
rv:1.8.0.6) Gecko/20060728 Firefox/1.5.0.6
accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
accept-language: en-us,en;q=0.5
accept-charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
keep-alive: 300
pragma: akamai-x-cache-on, akamai-x-cache-remote-on,
akamai-x-check-cacheable, akamai-x-get-cache-key,
akamai-x-get-extracted-values, akamai-x-get-nonces,
akamai-x-get-ssl-client-session-id, akamai-x-serial-no
referer: http://localhost:8080/samples/WSTest.mxml.swf
SOAPAction: searchIt
Content-Type: text/xml; charset=utf-8
Host: mymachine
Cookie: $Version=0; JSESSIONID=034C89B28DEB60ECC77ED6C10141E5A4
Content-Length: 855

?xml version=1.0 encoding=utf-8?SOAP-ENV:Envelope
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xmlns:xsd=http://www.w3.org/2001/XMLSchema;
xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/;SOAP-ENV:Bodyns0:myParam
xmlns:ns0=http://www.server.com/myApi/xsd;ns0:handle1/ns0:handle/ns0:myParam/SOAP-ENV:Body/SOAP-ENV:Envelope
 HTTP/1.1 500 Internal Server Error
Server: Apache-Coyote/1.1
Content-Type: text/xml;charset=utf-8
Transfer-Encoding: chunked
Date: Wed, 23 Aug 2006 15:05:01 GMT
Connection: close

?xml version='1.0' encoding='utf-8'?soapenv:Envelope
xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;soapenv:Header
/soapenv:Bodysoapenv:Fault
xmlns:axis2=http://www.w3.org/2003/05/soap-envelope;faultcodeaxis2:Sender/faultcode
faultstringUnauthorized/faultstringdetailExceptionorg.apache.axis2.AxisFault:
Unauthorized; nested exception is: 
java.lang.Exception: Missing HTTP Basic authentication header#13;
--- In flexcoders@yahoogroups.com, Tom Chiverton [EMAIL PROTECTED]
wrote:

 On Wednesday 23 August 2006 04:22, someguy7_7 wrote:
  I have figured out the destination issue and my request is making it
  to the webservice but the Authorization header is not being sent. I am
   calling setRemoteCredentials before setting any params and
calling send.
 
 Hmm.
 You've dumped out the HTTP traffic to confirm this ?
 
 -- 
 Tom Chiverton
 Helping to globally envisioneer end-to-end models
 
 
 
 This email is sent for and on behalf of Halliwells LLP.
 
 Halliwells LLP is a limited liability partnership registered in
England and Wales under registered number OC307980 whose registered
office address is at St James's Court Brown Street Manchester M2 2JF.
 A list of members is available for inspection at the registered
office. Any reference to a partner in relation to Halliwells LLP means
a member of Halliwells LLP. Regulated by the Law Society.
 
 CONFIDENTIALITY
 
 This email is intended only for the use of the addressee named above
and may be confidential or legally privileged.  If you are not the
addressee you must not read it and must not use any information
contained in nor copy it nor inform any person other than Halliwells
LLP or the addressee of its existence or contents.  If you have
received this email in error please delete it and notify Halliwells
LLP IT Department on 0870 365 8008.
 
 For more information about Halliwells LLP visit www.halliwells.com.








--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




RE: [flexcoders] Re: Webservice Destination with Basic Authentication

2006-08-23 Thread Seth Hodgson
Hi,

Have you verified that the server hosting your web service has basic auth 
configured correctly? Your code looks correct so perhaps when the FDS proxy 
makes the call against the remote server it isn't being challenged for basic 
auth credentials? Try requesting your WSDL in a browser and verify that the 
browser's challenge box pops up.

Best,
Seth


From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
someguy7_7
Sent: Wednesday, August 23, 2006 8:17 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Webservice Destination with Basic Authentication

I cannot see the authorization header anywhere in the http dump. Here
is some more information on how I am testing. I deployed the fds
samples.war and placed my test mxml in the samples application. I
added the following definition to samples/WEB-INF/flex/proxy-config.xml.
destination id=mytest
adapter ref=soap-proxy /
properties
wsdlhttp://machine/app/webservice/wsdl/wsdl
soaphttp://machine/app/services/myService/soap
/properties
/destination

Do I need to add some security constraints to the destination definition?

Here is a dump of the request and response.

POST /myapp/services/myservice HTTP/1.1
user-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
rv:1.8.0.6) Gecko/20060728 Firefox/1.5.0.6
accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
accept-language: en-us,en;q=0.5
accept-charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
keep-alive: 300
pragma: akamai-x-cache-on, akamai-x-cache-remote-on,
akamai-x-check-cacheable, akamai-x-get-cache-key,
akamai-x-get-extracted-values, akamai-x-get-nonces,
akamai-x-get-ssl-client-session-id, akamai-x-serial-no
referer: http://localhost:8080/samples/WSTest.mxml.swf
SOAPAction: searchIt
Content-Type: text/xml; charset=utf-8
Host: mymachine
Cookie: $Version=0; JSESSIONID=034C89B28DEB60ECC77ED6C10141E5A4
Content-Length: 855

?xml version=1.0 encoding=utf-8?SOAP-ENV:Envelope
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xmlns:xsd=http://www.w3.org/2001/XMLSchema;
xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/;SOAP-ENV:Bodyns0:myParam
xmlns:ns0=http://www.server.com/myApi/xsd;ns0:handle1/ns0:handle/ns0:myParam/SOAP-ENV:Body/SOAP-ENV:Envelope
HTTP/1.1 500 Internal Server Error
Server: Apache-Coyote/1.1
Content-Type: text/xml;charset=utf-8
Transfer-Encoding: chunked
Date: Wed, 23 Aug 2006 15:05:01 GMT
Connection: close

?xml version='1.0' encoding='utf-8'?soapenv:Envelope
xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;soapenv:Header
/soapenv:Bodysoapenv:Fault
xmlns:axis2=http://www.w3.org/2003/05/soap-envelope;faultcodeaxis2:Sender/faultcode
faultstringUnauthorized/faultstringdetailExceptionorg.apache.axis2.AxisFault:
Unauthorized; nested exception is: 
java.lang.Exception: Missing HTTP Basic authentication header#13;
--- In flexcoders@yahoogroups.com, Tom Chiverton [EMAIL PROTECTED]
wrote:

 On Wednesday 23 August 2006 04:22, someguy7_7 wrote:
  I have figured out the destination issue and my request is making it
  to the webservice but the Authorization header is not being sent. I am
  calling setRemoteCredentials before setting any params and
calling send.
 
 Hmm.
 You've dumped out the HTTP traffic to confirm this ?
 
 -- 
 Tom Chiverton
 Helping to globally envisioneer end-to-end models
 
 
 
 This email is sent for and on behalf of Halliwells LLP.
 
 Halliwells LLP is a limited liability partnership registered in
England and Wales under registered number OC307980 whose registered
office address is at St James's Court Brown Street Manchester M2 2JF.
A list of members is available for inspection at the registered
office. Any reference to a partner in relation to Halliwells LLP means
a member of Halliwells LLP. Regulated by the Law Society.
 
 CONFIDENTIALITY
 
 This email is intended only for the use of the addressee named above
and may be confidential or legally privileged. If you are not the
addressee you must not read it and must not use any information
contained in nor copy it nor inform any person other than Halliwells
LLP or the addressee of its existence or contents. If you have
received this email in error please delete it and notify Halliwells
LLP IT Department on 0870 365 8008.
 
 For more information about Halliwells LLP visit www.halliwells.com.

 


--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





Re: [flexcoders] Re: WebService - What's wrong with this code?

2006-08-22 Thread Tom Chiverton
On Monday 21 August 2006 12:54, Samuel D. Colak wrote:
 Is it thus by implication that FDS become some form of flash Hibernate ?

There are people working on that right now :-)

-- 
Tom Chiverton
Helping to confidentially target second-generation systems



This email is sent for and on behalf of Halliwells LLP.

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at St 
James's Court Brown Street Manchester M2 2JF.  A list of members is available 
for inspection at the registered office. Any reference to a partner in relation 
to Halliwells LLP means a member of Halliwells LLP. Regulated by the Law 
Society.

CONFIDENTIALITY

This email is intended only for the use of the addressee named above and may be 
confidential or legally privileged.  If you are not the addressee you must not 
read it and must not use any information contained in nor copy it nor inform 
any person other than Halliwells LLP or the addressee of its existence or 
contents.  If you have received this email in error please delete it and notify 
Halliwells LLP IT Department on 0870 365 8008.

For more information about Halliwells LLP visit www.halliwells.com.



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





  1   2   >