How can I post the data from Jotform to some url through WCF service?

  • Profile Image
    Sunny Raj 
    Asked on April 19, 2016 at 04:09 PM

    Hi,

    I have written a WCF service to post the data from JOT form to URL (https://secure.intelligenceplaza.com/nmhg/default.aspx)

    I have deployed the web service on the web server and got the wcf service URL.

    Then Jot from has successfully consumed that web service.

    Please find the URL of the JOT form as well as wcf service:

    https://form.jotform.com/50993321640150

    http://supplychain.hyster-yale.com:8020/Transfer.svc?wsdl

     

    After that when I submit the Jot form then I am unable to see the data in URL

    i have got the below error as below:

     

    hypertext Transfer protocal.

    HTTP/1.1 415 Cannot process the message because the content type 'application/x-www-form-urlencoded' was not the expected type 'text/xml; charset=utf-8'.\r\n]

     

    I have researched a lot and unable to figure out why this happening. My WCF service works if i send the data not through JOT form rather manually.

     

    Please let me know your views on it.

     

    Thanks,

    Sunny

     

     

     

  • Profile Image
    Ben
    Answered on April 19, 2016 at 05:24 PM

    If I understood the issue correctly Sunny, you are sending the data that should represent the data on your form, to your service and it is working properly, but as soon as the form is submitted and passing data to your service the same is not working?

    Based on the error:

    HTTP/1.1 415 Cannot process the message because the content type 'application/x-www-form-urlencoded' was not the expected type 'text/xml; charset=utf-8'.\r\n]

    It seems that your service is set to accept the 'text/xml; charset=utf-8', while it is not getting the same, so you would either need to remove that check or set it up to accept content type as 'application/x-www-form-urlencoded'.

    I also suggest suggest using webhooks to post the data from your form to your endpoints (your service).

    You can see more about that here: How to Setup Webhook with JotForm

    You can see few of the samples of the same here: Webhook Samples

    Webhooks and the samples above should help you send the data properly to your service, but do let us know if you have any additional questions.