WCF WebService with UserName Authentication test on SoapUi

I have WCF WebService with UserName Authentication and not able to test it with Soapui.

Here you have web.config:

<behaviors>
      <serviceBehaviors>
        <behavior name="FHPBusinessLogicService.ServiceBehavior">
          <serviceCredentials type="FHPBusinessLogicService.Security.PasswordServiceCredentials, FHPBusinessLogicService">
            <userNameAuthentication userNamePasswordValidationMode="Custom" />
          </serviceCredentials>
          <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/>
          <serviceDebug includeExceptionDetailInFaults="true"/>
          <serviceAuthorization principalPermissionMode="Custom" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <bindings>
      <basicHttpBinding>
        <binding name="ServiceConf" maxReceivedMessageSize="65536" >
          <readerQuotas maxStringContentLength="65536" maxArrayLength="65536" maxBytesPerRead="65536" />
          <security mode="TransportWithMessageCredential"  >
            <message clientCredentialType="UserName"  />

          </security>

        </binding>
      </basicHttpBinding>
    </bindings>

On Soapui i'm receiving: An error occurred when verifying security for the message

I'm testing it on my local machine, local iis 7 server.

Any suggestions?

Answers


In the 'Request Properties' in SoapUI in section 'Wss-Password Type' just select option 'PasswordText'. That will do the thing


I think you need to add WS-Security Configuration to your request. Read this http://www.soapui.org/SOAP-and-WSDL/applying-ws-security.html

And see the section under "Username". And then in your testsuite in soapUI, be sure to add the ws-security conf you just created. That worked for me.


Need Your Help

Error: npm is known not to run on Node.js V4.2.6

node.js npm

how can I solve the following error? I use Ubuntu 16.

Order of execution of tests in TestNG

testing testng order-of-execution

How to customize the order of execution of tests in TestNG?