Web services 在SOAP UI mockService中启用WS-Security身份验证

Web services 在SOAP UI mockService中启用WS-Security身份验证,web-services,authentication,soapui,ws-security,Web Services,Authentication,Soapui,Ws Security,我正在尝试创建一个mockWebservice,它应该验证SOAP请求xml头中发送的用户名和密码 我的请求xml如下所示 <s11:Envelope xmlns:s11="http://schemas.xmlsoap.org/soap/envelope/"> <s11:Header> <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss

我正在尝试创建一个mockWebservice,它应该验证SOAP请求xml头中发送的用户名和密码

我的请求xml如下所示

<s11:Envelope xmlns:s11="http://schemas.xmlsoap.org/soap/envelope/">
   <s11:Header>
      <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
         <wsse:UsernameToken>
            <wsse:Username>User_Name</wsse:Username>
            <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">PASSWORD</wsse:Password>
         </wsse:UsernameToken>
      </wsse:Security>
      <wsa:Action xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">DeliverAccountInvestigationCaseStatus</wsa:Action>
      <wsa:To xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://rp.baml.com</wsa:To>
      <wsa:MessageID xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">Test from APP_NAME</wsa:MessageID>
   </s11:Header>
   <s11:Body>
      <tns:DeliverAccountInvestigationCaseStatusRequest xsi:schemaLocation="http://rp.baml.com/data/DeliverAccountInvestigationCaseStatusV001 DeliverAccountInvestigationCaseStatusV001.xsd" xmlns:tns="http://rp.baml.com/data/DeliverAccountInvestigationCaseStatusV001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
         <tns:ReferenceNumber type="GSS">1-</tns:ReferenceNumber>
         <tns:TimeStamp>2014-01-31</tns:TimeStamp>
         <tns:Status></tns:Status>
         <tns:Resolution></tns:Resolution>
         <tns:Comment>Test</tns:Comment>
      </tns:DeliverAccountInvestigationCaseStatusRequest>
   </s11:Body>
</s11:Envelope>

用户名
密码
DeliverAccountInvestigationCaseStatus
http://rp.baml.com
从应用程序名称进行测试
1-
2014-01-31
试验

如果标题中的用户名或密码不正确,我的Web服务将抛出错误。

模拟响应时,您是在模拟对服务请求的响应。当您无法访问某个支持的web服务或该服务尚未构建时,通常会进行模拟

这意味着你可以模仿任何反应。如果需要验证用户名和密码,则必须自己编写验证代码


查看soapUI.org了解一些关于模仿的背景知识。

你的问题是什么?为了达到要求,你做了什么?