Bad Gateway!

2014-12-30 Thread John M Bliss

I have a process which used to run fine. Now, it produces:

Bad Gateway!

There is a problem with the page you are looking for, and it cannot be
displayed. When the Web server (while acting as a gateway or proxy)
contacted the upstream content server, it received an invalid response from
the content server.

Jakarta/ISAPI/isapi_redirector/1.2.40

Copyright © 1999-2014 Apache Software Foundation
All Rights Reserved

...and the ACF 10,0,15,292549 server service restarts (i.e. all sessions go
away and FusionReactor shows Server Started as now).

Any ideas?

-- 
John Bliss - http://www.linkedin.com/in/jbliss


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359893
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: Trouble with ArrayAppend

2014-12-30 Thread David Phelan

Dean,

This got pushed into my junk mail. 

What is making the call to the web service?  If it is JavaScript, which it 
sounds like, then the result needs to be in a format that can be parsed by js.  
JavaScript does not understand CF objects hence the need to serialize the 
result or transform it to XML and parse the XML on the client side.  Another 
option for doing that is to set the return format of the function to json, 
which can be done on the fly by passing the parameter into the function when a 
json result is required (returnformat=json).

Dave

-Original Message-
From: Dean Lawrence [mailto:dean...@gmail.com] 
Sent: Monday, December 22, 2014 3:28 PM
To: cf-talk
Subject: Re: Trouble with ArrayAppend


Hi David,

Yes, the tmpAddress variable is var scoped at the top of the method. I tried 
your suggestion of re-initializing the struct with each iteration, but it did 
not change the results.

I've been doing some more testing and have found that, if I serialize the 
entire result to JSON prior to returning the data to the calling client, that 
the structures inside the array are populated properly. So the issue is when 
passing the results back as a CF struct. Again though, this is only if the CFC 
is called as a webservice, it works fine when called directly from a CF 
template. Quite odd.

On Mon, Dec 22, 2014 at 9:15 AM, David Phelan dphe...@emerginghealthit.com
wrote:


 Dean,

 First, is tmpAddress var scoped at the top of your function?

 I would try initializing tmpAddress on each iteration.

 for (var Address in Deal.getAddresses()){
 tmpAddress = StructNew();
 
 }

 Dave

 -Original Message-
 From: Dean Lawrence [mailto:dean...@gmail.com]
 Sent: Saturday, December 20, 2014 12:19 PM
 To: cf-talk
 Subject: Re: Trouble with ArrayAppend


 Ok, I just tried calling the same method directly from a CF template 
 and the structures populated properly. It is only when I am calling it 
 as a webservice that the structs are empty.

 On Sat, Dec 20, 2014 at 12:10 PM, Dean Lawrence dean...@gmail.com wrote:

  Thanks Rodney. I was hoping that what you suggested would work, but 
  unfortunately, it did not. I tried it in both ACF 10 and ACF 11. I'm 
  still left with empty structs inside the array.
 
  On Sat, Dec 20, 2014 at 11:22 AM, Rodney Enke renk...@gmail.com wrote:
 
 
  I believe you are just passing a reference of the tmpAddress to the 
  array, so it is being overridden with each loop. Try the following 
  to insert a copy of the structure into the array instead:
 
  ArrayAppend(results.Deal.addresses,duplicate(tmpAddress));
 
  -
  Rodney
 
  On Fri, Dec 19, 2014 at 4:39 PM, Dean Lawrence dean...@gmail.com
 wrote:
 
  
   I have a remote method which is retrieving a deal object, 
   populating a structure and returning it to the client requesting 
   it. This is all well and good. However, the deal object has 
   multiple address objects
  associated
   to it. When looping over these addresses, I am having trouble 
   adding
  them
   to an array. Here is my code:
  
   for (Address in Deal.getAddresses()){
   tmpAddress.street = Address.getStreet();
   tmpAddress.street2 = Address.getStreet2();
   tmpAddress.city = Address.getCity();
   tmpAddress.state = Address.getState();
   tmpAddress.postalcode = Address.getPostalcode();
   tmpAddress.phone = Address.getPhone();
   ArrayAppend(results.Deal.addresses,tmpAddress);
   }
  
   The problem that I am having is that the results.Deal.addresses 
   key
  ends up
   with an array of empty structures, the total number matching the 
   total addresses associated to this deal. So in my test case, the 
   deal that I
  am
   working on has a single address, so the results.Deal.addresses 
   key is an array with on empty structure in it (no keys). However, 
   if I don't try
  to
   append to the array by doing this:
  
   for (Address in Deal.getAddresses()){
   tmpAddress.street = Address.getStreet();
   tmpAddress.street2 = Address.getStreet2();
   tmpAddress.city = Address.getCity();
   tmpAddress.state = Address.getState();
   tmpAddress.postalcode = Address.getPostalcode();
   tmpAddress.phone = Address.getPhone();
   results.Deal.addresses = tmpAddress; }
  
   The results.Deal.addresses key is now a struct and all the 
   address keys assigned properly, so I know the tmpAddress struct 
   is being populated properly. Does anyone have any thoughts as to 
   what might be going on? I
  am
   running ACF 10 and yes, I have var scoped the results, Deal and
  tmpAddress
   variables at the top of the method. I also tried adding local 
   to the Address variable in the for loop, but it did not help.
  
   Thansk,
  
   --
  
 [image: profile picture]  *Dean Lawrence*
   *President*
   Internet Data Technology
   *Phone:* 888-438-4381 x701
   *Web:* www.idatatech.com
   *Email:* d...@idatatech.com
 Programming | Database | Consulting | Training
  
  
 

Re: Bad Gateway!

2014-12-30 Thread Byron Mann

This is the kind of error you might get when the CF service is down.

First impression is something you are running is crashing the CF service.
Anything in the logs that might indicate this is the case?

Byron


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359895
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Bad Gateway!

2014-12-30 Thread John M Bliss

That's exactly what's happening. Thanks.

On Tue, Dec 30, 2014 at 3:30 PM, Byron Mann byronos...@gmail.com wrote:


 This is the kind of error you might get when the CF service is down.

 First impression is something you are running is crashing the CF service.
 Anything in the logs that might indicate this is the case?

 Byron


 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359896
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm