Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE
Highlighted
ClaireMcG Super Contributor.
Super Contributor.
120 views

wsse security Java Vuser script

Hi Everyone

Recently I had another topic open on wsse security using a standard Web Service protocol script in vugen, which i got resolved moving to 12.60.

I have another issue no.  We have also implemented an MQ interface.  So instead of hitting a https interface we put the message on a queue.  The trouble is, I have had to move away from the Web Service protocol, to a java vuser protocol, to allow me to interact with IBM MQ.

I should be putting the same XML message on the queue, as I once submitted through https.  However, I cannot simply use the 'web_service_set_security directive, which applied the security directly into the soap envelope.

 

Has anyone implemented this in Java?  The snippets below are what I would have in the Web Services protocol script. 

 

Many Thanks

Claire

 

    web_service_set_security(
        SECURITY_TOKEN, "Type=USERNAME","LogicalName=UsernameToken-E8423495A4E251F8EA154462401631613", lr_eval_string("{usernameIdentificationTokenString}"), "Password=S1ta@123", "IsNonceIncluded=True", "TimestampFormat=Created", "Add=True",
        WS_ADDRESSING, "Version=None",
        TIME_STAMP, "Exclude=True",
        LAST);
    

    web_service_call( "StepName=CheckInTraveller_101",
        "SOAPMethod=APPService|APPServicePort|CheckInTraveller",
        "ResponseParam=CheckInResponse",
        "Service=APPService1",
        "ExpectedResponse=SoapResult",
        "UserHandlerFunction=MyScriptFunction",
        "Snapshot=t1546960385.inf",
        BEGIN_ARGUMENTS,
        "xml:CheckInTravellerRequest="
            "<CheckInTravellerRequest>"
                "<Header>"
                    "<DateTime>2018-12-29T02:00:00Z</DateTime>"
                    "<UserId>ABC123</UserId>"
                    "........................etc..................."
            "</CheckInTravellerRequest>",
        END_ARGUMENTS,
        BEGIN_RESULT,
        END_RESULT,
        LAST);

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.