@isTest public class NFMTest_Mock implements WebServiceMock { public void doInvoke( Object stub, Object request, Map response, String endpoint, String soapAction, String requestName, String responseNS, String responseName, String responseType) { System.debug('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'); // Create response element from the autogenerated class. // // Populate response element. // // Add response element to the response parameter, as follows: OlympusCoJpCommonMessage.Response aa = new OlympusCoJpCommonMessage.Response(); aa.LOG = new List(); // System.debug('bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'); // aa.LOG.add(new OlympusCoJpCommonMessage.LOG_element()); // response = new Map(); // response.put('response_x', aa); // System.debug(aa); //apiEchosign.createEmbeddedWidgetResponse_element respElement = new apiEchosign.createEmbeddedWidgetResponse_element(); //add all fields you need in the respElement mock response object (it seem you need to populate the "embeddedWidgetCreationResult" member) response.put('response_x', aa); return; } }