2

I'm using Apache JMeter 2.11 to test a web service with authentication. For the sample request I'm using View Results Tree as a listener and a SOAP/XML-RPC Request with the following syntax to my parameters:

What I have tried

1) Adding an HTTP Header Manager using

  • Name: Authorization:
  • Value: Basic [Base64 code encoded in ASCII, UTF-8, with or without domain in the user name] as explained here

With result: Response headers: HTTP/1.1 401 Unauthorized

2) Adding an HTTP Authorization Manager using

  • Base URL: http://www.domain.com:####
  • Username: [USERNAME]
  • Password: [PASSWORD]
  • Domain: [DOMAIN]
  • Realm: [NULL]
  • Mechanism: [BASIC_DIGEST/KERBEROS] as explained here

With result: Response headers: HTTP/1.1 401 Unauthorized

I also tried enabling Keep Alive in the request as suggested here

What am I doing wrong?

Community
  • 1
  • 1
Atanas Mendes
  • 75
  • 1
  • 3
  • 13

1 Answers1

2

First you need to know the auth type, is it basic ? Digest ? Kerberos or other ?

Second, don't use SOAP/XML-RPC Request, use Http Request,

See Templates > Webservice in jmeter menu, it creates a sample test plan for Soap testing.

Add then your authentication with the correct Auth Manager using HttpClient 4 as sampler implementation and check.

UBIK LOAD PACK
  • 33,980
  • 5
  • 71
  • 116
  • The authentication type is Kerberos. I accesed the SOAP WebService Test Plan via File > Templates... but all documentation seems to work with an older version of Jmeter; for example, I could not find a method parameter in the "Http Request Defaults" screen, or a way to post a SOAP body – Atanas Mendes Aug 15 '14 at 21:11
  • This template shows you hiw to configure the plan, you paste the xml (soap format ) in the raw poSt body of http sampler, any http header goes in Header Manager , same for optional Soap Action. Show your config with xml rpc , i will give you the config with http sampler. – UBIK LOAD PACK Aug 16 '14 at 00:26
  • See this for an example http://blazemeter.com/blog/testing-soaprest-web-services-using-jmeter, read after Let's try Post – UBIK LOAD PACK Aug 16 '14 at 00:28
  • In the end it was me confusing "Samplers > HTTP Request" with "Configuration Elements > HTTP Request Defaults" but to avoid authentication at all, I managed to get another version of the web service without authentication. Thanks for all your feedback. – Atanas Mendes Aug 19 '14 at 21:13