• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Sending SOAP attachment

New Here ,
Apr 13, 2011 Apr 13, 2011

Copy link to clipboard

Copied

Has anyone successfully done this? I haven't been able to find a solution in ColdFusion. I've also read that since ColdFusion still runs on Apache Axis1 and SOAP attachments with MOTM (which is needed for the API we're communicating with) need Axis2 it won't work.

Is there a way to do this with Java?

Any help would be appreciated!

TOPICS
Advanced techniques

Views

671

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Apr 13, 2011 Apr 13, 2011

Copy link to clipboard

Copied

I do a lot with SOAP webservice interfacing on CF - can you give a little more detail on what exactly you are having problems with?  What is the webservice you are trying to access?

-reed

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 13, 2011 Apr 13, 2011

Copy link to clipboard

Copied

Well, after a lot of searching I've read that to split up the SOAP envelope and the actual file contents, one should use an httpparam of formfield and one of type file.

The steps I've taken so far to not get an error from the API:

  • set multipartType='related' on the HTTP request
  • Used HttpConnection.addParam( type='formfield', name='xmldata', value=XmlParse( RequestContent ) ) to set the actual SOAP envelope and contents
  • Set HttpConnection.addParam( type='file', name='CsvEmails', file=FileLocation, mimetype='text/csv' ) for the file itself

This goes through without an error by the API, but after looking at their logs, the "uploaded" file is only 9 Bytes large without the actual content.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Apr 13, 2011 Apr 13, 2011

Copy link to clipboard

Copied

LATEST

I'm a little suspicious of the file=filelocation part of the code - try changing that to

file='#filelocation#' to see if that makes a difference.

Have you tried using an HTTP tracing tool like Fiddler or Firebug to see what is actually being sent out?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation