Link to home
Start Free TrialLog in
Avatar of LeadCo
LeadCo

asked on

How do you Auto submit a form as ajob on a server?

Ok this is tough!

I have a client that I need to post data to via http post:
All i can get is connection failures because of the https and I have exhausted the work arounds on that.
So I made the code a form with auto submit but can't get the form to fire as a server job in cfadmin jobs.

Any ideas???

See code below:
Original code: 
Connection failure Every time: 
cfhttp url="https://URL.aspx" method="post"> 
<cfhttpparam type="FORMFIELD" name="Name" value="Stephanie  Slimfield">
<cfhttpparam type="FORMFIELD" name="Address" value="101 Main st">
<cfhttpparam type="FORMFIELD" name="City" value="Florence">
<cfhttpparam type="FORMFIELD" name="State" value="AL">
<cfhttpparam type="FORMFIELD" name="Zip" value="35641">
<cfhttpparam type="FORMFIELD" name="OfficePhone" value="2561258589">
<cfhttpparam type="FORMFIELD" name="Email" value="walk@email.biz">
<cfhttpparam type="FORMFIELD" name="Company" value="compname">
</cfhttp>
<br />
 
<cfoutput>#cfhttp.FileContent#</cfoutput>
 
 
-----------------------------------------------------------
 
New Code with auto submit  (Works great when I open in my browser won't work as a scheduled job)
 
<cfform action="https://URL.aspx" method="post" name="form1" target="_self">
<input name="Name" type="hidden" value="Stephanie Slimfield" />
<input name="Address" type="hidden" value="115 sMain st" />
<input name="City" type="hidden" value="Killen" />
<input name="State" type="hidden" value="AL" />
<input name="Zip" type="hidden" value="35412" />
<input name="OfficePhone" type="hidden" value="2568568547" />
<input name="Email" type="hidden" value="1@asdfssk.com" />
 
<input name="Company" type="hidden" value="A to Z Insurance" />
<script>
document.form1.submit();
</script>
</cfform>

Open in new window

SOLUTION
Avatar of erikTsomik
erikTsomik
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of LeadCo
LeadCo

ASKER

Yes it is scheduled.
SOLUTION
Avatar of SRIKANTH MADISHETTI
SRIKANTH MADISHETTI
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of LeadCo

ASKER

In cfadmin I can click a check box Publish Save output to file on a scheduled job, is that what you mean?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of LeadCo

ASKER

I am submiting to an external URL, thats cross domain isn't it?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
@Azaadi,
redirect="yes" and resolveurl="yes" ,  those two will not solve the issue  , these two come in to act after the intial handshake is done ,I am very sure the problem is LeadCo is calling https://  from cfhhtp  because he is getting connection failure error.
So the steps i gave may help in that .
Avatar of LeadCo

ASKER

Can't seem to get a different result even with redirect and reolveURL.

Still Get Connection Failure even after importing there cert in my kestore.

Avatar of LeadCo

ASKER

They are puzzled others are posting fine.
They don't even show me hitting the page from my IP.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of LeadCo

ASKER

Ok we did the Dump and found that when the SSL is checked my connection drops it, my server admin can't figure why. Any Suggestions???

        Issuer
          C=US
          O=VeriSign, Inc.
          OU=VeriSign Trust Network
          OU=Terms of use at https:
         
          www.verisign.com
          rpa (c)05
          CN=VeriSign Class 3 Secure Server CA
        Serial         xxxxxxxxxxxxxx
        Extensions
          Extension: X509v3 Basic Constraints
          Extension: X509v3 Key Usage
          Extension: X509v3 CRL Distribution Points
          Extension: X509v3 Certificate Policies
          Extension: X509v3 Extended Key Usage
          Extension: X509v3 Authority Key Identifier
          Extension: Authority Information Access
          Extension: 1.3.6.1.5.5.7.1.12
2 4  0.0491 (0.0000)  S>CV3.1(4)  Handshake
      ServerHelloDone
2 5  0.0991 (0.0500)  C>SV3.1(2)  Alert
    level           fatal
    value           certificate_unknown
Avatar of LeadCo

ASKER

Ok for future reference do all above then restart ColdFusion......  I think importing the cert and restarting coldfusion was the ticket..  Thanks for all who contributed. Points for all.
Avatar of LeadCo

ASKER

Thanks!