Share this page

# silverlight_soap_request

Example: silverlight_soap_request | Web Services Functions (SOAP, WEB_SERVICE, Silverlight)

Performs a SOAP request in a Silverlight environment.

    int silverlight_soap_request( const char *StepName,ExpectedResponse, URL, <XMLEnvelope>, [Attachments,] [const char *UserHandlerName], LAST );

StepName | The name of the step, as it appears in the test tree. Any text can be used.
ExpectedResponse | The type of response to accept. See details below.
URL | The URL (Uniform Resource Locator) of the web service to load.
XMLEnvelope | For the following list of required elements, use the following string format: "Element=value"SOAPEnvelope: the XML packet sent to the server.Snapshot: the name of the .inf file containing a snapshot of the step.ResponseParam: the name of the output parameter in which to store the server response.
Attachments | For details, see Attachment Specifications.
UserHandlerName | If the request contains binary data, the call includes: `"UserHandlerName=LrBinaryEncodingHandler"`
LAST | A marker which indicates the end of the List of specifications

The silverlight_soap_request function performs a SOAP request in a Silverlight environment. It sends a SOAP packet to the specified URL and receives the server response.

The expected response is one of the following:

Value | Effect
--- | ---
"ExpectedResponse=SoapResult" | Accept SOAP output responses and fail on SOAP faults.
"ExpectedResponse= SoapFault" | Accept SOAP faults and fail on SOAP output responses.
"ExpectedResponse= AnySoap" | Accept both SOAP output and SOAP fault responses.

This function is generated when you record a SOAP session over HTTP in a Silverlight environment without providing the WSDL file of the corresponding web service.

## Return Values

This function returns LR_PASS (0) on success, and LR_FAIL (1) on failure. Note that in many cases, this return value indicates the technical success of the function, and not the result. For example, a function that registers a string to be found in a subsequent step returns LR_PASS to indicate that the registration was successful. This does not indicate that the string was found in the server response.

## Parameterization

The following arguments may be parameterized: URL, XMLEnvelope, value (of elements).

Tips to improve your search results... VuGen Function Reference Version 25.1-25.3 Function Reference 25.1-25.3 All View Local Help Center View Online Help Center Version: