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

Using XML and cfhttp ???

Community Beginner ,
Jun 28, 2019 Jun 28, 2019

Copy link to clipboard

Copied

Refer:  https://verify-email.org/home/api

I want to use their API to get a result back to see if an email address is valid.

So based on their documentation, I guess I do (something like) the following?

<cffunction name="email_verify"  access="remote" returntype="string">

            <cfargument name="email" type="string" required="true">

            <cfoutput><cfhttp url="https://app.verify-email.org/api/v1/my key/verify/#arguments.email#"        result="variables.resultxml" /></cfoutput>

<cfset variables.parsed_result = xmlParse(variables.resultxml.fileContent)> 

<cfreturn variables.parsed_result>

</cffunction>

The above syntax is obviously wrong as I am getting a console error An error occurred while parsing an XML document.

What am I doing wrong?

(I tried without the <cfoutput> with same result.  Not sure if I need them in there?

TOPICS
Advanced techniques

Views

1.6K

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

correct answers 1 Correct answer

Community Expert , Jun 30, 2019 Jun 30, 2019

coder1957**  wrote

You ran this and it worked?  I have ONLY edited out the key. And no that's not my email.

So what the blank are we doing differently?  CF11, Windows Server???,

CF11, that's the difference. I am on ColdFusion 2018 Update 3.

My guess is that the error you are getting is caused by the Java engine on which your CF11 runs.

What is the update level of your CF11 installation? What is your Java version? Are you in a position to switch to a newer java version, should need be?

Oh, don't kic

...

Votes

Translate

Translate
Community Expert ,
Jun 30, 2019 Jun 30, 2019

Copy link to clipboard

Copied

LATEST

I have to say I disagree with each of your conclusions in reply to my last comment, BKBK. But I will leave it at that and for others to judge who  may read the thread and for time to tell, rather than drag things out.

The good news is that the OP's problem is solved, and we each helped him in our own ways, with each being valuable from different perspectives. That said, it will be a challenge for him to identify any one reply as the "answer", as there were indeed multiple issues identified through multiple answers.


/Charlie (troubleshooter, carehart.org)

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