Sample respone receiving from external system to Test :
http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<UpdateCustomerHeaderInfoResponse xmlns="http://tempuri.org/xyz.customerdetails">
<UpdateCustomerHeaderInfoResult>
<InsertResult>False</InsertResult>
<CustomerNumber>123456789</CustomerNumber>
</UpdateCustomerHeaderInfoResult>
</UpdateCustomerHeaderInfoResponse>
</soap:Body>
</soap:Envelope>
First we need to save above response in static resources and then we need call in test class.
More Info : check below URL to test above response.
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_restful_http_testing_static.htm
No comments:
Post a Comment