Forum Discussion

CrazyFrog's avatar
CrazyFrog
Contributor
6 years ago

How to add WS-A Headers to teststep from java code

Hello,   In SoapUI you can add WS-A headers by clicking with your right mouse on the request (xml-screen).   How can I do this from Java code?
  • Olga_T's avatar
    6 years ago

    Thanks for creating the topic, CrazyFrog.

     

    Community, can we provide any comments regarding this question?

  • CrazyFrog's avatar
    CrazyFrog
    6 years ago

    Olga_T 

    My questions are probably too difficult for the community. We are in the process of automatically generating all our tests from Java.


    We are confronted with a few technical challenges in which we think we can use support from Smartbear.
    In the past Ole Matzura used to post the technical solutions, is he still working at Smartbear.

    For the question that I asked in this post, I have found the solution by scouring the open source code of SoapUI.

    I use the following code:

     

    WsdlRequest request = ((WsdlTestRequestStep) testStep).getHttpRequest();
    AddWsaHeadersToRequestAction wsaToRequest = new AddWsaHeadersToRequestAction(request);
    wsaToRequest.actionPerformed(null);

     

  • Olga_T's avatar
    Olga_T
    6 years ago

    Hi CrazyFrog,

     

    Ole was a super contributor in our Community indeed. Now, the Community has Community Leaders and Community Heroes who actively help people with their questions. Also, our SmartBear support engineers regularly review questions on the forums and provide technical solutions.

    Contacting the Support team is a great way to have any situation investigated deeply and properly, so I hope your collaboration with them will provide you with the answers to all your questions!

    And thank you for sharing the solution you are using! Let me mark it as a Solution to this topic.

    Have a great day!