getHTTPRequestData bug in MX

2003-03-06 Thread jon hall
  Anyone found a workaround for intermittent bug in getHTTPRequestData
  that causes it to lose the content of a post?

  Other than tossing the MX CD in the garbage that is...I'm really
  close to doing just that.

-- 
 jon
  mailto:[EMAIL PROTECTED]

~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



Re: getHTTPRequestData bug in MX - using GetPageContext()

2003-03-06 Thread jon hall
Ok, 10 minutes into trying a workaround, I am playing around with
getPageContext(). So far I have this:

cfset pc = GetPageContext()
cfset req = pc.getRequest()
cfdump var=#req#
cfset headers = req.getHeaders()

Unfortunately, the getHeaders method is throwing a method selection
exception...it's definitely there though. Anyone know what I am
missing?

-- 
 jon
 mailto:[EMAIL PROTECTED]

Thursday, March 6, 2003, 11:12:45 AM, you wrote:
jh   Anyone found a workaround for intermittent bug in getHTTPRequestData
jh   that causes it to lose the content of a post?

jh   Other than tossing the MX CD in the garbage that is...I'm really
jh   close to doing just that.

~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



RE: getHTTPRequestData bug in MX - using GetPageContext()

2003-03-06 Thread Tim Blair
 Unfortunately, the getHeaders method is throwing a method 
 selection exception...it's definitely there though. Anyone 
 know what I am missing?

The getHeaders() method takes a String parameter.  Check out the code
below (watch wrap) to see.  This is basically a take-off of CFDUMP that
uses the Java Reflection API to introspect a particular object and find
out information about it, namely any superclasses, contructors, field
names and methods (including return type and required parameters).
Unfortunately it doesn't tell you what the params are for, just their
type!

!--- - ---

!--- get an instance of the object we want to look at ---
cfset cl = GetPageContext()
cfset cl = cl.getRequest()

!--- get the class type for the given object ---
cfset c = cl.getClass()
!--- get immediate superclass ---
cfset superclass = c.getSuperclass()
!--- get the contructors ---
cfset constructors = c.getConstructors()
!--- get the field names ---
cfset fields = c.getFields()
!--- get the methods ---
cfset methods = c.getMethods()

!--- print out all methods, return types + param types ---
cfoutput
  h2Object Type : #c#/h2

  h3Superclass/h3
  cfscript
 keepgoing = TRUE;
 while (keepgoing) {
 if (isdefined(superclass)) {
 writeoutput(#superclass.getName()#br);
 superclass = superclass.getSuperclass();
 } else {
 keepgoing = FALSE;
 }
 }
  /cfscript

  h3Contructors/h3
  cfloop index=i from=1 to=#arraylen(constructors)#
#c.getName()# (
cfset params = constructors[i].getParameterTypes()
cfloop index=x from=1 to=#arraylen(params)#
#params[x].getName()#
/cfloop
)br
  /cfloop

  h3Field Names/h3
  cfloop index=i from=1 to=#arraylen(fields)#
cfset type = fields[i].getType()
#fields[i].getName()# (#type.getName()#)br
  /cfloop

  h3Methods/h3
  cfloop index=i from=1 to=#arraylen(methods)#
Method : b#methods[i].getName()#/bbr
nbsp; nbsp; nbsp; nbsp; iReturns :
#methods[i].getReturnType().getName()#/ibr
cfset params = methods[i].getParameterTypes()
cfloop index=x from=1 to=#arraylen(params)#
nbsp; nbsp; nbsp; nbsp; Param : #params[x].getName()#br
/cfloop
br
  /cfloop
/cfoutput

!--- - ---

Before you ask, yes I was bored.  :o)

Maybe a bit more than you asked for, but hey, someone might find it
useful...

Tim.


---
OUR NEW SITE IS NOW LIVE
Visit our new website at http://www.rawnet.com/ and
race around the beautiful Bracknell streets at
http://xmas.rawnet.com/
---
Tim Blair
Web Application Engineer, Rawnet Limited
Direct Phone : +44 (0) 1344 393 441
Switchboard : +44 (0) 1344 393 040
---
This message may contain information which is legally
privileged and/or confidential.  If you are not the
intended recipient, you are hereby notified that any
unauthorised disclosure, copying, distribution or use
of this information is strictly prohibited. Such
notification notwithstanding, any comments, opinions,
information or conclusions expressed in this message
are those of the originator, not of rawnet limited,
unless otherwise explicitly and independently indicated
by an authorised representative of rawnet limited.
---


~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



Re: getHTTPRequestData bug in MX - using GetPageContext() - workaround

2003-03-06 Thread jon hall
Thank you very much, that is very interesting code that I plan on
looking at in more detail when a client isn't extremely pissed at us,
however I just figured out what I needed to do.

cfscript
pc = GetPageContext();
req = pc.getRequest();
readerObj = req.getReader();

output = '';
line = readerObj.readLine();
while (isDefined(line)) {
output = output  line;
line = readerObj.readLine();
}
readerObj.close();
/cfscript

cfoutput#output#/cfoutput

The output variable is the actual body of the HTTP Post, and hopefully
this is a workaround for the getHTTPRequestData bug as well, allowing
MX to respond to an XML Post. I will be finding out shortly the hard
way. If this doesn't work, I am going to be here for a long time
redoing the entire thing on CF5.

-- 
 jon
 mailto:[EMAIL PROTECTED]

Thursday, March 6, 2003, 11:51:04 AM, you wrote:
 Unfortunately, the getHeaders method is throwing a method 
 selection exception...it's definitely there though. Anyone 
 know what I am missing?

TB The getHeaders() method takes a String parameter.  Check out the code
TB below (watch wrap) to see.  This is basically a take-off of CFDUMP that
TB uses the Java Reflection API to introspect a particular object and find
TB out information about it, namely any superclasses, contructors, field
TB names and methods (including return type and required parameters).
TB Unfortunately it doesn't tell you what the params are for, just their
TB type!

TB !--- - ---

TB !--- get an instance of the object we want to look at ---
TB cfset cl = GetPageContext()
TB cfset cl = cl.getRequest()

TB !--- get the class type for the given object ---
TB cfset c = cl.getClass()
TB !--- get immediate superclass ---
TB cfset superclass = c.getSuperclass()
TB !--- get the contructors ---
TB cfset constructors = c.getConstructors()
TB !--- get the field names ---
TB cfset fields = c.getFields()
TB !--- get the methods ---
TB cfset methods = c.getMethods()

TB !--- print out all methods, return types + param types ---
TB cfoutput
TB   h2Object Type : #c#/h2

TB   h3Superclass/h3
TB   cfscript
TB  keepgoing = TRUE;
TB  while (keepgoing) {
TB  if (isdefined(superclass)) {
TB  writeoutput(#superclass.getName()#br);
TB  superclass = superclass.getSuperclass();
TB  } else {
TB  keepgoing = FALSE;
TB  }
TB  }
TB   /cfscript

TB   h3Contructors/h3
TB   cfloop index=i from=1 to=#arraylen(constructors)#
TB #c.getName()# (
TB cfset params = constructors[i].getParameterTypes()
TB cfloop index=x from=1 to=#arraylen(params)#
TB #params[x].getName()#
TB /cfloop
TB )br
TB   /cfloop

TB   h3Field Names/h3
TB   cfloop index=i from=1 to=#arraylen(fields)#
TB cfset type = fields[i].getType()
TB #fields[i].getName()# (#type.getName()#)br
TB   /cfloop

TB   h3Methods/h3
TB   cfloop index=i from=1 to=#arraylen(methods)#
TB Method : b#methods[i].getName()#/bbr
TB nbsp; nbsp; nbsp; nbsp; iReturns :
TB #methods[i].getReturnType().getName()#/ibr
TB cfset params = methods[i].getParameterTypes()
TB cfloop index=x from=1 to=#arraylen(params)#
TB nbsp; nbsp; nbsp; nbsp; Param : #params[x].getName()#br
TB /cfloop
TB br
TB   /cfloop
TB /cfoutput

TB !--- - ---

TB Before you ask, yes I was bored.  :o)

TB Maybe a bit more than you asked for, but hey, someone might find it
TB useful...

TB Tim.


TB ---
TB OUR NEW SITE IS NOW LIVE
TB Visit our new website at http://www.rawnet.com/ and
TB race around the beautiful Bracknell streets at
TB http://xmas.rawnet.com/
TB ---
TB Tim Blair
TB Web Application Engineer, Rawnet Limited
TB Direct Phone : +44 (0) 1344 393 441
TB Switchboard : +44 (0) 1344 393 040
TB ---
TB This message may contain information which is legally
TB privileged and/or confidential.  If you are not the
TB intended recipient, you are hereby notified that any
TB unauthorised disclosure, copying, distribution or use
TB of this information is strictly prohibited. Such
TB notification notwithstanding, any comments, opinions,
TB information or conclusions expressed in this message
TB are those of the originator, not of rawnet limited,
TB unless otherwise explicitly and independently indicated
TB by an authorised representative of rawnet limited.
TB ---


TB 
~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable