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

Using cfajaxproxy with SSL

Guest
Jul 18, 2011 Jul 18, 2011

I am getting a similar error message.

"Component  returned failure code: 0x80004005 (NS_ERROR_FAILURE)" nsresult:  "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: https://www.xxxxx.com/CFIDE/scripts/ajax/package/cfajax.js :: <TOP_LEVEL> :: line 147"

This was working before an SSL certificate was added to the site.

Using Coldfusion 8: cfajaxproxy:

<<file.cfm>>

<cfajaximport/>
<cfajaxproxy cfc="folder.customServices.services" jsclassname="jsobj" >

<<file.js>>

var cfcAsAjax = new jsobj();
aProcessMembershipReturn = cfcAsAjax.processMembership(arguments);

Is there something special that has to be done to make this work with https?

1.1K
Translate
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

Advocate , Jul 18, 2011 Jul 18, 2011

If the URL changed to http:// then there is some sort of redirect happening and the call failed. I would guess something is configured wrong with your webserver.  The SSL call should behave no differently and when you call it from the browser you should see the data you are expecting to receive back.

You said the non-SSL version still works, right?  What happens when you call that from the browser?

Translate
Advocate ,
Jul 18, 2011 Jul 18, 2011

Is the page you are calling from also using SSL?  From the same domain?

Translate
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
Guest
Jul 18, 2011 Jul 18, 2011

Hi 12Robots,

Yes, the cfm page I'm calling from is also using SSL and Yes, from the same domain.

Additional information:

So far it looks like the ajax call is working. What I mean by this is, the component(cfc) function call is completeing (doing what it is suppose to do).

It would seem it's the coldfusion return that the javascript is complaining about.

In one instance I have coldfusion returning a boolean, and in an other instance an array. (both cause similar error messages)

I'm continuing to investigate this.

Any ideas?

Translate
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
Guest
Jul 18, 2011 Jul 18, 2011

More info,

Disregard the previous 'Additional information'.

The component function is not processing. I ran additional tests and this is not the case.

I did however add the following code without any change.

cfcAsAjax.setHTTPMethod("POST");

Translate
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
Advocate ,
Jul 18, 2011 Jul 18, 2011

Can you call the remote funciton via the browser?

Translate
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
Guest
Jul 18, 2011 Jul 18, 2011

I had never attempted to try this before... I hope I got it right.

I tried the following:

https://www.xxxx.com/Ep/customServices/services.cfc?method=isValidTempcard&tempCardNumber=100008

Result:

-Nothing is displayed on the page (Is this the correct reponse?)

-the url changed to http

Again this is not something I have tried before so I'm unsure as to what I should be expecting.

Translate
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
Advocate ,
Jul 18, 2011 Jul 18, 2011

If the URL changed to http:// then there is some sort of redirect happening and the call failed. I would guess something is configured wrong with your webserver.  The SSL call should behave no differently and when you call it from the browser you should see the data you are expecting to receive back.

You said the non-SSL version still works, right?  What happens when you call that from the browser?

Translate
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
Guest
Jul 18, 2011 Jul 18, 2011

The particular method that I called had a return type of Boolean.

I changed the return type to string and a "1" (or "0") was displayed on screen pending what argument value I passed in.

The url still changes back to http. (Is this correct as a result?)

Translate
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
Guest
Jul 18, 2011 Jul 18, 2011

Indeed there was some redirect going on which I tracked down and made corrections.

Thanks for the trouble shooting tips.

You were of great help.

Thanks very much.

Translate
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
Advocate ,
Jul 18, 2011 Jul 18, 2011
LATEST

So it's working now?

Translate
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