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?
Open soapUI and set the following settings. Make sure the service's wsdl path is correct. Double click on Request # node and navigate to the request window on the right. Fill the method parameters denoted by “?”.
ClientCridentials. UserName. Password = "testPass"; In this way you can pass username, password in the header to a SOAP WCF Service.
Go to File > Preferences. Switch to the HTTP Settings tab. To enable preemptive authentication, select the Authenticate preemptively check box.
In the 'Request Properties' in SoapUI in section 'Wss-Password Type' just select option 'PasswordText'. That will do the thing
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With