WebService(SOAP) Request (Beta Code)

This sampler has been tested with IIS Webservice running .NET 1.0. It hasn't been tested with SUN or IBM webservices providers, but it should work. The sampler uses Apache SOAP driver to serialize the message and set the header with the correct SOAPAction. Right now the sampler doesn't support automatic WSDL handling, since Apache SOAP currently does not provide support for it. Both IBM and SUN provide WSDL drivers. There are 3 options for the post data: text area, external file, or directory. If you want the sampler to randomly select a message, use the directory. Otherwise, use the text area or a file. The if either the file or path are set, it will not use the message in the text area. If you need to test a soap service that uses different encoding, use the file or path. If you paste the message in to text area, it will not retain the encoding and will result in errors. Save your message to a file with the proper encoding, and the sampler will read it as java.io.FileInputStream.

The sampler requires mail.jar and activation.jar. This is because Apache SOAP requires the libs. Because mail.jar and activation.jar are distributed by Sun, you have to download it separately.

An important note on the sampler is it will automatically use the proxy host and port passed to JMeter from command line, if thoe fields in the sampler are left blank. If a sampler has values in the proxy host and port text field, it will use the ones provided by the user. This behavior may not be what users expect.

By default, the webservice sampler set SOAPHTTPConnection.setMaintainSession (true). If you need to maintain the session, add a blank Header Manager. The sampler uses the Header Manager to store the SOAPHTTPConnection object, since there apache soap does provide a easy way to get and set the cookies.

Control Panel
http://jakarta.apache.org/jmeter/images/screenshots/webservice_sampler.png

Parameters

Attribute

Description

Required

Name

Descriptive name for this sampler that is shown in the tree.

No

WSDL URL

The WSDL URL with the service description.

No

Webmethods

The WSDL URL with the service description.

No

URL

The URL to direct the SOAP request to.

Yes

SOAPAction

The SOAPAction defined in the webservice description or WSDL.

Yes

Soap/XML-RPC Data

The Soap XML message

Yes

Soap file

File containing soap message

No

Message Folder

Folder containing soap files

No

Memory cache

Caches the request data

Yes

Use HTTP Proxy

Check box if http proxy should be used

No

Proxy Host

Proxy hostname

No

Proxy Port

Proxy host port

No

  • No labels