+ Start a Discussion
Code+1Code+1 

Webservice request and response

Hi All,
 Please let me know the steps what should be done for the below :
1) To send a Webservice Outbound call to another system.
2) Receive the response in XML Format
3) Parse the XML Response
4) Store the values in the system.
Amit Chaudhary 8Amit Chaudhary 8
I will recomment you to check trailhead to learn web service
1) https://developer.salesforce.com/trailhead/module/apex_integration_services?utm_campaign=trailhead&utm_source=sfdc&utm_medium=chatter-success

Apex Integration Overview
https://developer.salesforce.com/trailhead/apex_integration_services/apex_integration_callouts
This module will Describe the differences between web service and HTTP callouts and Authorize an external site with remote site settings


Apex REST Callouts
https://developer.salesforce.com/trailhead/apex_integration_services/apex_integration_rest_callouts
This module will  describe about Perform a callout to receive data from an external service and Test callouts by using mock callouts 

Apex SOAP Callouts
https://developer.salesforce.com/trailhead/apex_integration_services/apex_integration_soap_callouts
This module will describe you about Generate Apex classes using WSDL2Apex and  Perform a callout to send data to an external service using SOAP with Test callouts by using mock callouts


Apex Web Services
https://developer.salesforce.com/trailhead/apex_integration_services/apex_integration_webservices
This module will Describe the two types of Apex web services and provide a high-level overview of these services. Create an Apex REST class that contains methods for each HTTP method and Invoke a custom Apex REST method with an endpoint

 
almas mahfooz 3almas mahfooz 3
@Amit Chaudhary 8,
I have one webservice having method something like below
updateStatus(data AS WEObject) AS WSResponse

After importing wsdl.
when going through the code I found these two classes WSObject and WSResponse. Now I have to call the method updateStatus and need to pass the values to statusField and strIdField, how can I do this in C#?
Please share any code snippet.

 
public partial class WSObject {
        
        private string statusField;
        private string strIdField;
        
        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)]
        public string status {
            get {
                return this.statusField;
            }
            set {
                this.statusField = value;
            }
        }
        
        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)]
        public string strId {
            get {
                return this.strIdField;
            }
            set {
                this.strIdField = value;
            }
        }
    }