Highlighted
Absent Member.. Absent Member..
Absent Member..
1458 views

UFT API Test: Sign SOAP request and Security configuration failure

hi gurus,

 

I've struggled for this 2 weeks. Any one have any idea on it?

[Scenario]

-The web service wsdl is ready and test cases can be executed successfully in SoapUI pro.

-For security certificate, in SoapUI, it supports .jks file.

-The goal is to convert the test from SoapUI to HP UFT API Test

[Environment]

Windows 8.1 Enterprise

SoapUI Pro 5.1.2 and NG 1.4.1

UFT 12.02

 

[Steps to reproduce]

Same wsdl and test want to convert to HP UFT API Testing.

  • I use “SoapUI to API test converter” from UFT 12.02 to generate test cases to UFT version. Open one test case, which only contains one request.
  • I have the .p12 file (Converted from .jks) and also is applied to my windows 8 workstation as windows store.
  • After conversion, only “serviceContext” and “Action” properties are converted.
  • I created one “MessageID” property and using beforeExecuteStepEvent to generate uuid

public void StServiceCallActivity4_OnBeforeExecuteStepEvent(object sender, STActivityBaseEventArgs args)
        {
            Guid uuid = Guid.NewGuid();
            this.StServiceCallActivity4.InputEnvelope.SelectSingleNode("//*[local-name(.)='MessageID']").InnerText = "uuid:"+uuid;

        }

 

  • Set the “Security setting”
  • In “WS Addressing” section, there is no 200508 version supported as we required. Here I have tried both “None” and “WSA 04/08”.
  • In WS-Security tab, create “UserName Token”, there is no “PasswordDigest” password type as our request. I have tried both “Text” and “Hash”.
  • Create the “X509 certificate Token” and invoke the .p12 file. The reference type is: “BinarySecurityToken”

Create and sign the 6 WSS entries (same as ‘parts’ in SoapUI) with MessageSignature. I tried multiple ways.

  1. Choose all Predefined parts and leave xPath empty
  2. Change another algorithm
  3. Appling wsa and xpath for ‘serviceContext” which is not predefined parts
  4. Using xpath matching the body with special namespace

 

[Problem]

Execute the test. It failed to sign (encrypted) the Soap request data with error.

I'd like to send more detail if someone need.

 

grt thanks,

 

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.