[cfaussie] Re: Can CF8 make "SOAP with attachments" calls

2009-03-19 Thread MrBuzzy
As you have SoapUI, I'd say you're in good shape.

Use TCPMonitor to compare your cfhttp request, with the one sent from within
SoapUI.

TCPMonitor:
http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_19352

Cheers

On Thu, Mar 19, 2009 at 6:42 PM, Darren Tracey  wrote:

>
> Thanks for that so far.
> We're getting closer, but still not there yet.
>
> We can generate a request that works using SOAPUI. Here is the raw
> request from it.
>
> POST http://vbnejdfwls4001:16400/easyimage/services/EasyImageService
> HTTP/0.9
> SOAPAction: "urn:suncorp-com-au:service:easyimage:2007:05:storeImage"
> Content-Type: multipart/related; type="text/xml";
> start=""; boundary="
> =_Part_38_196453.1237444713062"
> MIME-Version: 1.0
> Authorization: Basic Q3VzdG9tZXJUZXN0LVN0b3JlcjplYXN5aW1hZ2Uy
> User-Agent: Jakarta Commons-HttpClient/3.1
> Host: vbnejdfwls4001:16400
> Content-Length: 2901
>
>
> --=_Part_38_196453.1237444713062
> Content-Type: text/xml; charset=UTF-8
> Content-Transfer-Encoding: 8bit
> Content-ID: 
>
> http://schemas.xmlsoap.org/soap/
> envelope/ "
> xmlns:urn="urn:suncorp-com-au:service:easyimage:2007:05">
>   
>   
>  
> CustomerTest
> 
>
>cid:691309939620
>
> 
>  
>   
> 
> --=_Part_38_196453.1237444713062
> Content-Type: image/jpeg
> Content-Transfer-Encoding: binary
> Content-ID: <691309939620>
>
> ÿØÿà
> --=_Part_38_196453.1237444713062--
>
> The question is still, how do we get CF8 to do the same.
>
> When we use the code you supplied below, with a header cfhttpparam we
> get:
> File Content:
> Error Detail:
> Status Code: 500 Internal Server Error
> Mime Type:text/xml
>
> When I remove the cfhttpparam header we get:
> File Content:
>
>
>
> Error 500--Internal Server Error
> From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
> 10.5.1 500 Internal Server Error
> The server encountered an unexpected condition which prevented it from
> fulfilling the request.
>
> Error Detail:
> Status Code: 500 Internal Server Error
> Mime Type:text/html
>
> I have an interface contract document that I can supply to you off
> list if you'd like.
>
> Regards, and thank you so much for this help.
>
> Darren Tracey
>
>
> On Mar 18, 11:09 pm, MrBuzzy  wrote:
> > I'm back, feeling just a teeny bit more learned :)
> > If you are indeed using 'soap with attachments' [ref:
> http://www.w3.org/TR/SOAP-attachments] then you need to create a 'soap
> > message package'.
> >
> > A soap message package is a mime multi-part request that encapsulates the
> > soap xml and one ore more 'attachments'.
> >
> > Getting to cfhttp... unfortunately the http request content type has to
> be
> > "Multipart/Related", so you can't use cfhttp mutipart="true".
> >
> > It may work like this;
> >
> > http://localhost:8300/receiver.cfm";
> > method="post" resolveurl="no" redirect="yes" charset="utf-8">
> >
> >  value='Multipart/Related;
> > boundary=MIME_boundary; type=text/xml; start="<
> http://mrbuzzy.org/example.xml>"' />
> >
> > 
> >
> > 
> >
> > Note the 'body' of the request is binary (yeah, it seems cfhttp will
> allow
> > it).
> >
> > It's going to be tricky to create the muti-part body (but maybe not
> > impossible), like dis...
> >
> > 
> > --MIME_boundary
> > Content-Type: text/xml; charset=UTF-8
> > Content-Transfer-Encoding: 8bit
> > Content-ID: 
> >
> > http://schemas.xmlsoap.org/soap/
> > envelope/">
> >   
> >   
> >  
> > CustomerTest
> > 
> >cid:827370646852
> >Bluehills.jpg
> > 
> >  
> >   
> > 
> >
> > --MIME_boundary
> > Content-Type: image/jpeg
> > Content-Transfer-Encoding: binary
> > Content-ID: 
> >
> > 
> >
> > 
> >  > variable="myImage">
> >  > output="#myText#">
> >  > output="#myImage#">
> >  > output="--MIME_boundary--">
> >  > variable="myBody">
> >
> > This is completely untested. I couldn't find a web service to try it on
> and
> > it would be a pain to debug the body format. But it might work too ;)
> >
> > Cheers.
> >
> >
> >
> > On Wed, Mar 18, 2009 at 6:58 PM, MrBuzzy  wrote:
> > > Hi Darren,
> >
> > > Soap with attachments has been on my 'to get my head around' list for
> > > a while. I've done similar things but not that exactly.
> >
> > > I assume you have tried cfinvoke and it didn't work, which is why
> > > you're using cfhttp?
> >
> > > Can you look at the wsdl to work out what type of data is expected by
> > > the service? Perhaps you can post a snippet.
> >
> > > (I can't recall if soap attachments expects the binary data encoded to
> > > a string, or if you can post the file 'raw' like you're doing)
> >
> > > If noone else provides the answer, I'm happy to try it out myself for
> fun.
> >
> > > Cheers.
> >
> > > On 18/03/2009, Darren Tracey  wrote:
> >
> > > > We need to call an existi

[cfaussie] Re: Can CF8 make "SOAP with attachments" calls

2009-03-19 Thread Darren Tracey

Thanks for that so far.
We're getting closer, but still not there yet.

We can generate a request that works using SOAPUI. Here is the raw
request from it.

POST http://vbnejdfwls4001:16400/easyimage/services/EasyImageService
HTTP/0.9
SOAPAction: "urn:suncorp-com-au:service:easyimage:2007:05:storeImage"
Content-Type: multipart/related; type="text/xml";
start=""; boundary="
=_Part_38_196453.1237444713062"
MIME-Version: 1.0
Authorization: Basic Q3VzdG9tZXJUZXN0LVN0b3JlcjplYXN5aW1hZ2Uy
User-Agent: Jakarta Commons-HttpClient/3.1
Host: vbnejdfwls4001:16400
Content-Length: 2901


--=_Part_38_196453.1237444713062
Content-Type: text/xml; charset=UTF-8
Content-Transfer-Encoding: 8bit
Content-ID: 

http://schemas.xmlsoap.org/soap/
envelope/" xmlns:urn="urn:suncorp-com-au:service:easyimage:2007:05">
   
   
  
 CustomerTest
 

cid:691309939620

 
  
   

--=_Part_38_196453.1237444713062
Content-Type: image/jpeg
Content-Transfer-Encoding: binary
Content-ID: <691309939620>

ÿØÿà
--=_Part_38_196453.1237444713062--

The question is still, how do we get CF8 to do the same.

When we use the code you supplied below, with a header cfhttpparam we
get:
File Content:
Error Detail:
Status Code: 500 Internal Server Error
Mime Type:text/xml

When I remove the cfhttpparam header we get:
File Content:



Error 500--Internal Server Error
>From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
10.5.1 500 Internal Server Error
The server encountered an unexpected condition which prevented it from
fulfilling the request.

Error Detail:
Status Code: 500 Internal Server Error
Mime Type:text/html

I have an interface contract document that I can supply to you off
list if you'd like.

Regards, and thank you so much for this help.

Darren Tracey


On Mar 18, 11:09 pm, MrBuzzy  wrote:
> I'm back, feeling just a teeny bit more learned :)
> If you are indeed using 'soap with attachments' 
> [ref:http://www.w3.org/TR/SOAP-attachments] then you need to create a 'soap
> message package'.
>
> A soap message package is a mime multi-part request that encapsulates the
> soap xml and one ore more 'attachments'.
>
> Getting to cfhttp... unfortunately the http request content type has to be
> "Multipart/Related", so you can't use cfhttp mutipart="true".
>
> It may work like this;
>
> http://localhost:8300/receiver.cfm";
> method="post" resolveurl="no" redirect="yes" charset="utf-8">
>
>     
>
>     
>
> 
>
> Note the 'body' of the request is binary (yeah, it seems cfhttp will allow
> it).
>
> It's going to be tricky to create the muti-part body (but maybe not
> impossible), like dis...
>
> 
> --MIME_boundary
> Content-Type: text/xml; charset=UTF-8
> Content-Transfer-Encoding: 8bit
> Content-ID: 
>
> http://schemas.xmlsoap.org/soap/
> envelope/">
>   
>   
>      
>         CustomerTest
>         
>            cid:827370646852
>            Bluehills.jpg
>         
>      
>   
> 
>
> --MIME_boundary
> Content-Type: image/jpeg
> Content-Transfer-Encoding: binary
> Content-ID: 
>
> 
>
> 
>  variable="myImage">
>  output="#myText#">
>  output="#myImage#">
>  output="--MIME_boundary--">
>  variable="myBody">
>
> This is completely untested. I couldn't find a web service to try it on and
> it would be a pain to debug the body format. But it might work too ;)
>
> Cheers.
>
>
>
> On Wed, Mar 18, 2009 at 6:58 PM, MrBuzzy  wrote:
> > Hi Darren,
>
> > Soap with attachments has been on my 'to get my head around' list for
> > a while. I've done similar things but not that exactly.
>
> > I assume you have tried cfinvoke and it didn't work, which is why
> > you're using cfhttp?
>
> > Can you look at the wsdl to work out what type of data is expected by
> > the service? Perhaps you can post a snippet.
>
> > (I can't recall if soap attachments expects the binary data encoded to
> > a string, or if you can post the file 'raw' like you're doing)
>
> > If noone else provides the answer, I'm happy to try it out myself for fun.
>
> > Cheers.
>
> > On 18/03/2009, Darren Tracey  wrote:
>
> > > We need to call an existing software service here from our CF8 and
> > > Flex app, and we need to access it (to submit a file for storage) via
> > > "SOAP with Attachments".
> > > We can't see how to do this from within CF and haven't had much luck
> > > with Google.
> > > If you try to mix the request content types in the SOAP call, you get
> > > a CF error.
>
> > > Here's the code:
>
> > ---­--
> > > 
> > >  http://schemas.xmlsoap.org/soap/
> > > envelope/">
> > >    
> > >    
> > >       
> > >          CustomerTest
> > >          
> > >             
>
> > > Bluehills.jpg
> > >          
> > >       
> > >    
> > > 
> > > 
>
> > > http://servername:16400/easyimage/services/
> > > EasyImageService" username="username" password="password"
> > > method="post" resolveurl="no" redirect="yes" 

[cfaussie] Re: Can CF8 make "SOAP with attachments" calls

2009-03-19 Thread Mark Ireland

I can tell you I have seen SOAP with binary stuff in it (I assumed it was an 
image)

It was from the Stellent cms (since bought by Oracle)

Date: Thu, 19 Mar 2009 00:09:49 +1100
Subject: [cfaussie] Re: Can CF8 make "SOAP with attachments" calls
From: mrbu...@gmail.com
To: cfaussie@googlegroups.com

I'm back, feeling just a teeny bit more learned :) 
If you are indeed using 'soap with attachments' [ref: 
http://www.w3.org/TR/SOAP-attachments ] then you need to create a 'soap message 
package'.

A soap message package is a mime multi-part request that encapsulates the soap 
xml and one ore more 'attachments'.
Getting to cfhttp... unfortunately the http request content type has to be 
"Multipart/Related", so you can't use cfhttp mutipart="true".

It may work like this; 
http://localhost:8300/receiver.cfm";
method="post" resolveurl="no" redirect="yes" charset="utf-8">





Note the 'body' of the request is binary (yeah, it seems cfhttp will allow it).

It's going to be tricky to create the muti-part body (but maybe not 
impossible), like dis...

--MIME_boundaryContent-Type: text/xml; charset=UTF-8Content-Transfer-Encoding: 
8bit
Content-ID: <http://mrbuzzy.org/example.xml>

http://schemas.xmlsoap.org/soap/envelope/";>
 
CustomerTest
   cid:827370646852
   Bluehills.jpg
   

--MIME_boundaryContent-Type: image/jpeg
Content-Transfer-Encoding: binaryContent-ID: <http://mrbuzzy.org/Bluehills.jpg>







This is completely untested. I couldn't find a web service to try it on and it 
would be a pain to debug the body format. But it might work too ;)
Cheers.

On Wed, Mar 18, 2009 at 6:58 PM, MrBuzzy  wrote:

Hi Darren,



Soap with attachments has been on my 'to get my head around' list for

a while. I've done similar things but not that exactly.



I assume you have tried cfinvoke and it didn't work, which is why

you're using cfhttp?



Can you look at the wsdl to work out what type of data is expected by

the service? Perhaps you can post a snippet.



(I can't recall if soap attachments expects the binary data encoded to

a string, or if you can post the file 'raw' like you're doing)



If noone else provides the answer, I'm happy to try it out myself for fun.



Cheers.





On 18/03/2009, Darren Tracey  wrote:

>

> We need to call an existing software service here from our CF8 and

> Flex app, and we need to access it (to submit a file for storage) via

> "SOAP with Attachments".

> We can't see how to do this from within CF and haven't had much luck

> with Google.

> If you try to mix the request content types in the SOAP call, you get

> a CF error.

>

> Here's the code:

> -

> 

>  http://schemas.xmlsoap.org/soap/

> envelope/">

>

>

>   

>  CustomerTest

>  

> 

>

> Bluehills.jpg

>  

>   

>

> 

> 

>

> http://servername:16400/easyimage/services/

> EasyImageService" username="username" password="password"

> method="post" resolveurl="no" redirect="yes" charset="utf-8"> --->

> 

>  name="Bluehills.jpg" />

> 

> 

>

> Here's the error:

> You may not mix the use of cfhttpparam tags of type FILE or FORMFIELD

> with cfhttpparam tags of type BODY or XML.

>

> The error occurred in E:\euc_smallapps\_test\cfml\Fred_SOAP1.cfm: line

> 45

> 43 : 

> 44 :

> 45 :  name="Bluehills.jpg" />

> 46 : 

> 47 :

>

>

> Has anyone ever been able to get this to work?

> Does anyone have any suggestions?

>

> Regards

> Darren Tracey

> >

>



--

Sent from my mobile device








_
Looking to change your car this year? Find car news, reviews and more 
http://a.ninemsn.com.au/b.aspx?URL=http%3A%2F%2Fsecure%2Dau%2Eimrworldwide%2Ecom%2Fcgi%2Dbin%2Fa%2Fci%5F450304%2Fet%5F2%2Fcg%5F801459%2Fpi%5F1004813%2Fai%5F859641&_t=762955845&_r=tig_OCT07&_m=EXT
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to 
cfaussie+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: Can CF8 make "SOAP with attachments" calls

2009-03-18 Thread MrBuzzy
I'm back, feeling just a teeny bit more learned :)
If you are indeed using 'soap with attachments' [ref:
http://www.w3.org/TR/SOAP-attachments ] then you need to create a 'soap
message package'.

A soap message package is a mime multi-part request that encapsulates the
soap xml and one ore more 'attachments'.

Getting to cfhttp... unfortunately the http request content type has to be
"Multipart/Related", so you can't use cfhttp mutipart="true".

It may work like this;

http://localhost:8300/receiver.cfm";
method="post" resolveurl="no" redirect="yes" charset="utf-8">







Note the 'body' of the request is binary (yeah, it seems cfhttp will allow
it).

It's going to be tricky to create the muti-part body (but maybe not
impossible), like dis...


--MIME_boundary
Content-Type: text/xml; charset=UTF-8
Content-Transfer-Encoding: 8bit
Content-ID: 

http://schemas.xmlsoap.org/soap/
envelope/">
  
  
 
CustomerTest

   cid:827370646852
   Bluehills.jpg

 
  


--MIME_boundary
Content-Type: image/jpeg
Content-Transfer-Encoding: binary
Content-ID: 










This is completely untested. I couldn't find a web service to try it on and
it would be a pain to debug the body format. But it might work too ;)

Cheers.

On Wed, Mar 18, 2009 at 6:58 PM, MrBuzzy  wrote:

> Hi Darren,
>
> Soap with attachments has been on my 'to get my head around' list for
> a while. I've done similar things but not that exactly.
>
> I assume you have tried cfinvoke and it didn't work, which is why
> you're using cfhttp?
>
> Can you look at the wsdl to work out what type of data is expected by
> the service? Perhaps you can post a snippet.
>
> (I can't recall if soap attachments expects the binary data encoded to
> a string, or if you can post the file 'raw' like you're doing)
>
> If noone else provides the answer, I'm happy to try it out myself for fun.
>
> Cheers.
>
>
> On 18/03/2009, Darren Tracey  wrote:
> >
> > We need to call an existing software service here from our CF8 and
> > Flex app, and we need to access it (to submit a file for storage) via
> > "SOAP with Attachments".
> > We can't see how to do this from within CF and haven't had much luck
> > with Google.
> > If you try to mix the request content types in the SOAP call, you get
> > a CF error.
> >
> > Here's the code:
> >
> -
> > 
> >  http://schemas.xmlsoap.org/soap/
> > envelope/">
> >
> >
> >   
> >  CustomerTest
> >  
> > 
> >
> > Bluehills.jpg
> >  
> >   
> >
> > 
> > 
> >
> > http://servername:16400/easyimage/services/
> > EasyImageService" username="username" password="password"
> > method="post" resolveurl="no" redirect="yes" charset="utf-8"> --->
> > 
> >  > name="Bluehills.jpg" />
> > 
> >
> 
> >
> > Here's the error:
> > You may not mix the use of cfhttpparam tags of type FILE or FORMFIELD
> > with cfhttpparam tags of type BODY or XML.
> >
> > The error occurred in E:\euc_smallapps\_test\cfml\Fred_SOAP1.cfm: line
> > 45
> > 43 : 
> > 44 :
> > 45 :  > name="Bluehills.jpg" />
> > 46 : 
> > 47 :
> >
> >
> > Has anyone ever been able to get this to work?
> > Does anyone have any suggestions?
> >
> > Regards
> > Darren Tracey
> > > >
> >
>
> --
> Sent from my mobile device
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to 
cfaussie+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: Can CF8 make "SOAP with attachments" calls

2009-03-18 Thread MrBuzzy

Hi Darren,

Soap with attachments has been on my 'to get my head around' list for
a while. I've done similar things but not that exactly.

I assume you have tried cfinvoke and it didn't work, which is why
you're using cfhttp?

Can you look at the wsdl to work out what type of data is expected by
the service? Perhaps you can post a snippet.

(I can't recall if soap attachments expects the binary data encoded to
a string, or if you can post the file 'raw' like you're doing)

If noone else provides the answer, I'm happy to try it out myself for fun.

Cheers.


On 18/03/2009, Darren Tracey  wrote:
>
> We need to call an existing software service here from our CF8 and
> Flex app, and we need to access it (to submit a file for storage) via
> "SOAP with Attachments".
> We can't see how to do this from within CF and haven't had much luck
> with Google.
> If you try to mix the request content types in the SOAP call, you get
> a CF error.
>
> Here's the code:
> -
> 
>  http://schemas.xmlsoap.org/soap/
> envelope/">
>
>
>   
>  CustomerTest
>  
> 
>
> Bluehills.jpg
>  
>   
>
> 
> 
>
> http://servername:16400/easyimage/services/
> EasyImageService" username="username" password="password"
> method="post" resolveurl="no" redirect="yes" charset="utf-8"> --->
> 
>  name="Bluehills.jpg" />
> 
> 
>
> Here's the error:
> You may not mix the use of cfhttpparam tags of type FILE or FORMFIELD
> with cfhttpparam tags of type BODY or XML.
>
> The error occurred in E:\euc_smallapps\_test\cfml\Fred_SOAP1.cfm: line
> 45
> 43 : 
> 44 :
> 45 :  name="Bluehills.jpg" />
> 46 : 
> 47 :
>
>
> Has anyone ever been able to get this to work?
> Does anyone have any suggestions?
>
> Regards
> Darren Tracey
> >
>

-- 
Sent from my mobile device

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to 
cfaussie+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: Can CF8 make "SOAP with attachments" calls

2009-03-18 Thread Barry Beattie

IIRC this could be one of the areas Kai Koenig is touching on at WebDU this year

http://www.webdu.com.au/session/web-services-revisited

darn, where's Kai when you need him? Oh, yeah, that's right. At the
FlashPlatform user group meeting in Brisbane tonight...

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to 
cfaussie+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---