Re: Extracting data from Java ByteArrayOutputStream

2010-08-16 Thread Pete Freitag

On Fri, Aug 13, 2010 at 2:03 PM, Jeff Chastain li...@admentus.com wrote:

  Pete,

 This does have me an ASCII string of the contents of the byte array.
 After a lot of string parsing, I can get the SOAP envelope out and
 convert it to XML.  However, the binary images that are also included
 here are apparently encoded some how and I have yet to be able to use
 any form of ColdFusion decoding process to get them into a readable format.


Jeff the images as Leigh suggested are probably encoded in Base64
format, ColdFusion has functions to deal with base64 built in. You can
use ToBinary(base64string) and then you can write the binary data to a
file.

--
Pete Freitag
http://foundeo.com/ - ColdFusion Consulting  Products
http://petefreitag.com/ - My Blog
http://hackmycf.com - Is your ColdFusion Server Secur

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


Re: Extracting data from Java ByteArrayOutputStream

2010-08-14 Thread Leigh

 the binary images that are also included 
 here are apparently encoded some how 

Could they be bas64 encoded? What does the wsdl say about the format of the 
response elements?



  


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


Re: Extracting data from Java ByteArrayOutputStream

2010-08-13 Thread Pete Freitag

This should give you the cfhttp response as a string, when you get
back a byte array:

cfhttp.filecontent.toString(UTF-8)


--
Pete Freitag
http://foundeo.com/ - ColdFusion Consulting  Products
http://petefreitag.com/ - My Blog
http://hackmycf.com - Is your ColdFusion Server Secure?


On Thu, Aug 12, 2010 at 12:22 PM, Jeff Chastain
jeff.chast...@admentus.com wrote:

 Dave,

 Per my message earlier this week 
 (http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:336189), 
 when I try cfinvoke or createObject( webservice ..., I am getting an 
 AxisFault error that I cannot get around.  When I use cfhttp to post, I am 
 getting the expected response back, but in a ByteArrayOutputStream.

 Thanks
 -- Jeff


   I am working with a SOAP web service in CF 8.0.1 and the filecontent
  attribute of the cfhttp response is a java.io.ByteArrayOutputStream.  If
  I use the toString() method to convert this to text, I can see the XML
  response data plus the binary image strings that I was expecting.  The
  problem is, I am not sure how to get this information out of the
  ByteArrayOutputStream.
 
 Out of curiosity, is there a reason why you're using CFHTTP to invoke
 a SOAP service instead of CFINVOKE? If you can't use CFINVOKE, you can
 probably just invoke the underlying Axis classes using Java.
 
 Dave Watts, CTO, Fig Leaf Software
 http://www.figleaf.com/
 http://training.figleaf.com/
 
 Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
 GSA Schedule, and provides the highest caliber vendor-authorized
 instruction at our training centers, online, or onsi

 

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


Re: Extracting data from Java ByteArrayOutputStream

2010-08-13 Thread Jeff Chastain

  Pete,

This does have me an ASCII string of the contents of the byte array.  
After a lot of string parsing, I can get the SOAP envelope out and 
convert it to XML.  However, the binary images that are also included 
here are apparently encoded some how and I have yet to be able to use 
any form of ColdFusion decoding process to get them into a readable format.

Is there a better way to covert this byte array / string into something 
usable within ColdFusion without a bunch of string parsing and decoding?

Thanks
-- Jeff


On 8/13/2010 10:34 AM, Pete Freitag wrote:
 This should give you the cfhttp response as a string, when you get
 back a byte array:

 cfhttp.filecontent.toString(UTF-8)


 --
 Pete Freitag
 http://foundeo.com/ - ColdFusion Consulting  Products
 http://petefreitag.com/ - My Blog
 http://hackmycf.com - Is your ColdFusion Server Secure?


 On Thu, Aug 12, 2010 at 12:22 PM, Jeff Chastain
 jeff.chast...@admentus.com  wrote:
 Dave,

 Per my message earlier this week 
 (http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:336189), 
 when I trycfinvoke or createObject( webservice ..., I am getting an 
 AxisFault error that I cannot get around.  When I usecfhttp to post, I am 
 getting the expected response back, but in a ByteArrayOutputStream.

 Thanks
 -- Jeff


   I am working with a SOAP web service in CF 8.0.1 and the filecontent
 attribute of the cfhttp response is a java.io.ByteArrayOutputStream.  If
 I use the toString() method to convert this to text, I can see the XML
 response data plus the binary image strings that I was expecting.  The
 problem is, I am not sure how to get this information out of the
 ByteArrayOutputStream.
 Out of curiosity, is there a reason why you're using CFHTTP to invoke
 a SOAP service instead of CFINVOKE? If you can't use CFINVOKE, you can
 probably just invoke the underlying Axis classes using Java.

 Dave Watts, CTO, Fig Leaf Software
 http://www.figleaf.com/
 http://training.figleaf.com/

 Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
 GSA Schedule, and provides the highest caliber vendor-authorized
 instruction at our training centers, online, or onsi

 

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


Extracting data from Java ByteArrayOutputStream

2010-08-12 Thread Jeff Chastain

  I am working with a SOAP web service in CF 8.0.1 and the filecontent 
attribute of the cfhttp response is a java.io.ByteArrayOutputStream.  If 
I use the toString() method to convert this to text, I can see the XML 
response data plus the binary image strings that I was expecting.  The 
problem is, I am not sure how to get this information out of the 
ByteArrayOutputStream.

So far, Google has not proved real helpful.  Can anybody offer some 
pointers?

Thanks.

-- 
Jeff Chastain

http://www.admentus.com
http://ams.admentus.com

Admentus is a custom web based solutions provider, delivering
business software applications, systems integration, strategic
consulting, and ColdFusion application maintenance services
which allow our clients to grow their business and plan for
the future.


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


Re: Extracting data from Java ByteArrayOutputStream

2010-08-12 Thread Dave Watts

  I am working with a SOAP web service in CF 8.0.1 and the filecontent
 attribute of the cfhttp response is a java.io.ByteArrayOutputStream.  If
 I use the toString() method to convert this to text, I can see the XML
 response data plus the binary image strings that I was expecting.  The
 problem is, I am not sure how to get this information out of the
 ByteArrayOutputStream.

Out of curiosity, is there a reason why you're using CFHTTP to invoke
a SOAP service instead of CFINVOKE? If you can't use CFINVOKE, you can
probably just invoke the underlying Axis classes using Java.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
http://training.figleaf.com/

Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
GSA Schedule, and provides the highest caliber vendor-authorized
instruction at our training centers, online, or onsi

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


Re: Extracting data from Java ByteArrayOutputStream

2010-08-12 Thread Jeff Chastain

Dave,

Per my message earlier this week 
(http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:336189), 
when I try cfinvoke or createObject( webservice ..., I am getting an 
AxisFault error that I cannot get around.  When I use cfhttp to post, I am 
getting the expected response back, but in a ByteArrayOutputStream.

Thanks
-- Jeff


  I am working with a SOAP web service in CF 8.0.1 and the filecontent
 attribute of the cfhttp response is a java.io.ByteArrayOutputStream.  If
 I use the toString() method to convert this to text, I can see the XML
 response data plus the binary image strings that I was expecting.  The
 problem is, I am not sure how to get this information out of the
 ByteArrayOutputStream.

Out of curiosity, is there a reason why you're using CFHTTP to invoke
a SOAP service instead of CFINVOKE? If you can't use CFINVOKE, you can
probably just invoke the underlying Axis classes using Java.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
http://training.figleaf.com/

Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
GSA Schedule, and provides the highest caliber vendor-authorized
instruction at our training centers, online, or onsi

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