You need to sign in to do that
Don't have an account?

web services in apex
Hi, All
*what are all the Procedure to implement the integration using web services URL?
*How to consume the web services in apex class Or call the web services in apex class?
Advance Thanks To all
*what are all the Procedure to implement the integration using web services URL?
*How to consume the web services in apex class Or call the web services in apex class?
Advance Thanks To all
https://developer.salesforce.com/page/Apex_Web_Services_and_Callouts
All Answers
https://developer.salesforce.com/page/Apex_Web_Services_and_Callouts
Thank you for Replying
I got the idea and answer.
Regarding :"In this forums, No one is Reply". Is there any alternate forum or any specific reason?
Visual force page
<apex:page controller="integrationcontroller" sidebar="false" showHeader="false" docType="html-5.0">
<apex:form >
<apex:commandButton value="Click To Get" action="{!getresult}"/>
Output:<b></b>
<apex:outputLabel value="{!myresponse}"/>
</apex:form>
</apex:page>
Webservices
@HttpGet
global static List<Login__c> doGet()
{
List<Login__c> Lg=new List<Login__c>();
Lg=[select Name from Login__c];
return Lg;
}
Controller
public PageReference getresult()
{
Http http = new Http();
HttpRequest request = new HttpRequest();
request.setEndpoint('https://mas-jeevantechnologies-developer-edition.ap5.force.com/services/apexrest/myservice');
request.setMethod('GET');
HttpResponse response = http.send(request);
myresponse=response.getBody();
}
partial output
Thanks in Advance.