You need to sign in to do that
Don't have an account?
thienthang
Apex SOAP Callouts - Web service callout failed
Could you guys tell me how to fix this issue? I appreciate any tip in advanced, thank you very much. I would like to describe the issue as below
I have tried the example in Trailhead for Apex SOAP Callouts.
Downloaded this xml file: https://th-apex-soap-service.herokuapp.com/assets/calculator.xml
Added this end point to remote site too: https://simple-salesforce-soap-server.herokuapp.com
But unfortuanlly, when I ran the sample code, I got this error:
Follow the error log, I got this explaination:
I have tried the example in Trailhead for Apex SOAP Callouts.
Downloaded this xml file: https://th-apex-soap-service.herokuapp.com/assets/calculator.xml
Added this end point to remote site too: https://simple-salesforce-soap-server.herokuapp.com
But unfortuanlly, when I ran the sample code, I got this error:
Line: 142, Column: 1 System.CalloutException: Web service callout failed: Unexpected element. Parser was expecting element 'http://schemas.xmlsoap.org/soap/envelope/:Envelope' but found ':html'
Follow the error log, I got this explaination:
20:59:09:000 CALLOUT_RESPONSE <p>There is no app configured at that hostname.<br/>Perhaps the app owner has renamed it, or you mistyped the URL.</p>
You say that you are trying Apex SOAP call outs, but Animalscallout class is in REST call out example.And you are getting an error for Animalscallout class.
Please check if you have done Authorize Endpoint Addresses step.
https://trailhead.salesforce.com/apex_integration_services/apex_integration_callouts.htm#apex_integration_callouts_authorizing
Hope this helps you!
Please mark it as solved if this helps you so that it will make available for others as a proper solution.
Thanks and Regards
Sandhya
I am really sorry for the misunderstand image.
change: https://simple-salesforce-soap-server.herokuapp.com/service/calculator
to: https://th-apex-soap-service.herokuapp.com/service/calculator
(the same for trail head challenge in case anyone meet the same issue like me)
change: https://simple-salesforce-soap-server.herokuapp.com/service/parks
to: https://th-apex-soap-service.herokuapp.com/service/parks