Kamil Będkowski
Kamil Będkowski

Reputation: 1092

WCF endpoint is not being reached using jMeter 3.3

i'm using jMeter 3.3 and trying to ping my wcfservice.

Address: http://localhost:88/MyService.svc Endpoint: MyEndpoint

I have created Jmeter http request

enter image description here

Server name:localhost Port: 88 Method: Post Path : /MyService.svc

and filled in http header according to tutorials: enter image description here

Content-Type: text/xml SOAPAction: http://localhost:88/MyService/MyEndpoint

Problem is that my ednpoint is not being reached. The same data in soapUi or WcfTestClient works well. Did i miss something in JMeter configuration?

Thanks in advance.

Upvotes: 2

Views: 458

Answers (2)

Dmitri T
Dmitri T

Reputation: 168122

Given you are able to run the request via SoapUI you should be able to capture it using JMeter's HTTP(S) Test Script Recorder

  1. Configure JMeter for recording.

    • From JMeter main menu select File -> Templates -> Recording and click "Create" JMeter Recording Template
    • Open Workbench -> HTTP(S) Test Script Recorder then click "Start"
  2. Configure SoapUI for recording

    • From SoapUI Main Menu select File -> Preferences -> Proxy Settings and click "Manual"
    • Use localhost as "Host" and 8888 as Port

      SoapUI recording

  3. Run your request in SoapUI
  4. JMeter will intercept the request and store it in form of HTTP Request sampler under Test Plan -> Thread Group -> Recording Controller. You should be able to successfully replay the request in JMeter.

Another option is converting SoapUI XML to JMeter jmx using Taurus tool

Upvotes: 1

Midi
Midi

Reputation: 479

I think you are missing couple of things

  1. Your content type should specify charset so proper value is: text/xml; charset=utf-8
  2. There is no body on your screenshot, so I'm not sure if it is filled. It it is not filled, you should take request body from WCF Test Client, extract body part and put it into Body Data tab.

For example, original envelope from WCF Test Client is like this:

    <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
      <s:Header>
         <Action s:mustUnderstand="1" xmlns="http://schemas.microsoft.com/ws/2005/05/addressing/none">http://tempuri.org/IService1/DoWork</Action>
      </s:Header>
      <s:Body>
        <DoWork xmlns="http://tempuri.org/" />
      </s:Body>
    </s:Envelope>

Body for JMeter should not have Header part:

    <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
      <s:Body>
        <DoWork xmlns="http://tempuri.org/" />
      </s:Body>
    </s:Envelope>

In general Jmeter configuration should be as follows:

enter image description here enter image description here

That should fix the problem.

P.S. View Results Tree is great for debugging

Upvotes: 2

Related Questions