WebServiceMock Interface
Namespace
Usage
For an implementation example, see Test Web Service Callouts.
WebServiceMock Methods
The following are methods for WebServiceMock.
doInvoke(stub, soapRequest, responseMap, endpoint, soapAction, requestName, responseNamespace, responseName, responseType)
Signature
public Void doInvoke(Object stub, Object soapRequest, Map<String,Object> responseMap, String endpoint, String soapAction, String requestName, String responseNamespace, String responseName, String responseType)
Parameters
-
stub:
Type:
Object An instance of the auto-generated class.
-
soapRequest:
Type:
Object The SOAP Web service request being invoked.
-
responseMap:
A collection of key/value pairs representing the response to send for the request. When implementing this interface, set the responseMap argument to a key/value pair representing the response desired.
-
endpoint:
Type: String
The endpoint URL for the request.
-
soapAction:
Type: String
The requested SOAP operation.
-
requestName:
Type: String
The requested SOAP operation name.
-
responseNamespace:
Type: String
The response namespace.
-
responseName:
Type: String
The name of the response element as defined in the WSDL.
-
responseType:
Type: String
The class for the response as defined in the auto-generated class.
Return Value
Type: Void