Highlighted
Absent Member.
Absent Member.
613 views

Need help on Web Services (Soap) via Gateway with Username/Password

Jump to solution

All,

 

I have a scenario that I need to test a web service that's provided through a gateway. When web services request is posted to the URL, it first reaches the gateway server which reads the username/password information inside the Soap Envelope (* the gateway itself doesn't have any authentication but it checks if soap header contains correct username/password). If the username/password is correct then passon the web services request to the servers behind the gate.

 

OK, so I am having a trouble building the script. Does anyone have the same issues? Using Web Service Protocol's Vugen features? Using WEB_CUSTOM_REQUEST? What would the syntax be?

 

I know I embed <soap header> inside the WEB_CUSTOM_REQUEST() method but it's not working either...

 

Thanks in advance.

 

 

********** Below is my code **********

 

Replay log says: (I masked the real URL for security reason)

 

Action.c(5): web_add_header("SOAPAction") was successful   [MsgId: MMSG-26392]
Action.c(7): Registering web_reg_save_param was successful   [MsgId: MMSG-26390]
Action.c(15): Error -26612: HTTP Status-Code=500 (Internal Server Error) for "https://api.qa.abc.com/abc/abcCloud/1/abc/abc.asmx"   [MsgId: MERR-26612]
Action.c(15): web_custom_request("abcList") highest severity level was "ERROR", 68 body bytes, 181 header bytes   [MsgId: MMSG-26388]
Ending action Action.

 

As I mentioned, the web services is behind a gateway (like a proxy but actually only does validation on username/password in SoapHeader). The gateway rejects the all request if it doesn't find the username/password in SoapHeader.

 

** My Web_Custom_Request() looks like this (* masked*)

 web_custom_request("GetabcList",   
  "URL=https://api.qa.abc.com/custom/abccloud/1/abc/abc.a​smx",
  "Method=POST",
  "Resource=0",
  "Referer=",
  "Mode=URL",
  "Body=<?xml version=\"1.0\" encoding=\"UTF-8\"?><<soap:Envelope xmlns:soap=\"http://www.w3.org/2003/05/soap-envelope"      
  "xmlns:ser=\"http://www.abc.com/abc/web/services/"       
  "xmlns:wsse=\"http://schemas.xmlsoap.org/ws/2002/07/secext\">"
  "<soap:Header>"
   "<wsse:Security>"
    "<wsse:UsernameToken>"
     "<wsse:Username>{Username}</wsse:Username>"
     "<wsse:Password Type=\"PasswordText\">{Password}</wsse:Password>"
    "</wsse:UsernameToken>"
   "</wsse:Security>"
     "</soap:Header>"
     "<soap:Body>"
    "<ser:GetabcList>"
    "<!--Optional:-->"
    "<ser:request ListType=\"{abc}\" />"
    "</ser:GetabcList>"
     "</soap:Body>"
    "</soap:Envelope>",
 LAST);

------------------------------------------------------
QTP vs Robot vs Silk vs Selenium vs ...
Guess who won
0 Likes
1 Solution

Accepted Solutions
Highlighted
Absent Member.
Absent Member.

Re: Need help on Web Services (Soap) via Gateway with Username/Password

Jump to solution

Resolved.

------------------------------------------------------
QTP vs Robot vs Silk vs Selenium vs ...
Guess who won

View solution in original post

0 Likes
3 Replies
Highlighted
Absent Member.
Absent Member.

Re: Need help on Web Services (Soap) via Gateway with Username/Password

Jump to solution

Resolved.

------------------------------------------------------
QTP vs Robot vs Silk vs Selenium vs ...
Guess who won

View solution in original post

0 Likes
Highlighted
Regular Contributor.
Regular Contributor.

Re: Need help on Web Services (Soap) via Gateway with Username/Password

Jump to solution

Tank,

Can you help out with some clues as to what you did?  Or email me

jdufresne AT olenick dot com

Thanks,

Jim

0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Need help on Web Services (Soap) via Gateway with Username/Password

Jump to solution

what problems are you facing, exactly?

------------------------------------------------------
QTP vs Robot vs Silk vs Selenium vs ...
Guess who won
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.