function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Chris_LearningChris_Learning 

Call External Web Service (without WSDL) from SalesForce.com

Hello,
 
I'd like to accomplish similar to this demo:  http://adnsandbox.com/media/soasoa/
 
However, I don't have WSDL in my external web service.
 
Can you please give me sample code to call HTTP POST/GET to external web service from SalesForce.com?
 
Thanks,
 
Chris
micwamicwa
Summer 08 Release:

http://www.salesforce.com/us/developer/docs/apexcode/salesforce_apex_language_reference.pdf
(p.248)
Chris_LearningChris_Learning
It's seem like you are giving me what I am looking for.  I will try it out and update the result.
 
Thanks a lot,
 
Chris
sfdcfoxsfdcfox
Specifically, take a look at Http, HttpRequest, and HttpResponse. And if you use XML, XmlStreamReader and XmlStreamWriter. You'll need to know the protocol semantics, which is the point of a WSDL, but if you know what it expects, these classes will get you where you intend to go. That's all in the link (above).
Chris_LearningChris_Learning
I got the below error:
 
System.CalloutException: Callout from triggers are currently not supported.:
 
Can you please show me the alternative?