You need to sign in to do that
Don't have an account?
Praveen K 84
How to provide Mock Response for Integration classes
Hi all,
I have class generated from WSDL file from SAP and when i am testing the generated class, I need to provide a fake response as Input.
can any one of u tell me how to provide input for a data type of "sapComDocumentSapSoapFunctionsMcSV.TableOfZcqppmscore".
I Mean exactly for kind of data can we give it as I/P.
for ex: string = 'this is string';
integer = 20;
I have class generated from WSDL file from SAP and when i am testing the generated class, I need to provide a fake response as Input.
can any one of u tell me how to provide input for a data type of "sapComDocumentSapSoapFunctionsMcSV.TableOfZcqppmscore".
I Mean exactly for kind of data can we give it as I/P.
for ex: string = 'this is string';
integer = 20;
Whenever we import a WSDL file into Salesforce and generate Apex classes out of it, methods to send callout and receive response along with custom Apex Classes ( Wrappers basically to hold the data to be sent / received ) get created. In the scenario you described, the data type - 'sapComDocumentSapSoapFunctionsMcSV.TableOfZcqppmscore' can be found in one of the classes generated out of the import process. I can not give you the exact answer to your question as I havent worked on the specific task that you are describing here.
For more details you can go through this - Trailhead Module (https://trailhead.salesforce.com/en/content/learn/modules/apex_integration_services/apex_integration_soap_callouts) which will give a really nice walk-through for understanding SOAP Web Service callouts and it's unit testing.
Hope this helps!
Thanks,
Pranav Sanvatsarkar