Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3498772
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T12:31:49+00:00 2026-05-18T12:31:49+00:00

I’ve been a cf developer for 11 years, but embarrassed to say that I’ve

  • 0

I’ve been a cf developer for 11 years, but embarrassed to say that I’ve done nothing substantial with webservices.

How to I form a cfhttp call to consume the following webservice API provided by the vendor?

Soap 1.2 Request:

POST /Portal/internet.asmx HTTP/1.1
Host: 192.168.222.240
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <Usage xmlns="http://portal/internet.asmx">
      <SessionID>string</SessionID>
      <CustomerCode>int</CustomerCode>
      <FullUserName>string</FullUserName>
      <StartDate>dateTime</StartDate>
      <EndDate>dateTime</EndDate>
    </Usage>
  </soap12:Body>
</soap12:Envelope>
HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

Soap 1.2 Response:

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <UsageResponse xmlns="http://portal/internet.asmx">
      <UsageResult>
        <xsd:schema>schema</xsd:schema>xml</UsageResult>
    </UsageResponse>
  </soap12:Body>
</soap12:Envelope>

I want to do it manually at the moment (I know about cfinvoke and createobject). I came up with the following from a Ben Nadel blog, but I get a “connection failure” error. I guess I just need someone to check for obvious flaws in the code before I look at whether it is genuinely connection/authorisation related.

<cfsavecontent variable="soapBody">
 <cfoutput>
  <?xml version="1.0" encoding="utf-8"?>
  <soap:Envelope 
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
            xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
            xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
          <soap:Body>
            <Usage xmlns="http://portal/internet.asmx">
              <SessionID>F7B3B3FB-DE35-45CB-A785-8229E91FAEC9</SessionID>
              <CustomerCode>1112221</CustomerCode>
              <FullUserName>MR DAVE GEORGE</FullUserName>
              <StartDate>2010-01-01</StartDate>
              <EndDate>2009-01-01</EndDate>
            </Usage>
          </soap:Body>
        </soap:Envelope>

 </cfoutput>
</cfsavecontent>


<cfhttp
 url="http://portal/internet.asmx"
 method="post"
 result="httpResponse">

 <cfhttpparam
  type="header"
  name="SOAPAction"
  value="http://portal/internet.asmx/Usage"
  />

 <cfhttpparam
  type="header"
  name="accept-encoding"
  value="no-compression"
  />

 <cfhttpparam
  type="xml"
  value="#trim( soapBody )#"
  />

</cfhttp>



 <cfoutput>
 #httpResponse.fileContent# <!--- ouputs "connection failure" --->
    </cfoutput> 

Many thanks,
Paul

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T12:31:50+00:00Added an answer on May 18, 2026 at 12:31 pm

    Going to take your word and assume cannot do it with CF because as @Henry pointed out it’s SOAP 1.2. So looks like this requires using Java directly, specifically Soap with Attachments API for Java (SAAJ). This is in the java package javax.xml.soap, which is not part of a standard Java distribution. Instead it’s a separate download from Oracle.

    Best end to end tutorial I could find on setting up a connection to an endpoint, building & sending a request, and receiving and parsing a response is from IBM’s developerworks site. Be forewarned it’s involved and doing so will require installing several jars in the ColdFusion installation’s classpath from the aforementioned download.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I am doing a simple coin flipping experiment for class that involves flipping a
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.